[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Guix and Emacs Integration for Polyglot Development

From: Kenny Ballou
Subject: Guix and Emacs Integration for Polyglot Development
Date: Fri, 27 Jul 2018 12:53:07 -0600
User-agent: mu4e 0.9.18; emacs 25.3.1

This may be the wrong list, but I figure most Guix users/developers are
_probably_ also Emacs users, I figured I would ask here first...

Obviously, there is the [[alezost/guix.el][guix.el]] for interacting
with Guix from within Emacs.  However, what sort of integration is
available for Emacs with the ~guix environment -m
<some-project-manifest.scm>~ command.  I would like to be able to
specify a project's dependencies in a manifest file, add any environment
variables as necessary, and have Emacs be aware of those variables when
entering that environment.  Tools like ~pyflake~ for Python projects, or
~go-fmt~ integration for a Golang project, would have their regular
integration with Emacs when in those environments.  All of this without
having to have some version of the tools installed in either the user
profile or the host OS (regardless if that's GuixSD or some other
foreign distribution), both of which would disallow usage of `--pure`
during development (not my ideal).  Furthermore, to me is it preferable
to only have one Emacs (server) session that is capable of switching
between projects and different ~guix environments~, as opposed to adding
Emacs to the development dependencies of a project and using several
different Emacs instances/sessions.

Understandably, this may be tricky for a number of reasons:

- Keeping many buffers/files that are in a different environments may
  causes issues when the environments switch, causing some buffers to
  lose connections or reference to the tools the buffer expects.

- Global(?) variables everywhere, unless this is easy to add to a buffer
  local or similar?

- (e)Shell or long running process integration and patching.  Similar
  problems for other inferior shells, e.g., ~python~, ~geiser~, ~ghc~,

Perhaps a solution is to integrate with a "project" root
~.dir-locals.el~ file for each environment.  However, since I'm not well
versed in what is possible with such a file, I don't know if this is

Another solution would be to attempt to integrate with something like
~projectile~ for the variables, but this sounds similar to the previous
idea.  Moreover, this forces ~projectile~ onto users and that is perhaps
not appropriate.

Hopefully, what I have described makes sense.  I'm hoping to see what
other users are doing for this kind of setup.

Thanks in advance.


#+LINK: alezost/guix.el
#+LINK: bauer-nix-emacs:

reply via email to

[Prev in Thread] Current Thread [Next in Thread]