From mboxrd@z Thu Jan 1 00:00:00 1970 From: Maxim Cournoyer Subject: Re: Guix and Emacs Integration for Polyglot Development Date: Mon, 20 Aug 2018 08:32:11 -0400 Message-ID: <87pnydkylw.fsf@gmail.com> References: <871sbowlws.fsf@devnulllabs.io> <87bmalchr9.fsf@gmail.com> <871sbcpqsy.fsf@devnulllabs.io> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:39184) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1frjM1-0002m1-IS for help-guix@gnu.org; Mon, 20 Aug 2018 08:32:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1frjLy-0008Ph-F2 for help-guix@gnu.org; Mon, 20 Aug 2018 08:32:17 -0400 Received: from mail-it0-x231.google.com ([2607:f8b0:4001:c0b::231]:50377) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1frjLy-0008PS-B6 for help-guix@gnu.org; Mon, 20 Aug 2018 08:32:14 -0400 Received: by mail-it0-x231.google.com with SMTP id j81-v6so20294700ite.0 for ; Mon, 20 Aug 2018 05:32:14 -0700 (PDT) In-Reply-To: <871sbcpqsy.fsf@devnulllabs.io> (Kenny Ballou's message of "Sun, 05 Aug 2018 13:16:29 -0600") 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: Kenny Ballou Cc: help-guix@gnu.org Hi Kenny! Kenny Ballou writes: > On 2018=E5=B9=B408=E6=9C=8802=E6=97=A5 08:08 GMT, Chris Marusich wrote: >> Kenny Ballou writes: >> >>> 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. >> >> It may not be what you're looking for, but projects like Haunt [1] put a >> guix.scm file in the root directory of their project. The file contains >> a package as its top-level form (I think that's the right terminology), >> and you can get the dependencies via "guix environment -l guix.scm". > > When I mentioned the "manifest" file, I wasn't aware it was common to > refer to this file as `guix.scm`, but yes, this is definitely the first > part. However, to clarify, my question is regarding the second part: > how to get the `guix.scm` and any environment variables loaded as part > of `guix environment -l guix.scm` or `guix environment -m > project_manifest.scm`-- search paths and similar -- integrated into the > buffers local to the project directory? I believe `.dir-locals.el` or > similar might actually be the right approach here, but I'm still in the > early stages of exploring this. > > I hope that clarifies my question better. For more reference, I'm also > thinking of wingo's blog on developing v8 with guix[1] (though I believe > `guix environment` wasn't yet available). > > Again, if this is the wrong list, I can move this question to emacs-help > instead. I think it's a valid question here, and I'd like to find a great solution too! So far when using guix environments, I resorted to: 1. Spawning the environment in the command line 2. Starting a new Emacs instance (not attached to my Emacs server) from this environment, so that it gets access to all the variables and tools defined within the environment. I see there is a way to create Guix environments in Emacs using the Emacs-G= uix tool, but it seems those are limited to be used from a *shell* like buffer; Emacs is not magically picking up tools that might become available in that new environment. If you find a more integrated way to work with a single instance of Emacs (say, emacs-server) + Guix environments, please let us know! Thank you, Maxim