Hi Gary,

Gary Johnson <[email protected]> writes:

> Hi Guix,
>
>   I normally edit my Scheme files using Emacs Geiser. However, the
> Guile %load-path doesn't include any definitions from the channels
> that I am using in my channel.scm. I know that when I run `guix repl`,
> I get an environment with a %load-path that does contain all of the
> modules from my channels, but I can't seem to find a way to configure
> Geiser to run `guix repl` instead of plan old `guile`. Surely someone
> must have solved this already on this mailing list. If you've got a
> solution, please let me know.

In general, geiser-guile-binary variable is what you want to modify.
Good file to use for that is .dir-locals-2.el.  For example, this is how
my ~/src/guix/.dir-locals-2.el looks like:

--8<---------------cut here---------------start------------->8---
((scheme-mode
  .
  ((geiser-insert-actual-lambda . nil)
   (geiser-guile-binary
    . ("/home/user/bin/guix-dev-shell" "--" "./pre-inst-env" "guix" "repl")))))
--8<---------------cut here---------------end--------------->8---

(`guix-dev-shell' is just a wrapper script to set up guix shell for guix
development, because it is surprisingly tricky.)

Alternatively, if I want to use manifest instead of guix repl, one of my
projects has for example this:

--8<---------------cut here---------------start------------->8---
((scheme-mode
  .
  ((geiser-guile-binary
    . ("guix" "shell" "-CNm" "manifest.scm"
       "-E" "^GUIX_LOCPATH$"
       "-E" "^LANG$"
       "--expose=/gnu/store"
       "--" "guile")))))
--8<---------------cut here---------------end--------------->8---

Or, if you want to *always* use guix repl, you can just put this into
your init.el:

--8<---------------cut here---------------start------------->8---
(setopt geiser-guile-binary '("guix" "repl"))
--8<---------------cut here---------------end--------------->8---

Hope this helps,
Tomas

-- 
There are only two hard things in Computer Science:
cache invalidation, naming things and off-by-one errors.

Reply via email to