[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Draft new Guix Cookbook section on Emacs
From: |
Remco |
Subject: |
Re: Draft new Guix Cookbook section on Emacs |
Date: |
Mon, 05 Jun 2023 15:02:24 +0200 |
User-agent: |
mu4e 1.10.2; emacs 28.2 |
Hi Mekeor,
2023/06/04 23:32, Mekeor Melire:
> **** Geiser Guile Load Path
>
> If you maintain a local clone of the Guix source code repository, it
> already contains a =.dir-locals.el= file which ensures that the path
> of your local clone is added to ~geiser-guile-load-path~ whenever you
> open a Scheme file in there. But nevertheless, it makes sense to add
> the path to your local Guix repository to ~geiser-guile-load-path~ in
> your Emacs initialization file so that it's set correctly in other
> directories as well.
>
> Make sure that the compiled files in your local Guix repository are
> up-to-date. I.e. whenever your local working directory of the
> repository changes (for example, after running ~git pull~), rebuild
> Guix as described in the Guix manual. Otherwise, Guile would
> auto-compile all Guix sources which leads to misconfiguration[fn:1]
> and likely hits Geiser's timeout. Consider having two Git worktree of
> the Guix repository, keeping one always compiled.
>
> If you have other Guix-related source code directories on your machine
> (and you want to load Guile modules from there), you need to put those
> in the ~geiser-guile-load-path~ variable. (Geiser will then add those
> paths to Guile's ~%load-path~ and ~%load-compiled-path~ variables.)
>
> #+begin_src elisp
> (setq geiser-guile-load-path
> (list
> "~/src/guix"
> "~/src/some/channel"))
> #+end_src
For editing my manifests, guix.scm, system.scm, etc. files I'm using
"~/.config/guix/current/share/guile/site/3.0" for
geiser-guile-load-path. This automagically includes the foreign
channels I've configured at their current version and works pretty well
for me.
Thanks for sharing!
Cheers,
Remco