From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.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 GDcsOUQIMmMsjgAAbAwnHQ (envelope-from ) for ; Mon, 26 Sep 2022 22:15:01 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id EFgEOUQIMmOBLQAAauVa8A (envelope-from ) for ; Mon, 26 Sep 2022 22:15:00 +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 7D0F3EF0C for ; Mon, 26 Sep 2022 22:15:00 +0200 (CEST) Received: from localhost ([::1]:57280 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ocuVH-0007OM-L0 for larch@yhetil.org; Mon, 26 Sep 2022 16:14:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38350) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ocuIP-0001Xj-FR for guix-devel@gnu.org; Mon, 26 Sep 2022 16:01:52 -0400 Received: from [37.120.193.124] (port=40042 helo=mail.cock.li) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ocuIH-0007Qx-Jd for guix-devel@gnu.org; Mon, 26 Sep 2022 16:01:39 -0400 References: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=airmail.cc; s=mail; t=1664222427; bh=EXInRPZuMstxPO9daqAGioOoa729RrOJhPf5s0NG+Sg=; h=References:From:To:Cc:Subject:Date:In-reply-to:From; b=UPBiSQzs8bLD4++kN1uQDYidlfJiA+ZCef9IzmTI9PmYOmridIQtiS/NDj505qtMA GunlkMOXRfzq+ntbithw8CS56q+kBLDsvHvSFZn8Temb7TrvGyUYxDwe1hZYknHrWn kYXYupHNAWEjZlmyaNt0wn1vRP6Etk0+VhaPVUKgASvx1X4D9RMk+XUu7bTwCUVagN LwanHeb3xQD1m5rolJiALhtYDtz7ptBGu6m6wH/IW7rdXku/+9J/47KETXqzv0J3eP WL6lmqYI5+oUxjbG464uCikGM9symeeLfvWITfbDPgRkwmYohAGCtt3C6f4VTRfRW9 0kDzrELAnldPw== User-agent: mu4e 1.8.9; emacs 28.1 From: pinoaffe To: "Thompson, David" Cc: guix-devel@gnu.org Subject: Re: Emacs integration for 'guix shell' Date: Mon, 26 Sep 2022 20:58:24 +0200 In-reply-to: Message-ID: <87a66lj485.fsf@airmail.cc> MIME-Version: 1.0 Content-Type: text/plain X-Host-Lookup-Failed: Reverse DNS lookup failed for 37.120.193.124 (failed) Received-SPF: pass client-ip=37.120.193.124; envelope-from=pinoaffe@airmail.cc; helo=mail.cock.li X-Spam_score_int: -12 X-Spam_score: -1.3 X-Spam_bar: - X-Spam_report: (-1.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RDNS_NONE=0.793, SPF_HELO_PASS=-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-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1664223300; 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=3kQn8gaOt6n2zWw9FGrU1Nl/ZsUxHiBTfp9sLffZkL0=; b=b07B5nZhubZWAkK/nOnO8I3SRT4mas1KRUMpr/8F3FvnCUYs1x3z+se5Zk8R4Ha+SMB8SY nGq4vh7IvQzI0u8/xs7s31vbR46bTbFrrorcYp9f0yR7beC05DxBvthECqp2GSY4lGblkX kB1IdDcvUE1sVndXzneFrCZ7LxeXOcTSFNiXb3TGdmgQFy6OwnOutgHEHRgLkVRDpAiaA5 iukvr9b6/Sy27yuBN4ldyggD7/Bi/Hl0+PCkYWV3R80nc/vo6KBlgkPkTkOlm7DnOnUb9e 2F3QeC7S8YucqN/EYA1Yr0ut4f8zFmNVxoNVvWV4DSOHAJimu+uQurhgXm8aMQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1664223300; a=rsa-sha256; cv=none; b=tBy0rspqjhFKzVN9wB/31Tu2ez4YLyZ4ey3TN9eM3zwrBUW/hvnWOE8ML5EXj0umqxjpYf u9UT2vxQyAeWld2MljaBRQlop6yWrgg84JwbrEGHRECHyt0boXnwzeAFp7vFQaQZHCe3O8 FdiPavuLKsgNbqxFR8XED/6bUzSjCktGajhEK8LrUC9j+pPzTdhrFkT4H2kcy4/PKq4ZGe mK2mWxEEAAiULURvBWsDSuFARn0V83mYPlGlmfGNYfkbzSrEy4XUs35cSaU67cjobdP3ov 1d0bZg7vGMySDD2myMsOCMRL87on17/LWxzHtyGIK5PyASAovDoki5U6AvnJiQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=airmail.cc header.s=mail header.b=UPBiSQzs; 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: -1.85 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=airmail.cc header.s=mail header.b=UPBiSQzs; 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: 7D0F3EF0C X-Spam-Score: -1.85 X-Migadu-Scanner: scn1.migadu.com X-TUID: nwTv4dJwno4R Hi! This looks like a really nice script! A while back, I wrote a bit of elisp that does some of the same stuff that your program does, but which is aimed at a workflow based on profiles rather than on `guix shell`, see [0]. I have previously used said script to set up directory-specific paths/environment variables, but currently I only use it to globally enable/disable certain profiles at runtime. Back when I wrote it, I was planning on rewriting it and integrating it into emacs-guix, but I never got around to it. In general, it would be nice to refactor it to use emacs-guix's `guix-repl' function rather than manually running shell commands. A caveat of my script: it sets the `load-path` variable, which is useful at times but greatly increases the foot-shoot-ability. Kind regards, pinoaffe [0] https://git.pixie.town/pinoaffe/emacs-config/src/branch/master/lisp/guix-profile-manager.el "Thompson, David" writes: > Hello all, > > 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'. > > 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. > > 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. > > 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! > > That's all for now, > > - Dave > > [0] https://dthompson.us/guix-for-development.html > [1] https://git.dthompson.us/emacs-guix-shell.git/