From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id YIi7KWsSNGMLGAAAbAwnHQ (envelope-from ) for ; Wed, 28 Sep 2022 11:22:51 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id EFd5KWsSNGPlFwAAauVa8A (envelope-from ) for ; Wed, 28 Sep 2022 11:22:51 +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 3CFDD3A0E7 for ; Wed, 28 Sep 2022 11:22:51 +0200 (CEST) Received: from localhost ([::1]:44348 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1odTHG-0004Nv-55 for larch@yhetil.org; Wed, 28 Sep 2022 05:22:50 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51074) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1odRcF-00031G-12 for guix-devel@gnu.org; Wed, 28 Sep 2022 03:36:25 -0400 Received: from mail-ej1-x630.google.com ([2a00:1450:4864:20::630]:36680) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1odRcC-0003CM-Je for guix-devel@gnu.org; Wed, 28 Sep 2022 03:36:22 -0400 Received: by mail-ej1-x630.google.com with SMTP id 13so25311938ejn.3 for ; Wed, 28 Sep 2022 00:36:18 -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:cc:to:from:date:sender:from:to :cc:subject:date; bh=uub14TEIiJ29X/aEVcuYeXPRxO+5usWdplBIab/RuAA=; b=jpCu7aPeJ8r+ECEuFKXGLWl7+vmW9twJnuHggxcnZ1VsDVDdeuQOOZmDRoR2I6VW1r YhXk+m9fHPbY5U/+5UzTG4LQJr3qhpy3S79yfZcTW43lFz1EucVmxlL0cC35FoRJwoKn fkc0WEo69HiPSU4qrSpKq9TeRjp+axJN5fHtOds3HhDcgnxeJQLip+YxPKu98spl2i/V oz9/pLQOH2TQmgoPNH0pnxt6FWVEnzq6GGnW6+iAxykrQl+0yI90CmLlIcGJysR9ZiJL zItTWuFS9EC+BH6j9fFieB7Vr+COJqTKg+Hbps7B+ed/j1uOMs70dfJiw36Le3IV/s4p QnlQ== 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:cc:to:from:date:sender :x-gm-message-state:from:to:cc:subject:date; bh=uub14TEIiJ29X/aEVcuYeXPRxO+5usWdplBIab/RuAA=; b=Tcu9xnBPBHTx30NBv/7ZBQeQHe68DbgTCsRRaKsxhcTwJUGN34uKYEM/hzJm38qynE kHjlC1QoFekqh1nJNJ6tfl2OgXCM29o7GxEoTIckLP+U0xb2EM5LHkRgbG0CKLx52E8d 7U5SxO+a2DmyX31EPrbgoobmOmSOqUnqohpqAR6Rj2TLx92gqCl2wnm465aSOYWLrrL2 9s70TFwFiZ8prmDKiDrMhe3izA866LU31oNvcX6+n6AE8X3kzsDFraKtw/4ba/s7O+oh kD6bYWhr1XN550Ge2H5XNvqervqJkbDoQyczzE2Wc5EAHro2BkYepTsJ0jCT0Egq2fR1 L8uQ== X-Gm-Message-State: ACrzQf1MR5ylJrFNztZJ91kbb44h+I/DdbfbDGvqmL7aWrnbMnb/KPs+ j1gSCVp5Kz0LhLRYJne3uJ4= X-Google-Smtp-Source: AMsMyM5GRQv4LJmGB4u8k4culybuQ9DedqHeQZcBIafcY9MwK/2/0LEfsVLaPm/0G2+olTMwvE0+CQ== X-Received: by 2002:a17:907:7202:b0:783:1bed:c5db with SMTP id dr2-20020a170907720200b007831bedc5dbmr16306383ejc.124.1664350576692; Wed, 28 Sep 2022 00:36:16 -0700 (PDT) Received: from localhost ([141.226.13.62]) by smtp.gmail.com with ESMTPSA id kv23-20020a17090778d700b0078250005a79sm1893501ejc.163.2022.09.28.00.36.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Sep 2022 00:36:15 -0700 (PDT) Date: Wed, 28 Sep 2022 10:36:12 +0300 From: Efraim Flashner To: "Thompson, David" Cc: 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="opBI+MT676npXQO+" 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::630; envelope-from=efraim.flashner@gmail.com; helo=mail-ej1-x630.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=1664356971; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc: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=uub14TEIiJ29X/aEVcuYeXPRxO+5usWdplBIab/RuAA=; b=JDozMT/G3XsWCuzDQkoUcPx+D9HcBaBmmgwPB6ISldjvnnXUD8RpGu+n7PMsDBYAjA93RO eYu91JeejKQKHegvOnMU/3xlnOTOpHsxnB9SzksoSJ7vYfGnU35zVCvlrgln8PBK0Awz5C fqZwCXrMQ1u7WD6YKqKuQv/vLi45Pj4gqjX5TK7p1VO5MgLMoNcIaq/ecBznecWvSPOzTQ CXgjxvpLl7zvXDMxzMgDYRm2mJtUMMyEk45WFDXbwslJSbTcopOykuxJDf+F1DLawXKvgV xG41mVgZy86GXwvAZ/iZGh4kQRU2vWnX+YxvfCqUcK+0eF+/KHpcTQhaVvcL3g== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1664356971; a=rsa-sha256; cv=none; b=e9T1yRPovGWX0fuBi2S0PZ/D3SezdbAtkYAglXMxFSw4R8xT3M41l9/WvaK4sTOdHzKvS1 VT/a7GiKvmdSGpf6pJJIm61RmbzjoayOMk7LDYnBIaF+xSrRbRUjD+42a+dyph/Gimor8U Y5EVNvfUzHzXpm/vG3jtsOoqfsMdlD69/aYTZJervCsyL8vLd+KydUa3oi0TpBNuOhzXOc hW7Et5If1dL39VRRlcce2ZAukjOe435CJzMCNXe9sOtxIjUZT6l/zgGJ4cH46IzL+QO3YR Dw0v3/CV/UcUNEBhCbMt5T0FegQiSmt4fQNz0XCFSecRL8r9fnRTyZZqm6zxoA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=jpCu7aPe; 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.25 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=jpCu7aPe; 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: 3CFDD3A0E7 X-Spam-Score: -0.25 X-Migadu-Scanner: scn1.migadu.com X-TUID: E42A6EE0Ctvq --opBI+MT676npXQO+ Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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/ 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. I'm currently using Enlightenment, which has a 'PANTS=3DON' environment variable for unknown reasons. (ins)efraim@3900XT ~$ cat guix-shell.scm ;; This creates and empty guix environment, with ;; the PANTS environment variable set to OFF. (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 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. --=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 --opBI+MT676npXQO+ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAmMz+WoACgkQQarn3Mo9 g1FONg/+PhWE71WnPcQTaarV6m8prkVyjBOa+cmIutQnRjvKpdZ1hc6J+IgHIXYs PWo/b9WhF76aKHyT71W2kutyx9L+exWkjNT+KM2tmfbCUdke/x+WgZRxVa/NHtsi a7LgQi4U0Igf0kPz+k+FdmT1l36mEb5w6hXTqtu6nRGz2x6G8DDYAVJkPjZR3qJM 086n6Z7hUzKt4Mx7wiQ0l7w+uCWGgv2N2MjXbglQv9MmtXhKlFejvMTg5J2T3PS/ 99WjFfYRF+HjAKtOmQVQEk/etGEksFfIHLA3CcMnmQOeCx80L9N1W5GaCpRQkc1B g7hV1hU8xop9XCVs7ze76zPNVgx07QGtQ3Kt19k+IdGQ0S/vun/fc0GJvRAAVi3r y/qQf6L0Gpq5bH3uw9BLV0Zcr0WlpOxpRkdHbdd9Z6XN75dbDkuL7YPptIJXG70v mJjpIkpKBeg9BC5DNu4dnrmqVKkB07Q8JOXqtt3xrDP19Cgb/Dz+uu4sT2OabpGd PBhDxomRniZGOxuXEQs32oZrfr9QhRII49nF9ed1CTqG1QjyJnXNNUWahRCmi9A3 nvXb5UgYxG2zDOz/DVdKH8bcS+n8NDAbnU9bylHsu65yYz04zUArG3FGUcQyBjf0 xJC3tMo95a5aGiuNLFIoXkEodbAWNI+B8IdEXfz03CltjCP/x+M= =m88z -----END PGP SIGNATURE----- --opBI+MT676npXQO+--