From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id gJtuNIZeNGOqGgEAbAwnHQ (envelope-from ) for ; Wed, 28 Sep 2022 16:47:34 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id eF+UNIZeNGNfFQAA9RJhRA (envelope-from ) for ; Wed, 28 Sep 2022 16:47:34 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 471C0DFA5 for ; Wed, 28 Sep 2022 16:47:34 +0200 (CEST) Received: from localhost ([::1]:52652 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1odYLV-00082M-By for larch@yhetil.org; Wed, 28 Sep 2022 10:47:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37526) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1odWOl-00050e-KJ for guix-devel@gnu.org; Wed, 28 Sep 2022 08:42:47 -0400 Received: from mail-ej1-x631.google.com ([2a00:1450:4864:20::631]:41814) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1odWOi-0000Im-FZ for guix-devel@gnu.org; Wed, 28 Sep 2022 08:42:47 -0400 Received: by mail-ej1-x631.google.com with SMTP id hy2so26839154ejc.8 for ; Wed, 28 Sep 2022 05:42:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=in-reply-to:content-disposition:mime-version:references :mail-followup-to:message-id:subject:to:from:date:sender:from:to:cc :subject:date; bh=ZZxnpO1uOQ6IwhKUIbTfIpXpeQK/ZyQbuv/XlfKBXLk=; b=lMJ89DLxkC1+AbXR0OkzmdQFgE/8PTjCSvGkIEcPLWtcqI/yOFfE9cSRz/CSfbMyV5 keIJbxky+LmVg2+8JZOTGzvFvl4B714FXo6cR6FkFDXUAkLwmOqbRVhz+2PWZ9hcbZDL fsT34eYgAG+6pMRn+KRQUNz3Ms5aoJRk8qJALb0qr1hO4RZNO62j2CFw+JUiQ4uCkRYL DF8RWMb7uE8Xxk+tWqvVJfHe4oe7xPzpXNPtlVC5tXNXjw4j3XIKrSTx5/8JOyYafhOY 7jlRk8BJbY/60/OG+N/ua5p8ecSWkRJGQQQt65SemSdhk7RoNIcPJuj1mSflN0+lhjqZ FDHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references :mail-followup-to:message-id:subject:to:from:date:sender :x-gm-message-state:from:to:cc:subject:date; bh=ZZxnpO1uOQ6IwhKUIbTfIpXpeQK/ZyQbuv/XlfKBXLk=; b=KZzlDSHwvpT3HGp3DsPb4tRMGWkuaMvi8W9GCy6irw0zVjwtAYNKBaF6/2/vNL1Fi7 r1eL5CTaLpkXgNLcSmid5tF5kUNmWzB1ThGcZD1yIVt3CZQeTWs7dZADSv/HldIdtaOy +y++90j+zGWMRB+s2cfGMWEa4NAUujD0h57KRzH41bKARKp/dluSZ51QAC39UouhwJsm wubdwk8XVitWgtDfqeDd0kkzNbMHuudp3ChQLm0gfxT+ZU4kMmwmXz9L0zGI7M7GC/Yk i8LNuGMZUdXFbTh4+ATzAgTQ5St4ztbP594IbqV2D1kPfecI1F/rQvEMC+OmkD8K9eAp PmQQ== X-Gm-Message-State: ACrzQf1K7E6C24t8UZU9qaU74Ay+nxcw0ffP8o9I1zVVg1/79VLXOg5n XPu4hsLaK8NNrBSa8bBv7QI= X-Google-Smtp-Source: AMsMyM5IuSCZnYUbCTaIS2eb7pFIJ6Gy6ms3tshLVQ2aoKJGO3WmmLley3uB5k0r8q97vJq/4pgKQQ== X-Received: by 2002:a17:907:e87:b0:783:98dd:4221 with SMTP id ho7-20020a1709070e8700b0078398dd4221mr13356865ejc.22.1664368962427; Wed, 28 Sep 2022 05:42:42 -0700 (PDT) Received: from localhost ([141.226.13.62]) by smtp.gmail.com with ESMTPSA id r23-20020a50c017000000b004545287d464sm3277030edb.14.2022.09.28.05.42.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Sep 2022 05:42:41 -0700 (PDT) Date: Wed, 28 Sep 2022 15:42:38 +0300 From: Efraim Flashner To: "Thompson, David" , guix-devel Subject: Re: Emacs integration for 'guix shell' Message-ID: Mail-Followup-To: "Thompson, David" , guix-devel References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="zzmWSKV64si6jjB3" Content-Disposition: inline In-Reply-To: X-PGP-Key-ID: 0x41AAE7DCCA3D8351 X-PGP-Key: https://flashner.co.il/~efraim/efraim_flashner.asc X-PGP-Fingerprint: A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 Received-SPF: pass client-ip=2a00:1450:4864:20::631; envelope-from=efraim.flashner@gmail.com; helo=mail-ej1-x631.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: "Guix-devel" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1664376454; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=ZZxnpO1uOQ6IwhKUIbTfIpXpeQK/ZyQbuv/XlfKBXLk=; b=UcMHj3nc+DhshZlZL2cn+x3svM5QSbfPyfCDycn72ZG//xuFNmlvERbjJ7doX8PjOOS3Ap +jRSOr1XM3cQ1KVTNBJpwanEeuLaw4y5eIFa04jCTaTwUtT8yTkZX2dBeqqsmx65Gdg37l JHBqUJBbzZdqHaCxVx+2zfaKERzoclc+NJSPjPGV3tGrbTqxe3Spj85ixoySsiTWd3SIhy PdXa9oAakEqBOkX7sMBOpI1VwIYRgT0+hVWDIH7Ab4XkiLOvzsrstRpd4Q2hLKQx1bOAJ4 2rbePC5G+3bl2MpH+QZhnoyFrrjrNE4XD6lvQG+i/zjmqvF+rwexkmiZjr8Qhg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1664376454; a=rsa-sha256; cv=none; b=Cv/AdQZeEOgGEHSzaVeVDjXsK57zxmQnmGH4kDBcxDVwbOpn7yU28dcShI4fd2woB8hIGH +88SMBSWoljNnjYtanE7jBwBHGPgWcJKNo40xsqSWTfW/nXywBk0SgEUU24VGUOcuUiW0Y OXhdZAJunc/7ApvDqI8x79TbZocmuLUctDnJDjuAFQjeoxOm9uhGb7XzazsnbExa1yBzFg IuV6HZnz/9CvDmNWiI2B8vfCik7DFbbxTfl8NIA+04Rsqfaa8K19Q1KSTe6xxLSjXBCAMY qzwMN6ndzAdEyWwAf0HyXCi4A8a6i++YqfcWSgnFPsWlojk3hfm7bRBaJgvrvg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=lMJ89DLx; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -0.55 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=lMJ89DLx; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 471C0DFA5 X-Spam-Score: -0.55 X-Migadu-Scanner: scn0.migadu.com X-TUID: zEaCQCVplvMk --zzmWSKV64si6jjB3 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Sep 28, 2022 at 10:36:12AM +0300, Efraim Flashner wrote: > On Mon, Sep 26, 2022 at 01:48:25PM -0400, Thompson, David wrote: > > Hello all, > >=20 > > 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'. > >=20 > > 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. > >=20 > > 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. > >=20 > > 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! > >=20 > > That's all for now, > >=20 > > - Dave > >=20 > > [0] https://dthompson.us/guix-for-development.html > > [1] https://git.dthompson.us/emacs-guix-shell.git/ >=20 > You can add other things to your guix.scm file, allowing you to do More > Things=E2=84=A2 than just add packages to your environment. >=20 > I'm currently using Enlightenment, which has a 'PANTS=3DON' environment > variable for unknown reasons. >=20 > (ins)efraim@3900XT ~$ cat guix-shell.scm > ;; This creates and empty guix environment, with > ;; the PANTS environment variable set to OFF. >=20 > (setenv "PANTS" "OFF") > (list ) > (ins)efraim@3900XT ~$ env | grep PANTS > PANTS=3DON > (ins)efraim@3900XT ~$ guix shell -f guix-shell.scm > guix shell: warning: no packages specified; creating an empty environment > (ins)efraim@3900XT ~ [env]$ env | grep PANTS > PANTS=3DON >=20 > This doesn't directly help with your scenario, but you could change your > 'make' invocation to `guix shell -D -f guix.scm -- sh -c 'source > $GUIX_ENVIRONMENT/etc/profile; make'`, which would work as a workaround > for now. It would seem I was so certain it would work I didn't check before pasting and sending. --=20 Efraim Flashner =D7=90=D7=A4=D7=A8=D7=99=D7=9D = =D7=A4=D7=9C=D7=A9=D7=A0=D7=A8 GPG key =3D A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 Confidentiality cannot be guaranteed on emails sent or received unencrypted --zzmWSKV64si6jjB3 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAmM0QTsACgkQQarn3Mo9 g1EmRA//a7ETFqn+9ZssCjMrJT4PdOnL7U+/pwifNqRedNnzwb/mricIvxBvzcFu DUajtAL1sKmlVDSCX7WkJ4kdy1XazQ+UMOrR3D2eSrWIJ35TRuAauibfis/fv5U9 K3hnYpUdCbJWOB9muOBbmHCr0SYK0/Z5/3Npy/kgYm4lQfWSt22427EKIK0jHmpP Jz7HVDCI4Z+JOg7zkaMNhHo6OoTaxWVqLpdstZIHV77Hap2Jnkoms9j7PdMIQTsZ sUUgvLgu9H52kT+cac9ZpnAUc/EpUKbB3whtK08BaF5Dk+HOo6ft1m8jMCI1TPP1 msgmBmWLvMCzDguMSi3+xUkBThID4Wv76DlY0YwLHlwMyv8WpKWdlW1369AObs9Q v18Cpv5u/Oz0Ui7DzjUAZrXOMjuk1t5t4KUCBBT+LpmaDLvCPjHYHpZ8B1uPoUIb 7A2T2qz6YkdrnZ5jguV/NE6+EYGWspL/9qXbUcxoFKC+yFKbdZGjhifCmlHJmXTg 05m/nwIqiqKvZjLd9eYHW9Y+f6repe6m/eMtS3vzfwjhCqUtFGDzwaN2gOvsR6N9 ydJa3YDQlAYpfix+fKfQ0qDtGwZ8poTiw6uWuY6PC677vFEW8upnaiDpUzowCgkQ 5WLuWiGjQPdGe3ODXoBcenFG7/rDb7BoOYl19m6iSzqcrV0YPuU= =RvTg -----END PGP SIGNATURE----- --zzmWSKV64si6jjB3--