unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Thompson, David" <dthompson2@worcester.edu>
To: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Cc: "Olivier Dion via Development of GNU Guix and the GNU System
	distribution." <guix-devel@gnu.org>,
	Olivier Dion <olivier.dion@polymtl.ca>
Subject: Re: Emacs integration for 'guix shell'
Date: Tue, 27 Sep 2022 07:13:22 -0400	[thread overview]
Message-ID: <CAJ=RwfZq3UzW66pjO+dFJ9qUUJL9yt2sic5rMRh2wt7Bto7B1Q@mail.gmail.com> (raw)
In-Reply-To: <87k05py1sf.fsf@gmail.com>

On Mon, Sep 26, 2022 at 10:44 PM Maxim Cournoyer
<maxim.cournoyer@gmail.com> wrote:
>
> Hi,
>
> Olivier Dion via "Development of GNU Guix and the GNU System
> distribution." <guix-devel@gnu.org> writes:
>
> [...]
>
> > I have the following in my .dir-locals.el for my library libpatch.  The
> > idea is the same, but without direnv:
> >
> > ((nil
> >   . ((eval .
> >       (let ((root (locate-dominating-file
> >                    default-directory ".dir-locals.el")))
> >         (when root
> >           (let ((real-root (directory-file-name (expand-file-name root))))
> >             (setq-local geiser-guile-binary (concat real-root "/.geiser-guile"))
> >             (setq-local projectile-project-compilation-cmd
> >                         (concat real-root "/.projectile-compile"))
> >             (setq-local projectile-project-test-cmd
> >                         (concat real-root "/.projectile-test")))))))))
> >
>
> It seems to me it'd help everyone if Geiser should handle the above by
> itself.  It'd be cool to have the above functionality merged into Geiser
> itelf.  Just saying; thank you for sharing!

With Emacs 28 and new versions of Geiser (such as the one in Guix) I
highly recommend enabling per-project REPLs.  By setting
geiser-repl-per-project-p to 't', commands like M-x run-guile and C-c
C-a will open/switch to a REPL associated with the current project as
determined by project.el.  This is useful for when you are working on
multiple projects at once as it makes it harder to mix up REPLs, but
Geiser also automatically inserts the project root directory into
Guile's load path.  When combined with emacs-direnv, emacs-envrc,
emacs-buffer-env, or emacs-guix-shell, the Guile binary that Geiser
uses when launching a per-project REPL will be the one from the 'guix
shell' profile, and it will honor the
GUILE_LOAD_PATH/GUILE_LOAD_COMPILED_PATH settings.  So now, at long
last, my Geiser REPLs automatically use the proper build of Guile, it
can load the external libraries my project depends on, *and* it can
load my local project modules.  I'm quite happy with this setup.
Maybe I could write a blog post specifically about setting up a Guile
development environment with Guix and include all these details.

- Dave


  reply	other threads:[~2022-09-27 13:02 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-26 17:48 Emacs integration for 'guix shell' Thompson, David
2022-09-26 18:30 ` Olivier Dion via Development of GNU Guix and the GNU System distribution.
2022-09-27  2:44   ` Maxim Cournoyer
2022-09-27 11:13     ` Thompson, David [this message]
2022-09-28 14:11       ` Maxim Cournoyer
2022-09-27  9:15   ` zimoun
2022-09-27 12:06     ` Olivier Dion via Development of GNU Guix and the GNU System distribution.
2022-09-27 14:39       ` zimoun
2022-09-26 18:58 ` pinoaffe
2022-09-28  7:36 ` Efraim Flashner
2022-09-28 12:42   ` Efraim Flashner
2022-10-01  4:47 ` James Thomas
2022-10-01  8:22 ` Philip Kaludercic
2022-10-01 11:58   ` Thompson, David
2022-10-01 14:38     ` Philip Kaludercic
2022-12-06 14:59       ` [EXT] " Thompson, David

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAJ=RwfZq3UzW66pjO+dFJ9qUUJL9yt2sic5rMRh2wt7Bto7B1Q@mail.gmail.com' \
    --to=dthompson2@worcester.edu \
    --cc=guix-devel@gnu.org \
    --cc=maxim.cournoyer@gmail.com \
    --cc=olivier.dion@polymtl.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).