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 WPeXO5srOGP2+AAAbAwnHQ (envelope-from ) for ; Sat, 01 Oct 2022 13:59:24 +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 loAWAJwrOGOpPwEA9RJhRA (envelope-from ) for ; Sat, 01 Oct 2022 13:59:24 +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 8DE08F38A for ; Sat, 1 Oct 2022 13:59:23 +0200 (CEST) Received: from localhost ([::1]:42210 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oeb9O-0008II-O7 for larch@yhetil.org; Sat, 01 Oct 2022 07:59:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44326) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oeb8x-0008Hw-VE for guix-devel@gnu.org; Sat, 01 Oct 2022 07:58:55 -0400 Received: from mail-lf1-x129.google.com ([2a00:1450:4864:20::129]:33461) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oeb8v-0000O2-4r for guix-devel@gnu.org; Sat, 01 Oct 2022 07:58:55 -0400 Received: by mail-lf1-x129.google.com with SMTP id d42so10566733lfv.0 for ; Sat, 01 Oct 2022 04:58:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=worcester-edu.20210112.gappssmtp.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date; bh=+0Yzyw0BlWQ8bLadjDbNURCk1n6L93vfJecqoA+cT+8=; b=L2tYPQSuF/p3q5uKO2LVn8xOKMuWwxgEehUrnQlNFrnZbenoszNTUz/1k2mxmre0H9 83tyFuZ4kzs6deA0OINY1cfAtzKXFkTP4wT54eiumipwGIYrfN7p66vmLjQ0VInkZtsi iQmduOryQRXXw0UquiMHAKqRPp0gAtlFzKb8yKuAdZyBAsWp09kzibYRDMNwCho1uf8x LGgk2ojCiNsc4nSvL6uTJyuXqLp8YMWPhdZ7VXAPsIh1HddPF9rYbqE8RdeCW3/uGwlA UIIwN0LmfTzcNhBm5p3Hz7ynjt5T02+jMhT6O9jwZLe90VNTVDibUsB/L95KWf3dQm/+ cgoA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date; bh=+0Yzyw0BlWQ8bLadjDbNURCk1n6L93vfJecqoA+cT+8=; b=yyd9dTd05iR8MeFipIG8+zvE5xGkInta0+KpmZInXWA4vIEDEzFlnl2+Alv3IkYaFu AFo5BIFOx8UsD0V8jL5QC3MSBTiOmRSRdi4QW8X10iPTtbnXRw6HaTgoLhGC/uUAqtHn sOI2tPUDqj0LnQzizI8UEeb/htYGc/tx3tcQ1oZ6FW8Jn4NU8jzcImBMq9Wm8GR4HiMq U5/VtDoQRgXMfYSZhYMORgamQ4KhLMFiGinkWP5umAmEaPuJY/EyIiHzG9IiXbdozxE2 Rv6HiFc/KY3UezqC1wuQ1J06wTCha8cbv+YapSfCf0CGnWdK3gDtUOSLG+MaSpj0MrXV XkMg== X-Gm-Message-State: ACrzQf2abalG7BeIq+zXDN8PQ06FM5RcOGa20ZuVrnJtbF3A28GeAhJN u+mQ1xNkcRdelWm3aTCPhVUA1QosMbRSfGjXlX86aQ== X-Google-Smtp-Source: AMsMyM5M9ezJGY2v33fdW+eVRijcSm3DvdXw2/2BdR9w7pdpnKPV15ki6k6xSo63rzb1QGnb03SuatWoEVHslcsm8Qg= X-Received: by 2002:a05:6512:3b23:b0:49f:59db:62fa with SMTP id f35-20020a0565123b2300b0049f59db62famr4998299lfv.79.1664625528538; Sat, 01 Oct 2022 04:58:48 -0700 (PDT) MIME-Version: 1.0 References: <875yh4x89y.fsf@posteo.net> In-Reply-To: <875yh4x89y.fsf@posteo.net> From: "Thompson, David" Date: Sat, 1 Oct 2022 07:58:37 -0400 Message-ID: Subject: Re: Emacs integration for 'guix shell' To: Philip Kaludercic Cc: guix-devel Content-Type: text/plain; charset="UTF-8" Received-SPF: pass client-ip=2a00:1450:4864:20::129; envelope-from=dthompson2@worcester.edu; helo=mail-lf1-x129.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham 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=1664625563; 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=+0Yzyw0BlWQ8bLadjDbNURCk1n6L93vfJecqoA+cT+8=; b=LpH03SMEPTGuMnaUJ4jJlXXfF+8b8vwhKKRlneHKr5ygYFN0xfhR6mrNzn25ZXsVmypd9T prhjg/rhB9+xUdGZPlid9zIyhCO8jUxwDpsJFlIn7335R0g0u0WbAxGcWnSLV4kXbU+M8M Wl+rG+1VlkwUgLAhH0ytXkb14KrDq14dmUgOjLC8ZZLjUr7zRoChiIfNNrKolsnGujTyAR MUNeCe/W9LG3o1mpClZVr+ot/OgZP2nwk5fzdx2PFQNtPAI2Kynqq/eof7DbXlSfjBXx2N hiBaOZRC910K1Wm0K/kX6Ktez8YETc8wRleEZ0SxiFBUb+2nqZ5EcQ95y/fa9g== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1664625563; a=rsa-sha256; cv=none; b=PgjewPKMZ3s5pdqOExq9AdcoHUFCp5CJ9NXCG9/tX+5veIyq6KsXwgKogWysMEImzWx3qr j5Fz5ew3iYitsG5TLFMLTauJSVhdISmBdcGrkQFYsgbSu6Qcaf5LaafVr2z2TxEzwdo2oL afOacGVj8Wa3DVCdMKec2bMoZGW1bypakL/o9QxJ3BmU6hCtLfHCuyxfl2GR6WSsv/0g+L sGpQiPKh4l9xCqn8Tm5z7a2g5A97LQhJYME508YSxN8U7YawEBuzthDyidNBf7Q/8LX4xW XUveMUc0wyMu1lSvTF7ouGBMDTMURW5kcpJnS3FWHdkv1p4LRrJgABdz4r3tOw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=worcester-edu.20210112.gappssmtp.com header.s=20210112 header.b=L2tYPQSu; 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: -3.34 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=worcester-edu.20210112.gappssmtp.com header.s=20210112 header.b=L2tYPQSu; 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: 8DE08F38A X-Spam-Score: -3.34 X-Migadu-Scanner: scn1.migadu.com X-TUID: 7Pe391+bXn4t Hi Philip, On Sat, Oct 1, 2022 at 4:22 AM Philip Kaludercic wrote: > > "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! > > I haven't used direnv, but how does it compare to buffer-env? I worked > on the Guix integration a few months ago and it has been working really > well for me. Oh, I didn't realize buffer-env had Guix integration. My little project may be completely unnecessary, then. When I looked at it I noticed that it still used .envrc files and wasn't fully compatible with direnv so it didn't seem as good compared to something that just directly invoked 'guix shell'. Will buffer-env automatically invoke 'guix shell' without the presence of a .envrc file? And does it integrate with project.el? I guess I can answer these myself by trying it out. If it does both of these things then I can happily switch over to it. Thanks for the pointer! - Dave