From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kenny Ballou Subject: Guix and Emacs Integration for Polyglot Development Date: Fri, 27 Jul 2018 12:53:07 -0600 Message-ID: <871sbowlws.fsf@devnulllabs.io> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:54566) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fj7rm-0000wY-W6 for help-guix@gnu.org; Fri, 27 Jul 2018 14:53:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fj7rj-0007z1-Tu for help-guix@gnu.org; Fri, 27 Jul 2018 14:53:31 -0400 Received: from aibo.runbox.com ([91.220.196.211]:54078) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fj7rj-0007u3-Lw for help-guix@gnu.org; Fri, 27 Jul 2018 14:53:27 -0400 Received: from [10.9.9.210] (helo=mailfront10.runbox.com) by mailtransmit03.runbox with esmtp (Exim 4.86_2) (envelope-from ) id 1fj7rf-0005Ds-WB for help-guix@gnu.org; Fri, 27 Jul 2018 20:53:24 +0200 Received: by mailfront10.runbox.com with esmtpsa (uid:818882 ) (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.82) id 1fj7rR-0003NS-6Q for help-guix@gnu.org; Fri, 27 Jul 2018 20:53:09 +0200 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+gcggh-help-guix=m.gmane.org@gnu.org Sender: "Help-Guix" To: help-guix@gnu.org 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 ~ 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~, etc. 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 viable. 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. -Kenny #+LINK: alezost/guix.el https://github.com/alezost/guix.el #+LINK: bauer-nix-emacs: https://matthewbauer.us/blog/bauer.html