Hi Philip, On Sat, Oct 1, 2022 at 4:22 AM Philip Kaludercic <phil...@posteo.net> wrote: > > "Thompson, David" <dthomps...@worcester.edu> writes: > > > Hello all, > > > > I recently wrote a little blog post titled "Guix for development" [0] > > and in it I mentioned using a tool called direnv and emacs-direnv as a > > way to integrate 'guix shell' with Emacs. This integration has vastly > > improved my Emacs experience. I can open a shell buffer and the > > environment variables are automatically configured the way I want. I > > can run M-x compile and simply enter 'make' as the command instead of > > 'guix shell -D -f guix.scm -- make'. > > > > It's very cool that it works, and I should have done this years ago, > > but direnv is an unnecessary middleman for me because I don't use it > > for any other purpose. It would be *even cooler* if Emacs could call > > 'guix shell --search-paths' directly, parse the result, and update the > > buffer environment. Furthemore, it could integrate with project.el > > (thus requiring Emacs 28) so that per-project search paths "just > > work." The emacs-guix-shell [1] project attempts to do this. > > > > I'm not an experienced elisp programmer so I'm sure there's stuff to > > fix, and there are no customizable variables yet, but the essentials > > seem to work OK for me. If you'd like to try it out, eval > > guix-shell.el and then M-x guix-shell-global-mode to enable it > > everywhere, or M-x guix-shell-mode to enable it just for the current > > buffer. > > > > Whether through direnv or guix-shell.el, integrating Emacs with 'guix > > shell' has been a game changer for my development workflow and I > > highly recommend it! > > I haven't used direnv, but how does it compare to buffer-env? I worked > on the Guix integration a few months ago and it has been working really > well for me.
Oh, I didn't realize buffer-env had Guix integration. My little project may be completely unnecessary, then. When I looked at it I noticed that it still used .envrc files and wasn't fully compatible with direnv so it didn't seem as good compared to something that just directly invoked 'guix shell'. Will buffer-env automatically invoke 'guix shell' without the presence of a .envrc file? And does it integrate with project.el? I guess I can answer these myself by trying it out. If it does both of these things then I can happily switch over to it. Thanks for the pointer! - Dave