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 uCHqCcrqMWPICQAAbAwnHQ (envelope-from ) for ; Mon, 26 Sep 2022 20:09:14 +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 wOTsCcrqMWOKJQAA9RJhRA (envelope-from ) for ; Mon, 26 Sep 2022 20:09:14 +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 F0A659C1D for ; Mon, 26 Sep 2022 20:09:13 +0200 (CEST) Received: from localhost ([::1]:56274 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ocsXZ-00078w-4U for larch@yhetil.org; Mon, 26 Sep 2022 14:09:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53768) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ocsDi-0007qT-Ri for guix-devel@gnu.org; Mon, 26 Sep 2022 13:48:42 -0400 Received: from mail-lf1-x135.google.com ([2a00:1450:4864:20::135]:42832) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ocsDf-0003Wy-Rx for guix-devel@gnu.org; Mon, 26 Sep 2022 13:48:41 -0400 Received: by mail-lf1-x135.google.com with SMTP id a3so12035822lfk.9 for ; Mon, 26 Sep 2022 10:48:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=worcester-edu.20210112.gappssmtp.com; s=20210112; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date; bh=zcwEt9fWzTCebQEElEFe4Kgj4sp2SMgI8axGuty4kqE=; b=rWZMlwZocn8CciCaJt+HJhvK5Apt495kHbyRLhKcFGzNcIGsUTNDemu4GR3cu8JRmU 5dXfyOPlA17D+5E9xfD2WBQh+V4VaIp1AopA3ITd3sWZDHE8uCqnzB7gfc1nf3qRZHBa 0fKfcx6hISb/Zg9vc99Nvql5cKPvzuoyn8cO+97w3q8WtMLelK9RKA51+BepZ6nakTa5 Xl+qKvFQyCQZ+Yhvozx0NnLbhClU1ZMoPDureweXjQE9zpxsE5g1KR52+4oAxJ/F7Svl IDHdY6Ig3BTadxNxAn3y7A5L4wnbqpxhJAEGSiKa05JtJ+Wnt/A+orFPeBbK00oV1iZD eymw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date; bh=zcwEt9fWzTCebQEElEFe4Kgj4sp2SMgI8axGuty4kqE=; b=hiGzPx4K+G8PtJ94CJLVjTfh6hAOZmEGB9omQne1SgEiHEkbZRzpFRgZUExJTABVGE R0kJUZXYvPMTWYleIFbeC3IzapLwLt0wP+x1xBOaol7Tzdno1jxgSrihxqNsTi6x1YZS HQABsofq68iYkv/wxj4v3RIVFVe9eYrGrFmCnAIyUQ4SINor0lyz7LtHTW6ww/4eWVqo 8KRv9NHzjq/ixRzyRXwLsIhz10qYh26KFZxeR2vLhsxCMPOSUnAFIoSqmTZXAsqtzwgz n7n6WAErHRMnpmEdzmVZPE83mPG4BJQUllQ8AUdqQjpHX2/QG9woAzPTfEZRvJbAgbER 33ow== X-Gm-Message-State: ACrzQf2lfzpoM0soTQY6DUWE8ioQiYPOtZ1WIXkzqkUk46vTGCO/LwQ4 +STwvKPnkfI7mP+DUWpy5BjnWkYpUJPyTbOwr6zjU6qNtNKdDA== X-Google-Smtp-Source: AMsMyM5T4JMrvyF6DwnvnBR5SIFTdhhpdBCKYzTVUQufz6JccFPie5/jwYo2W82KJz7BVoq/YTuKkf04SYeO89apsEg= X-Received: by 2002:a05:6512:1151:b0:4a0:50f2:9509 with SMTP id m17-20020a056512115100b004a050f29509mr7988743lfg.297.1664214516896; Mon, 26 Sep 2022 10:48:36 -0700 (PDT) MIME-Version: 1.0 From: "Thompson, David" Date: Mon, 26 Sep 2022 13:48:25 -0400 Message-ID: Subject: Emacs integration for 'guix shell' To: guix-devel Content-Type: text/plain; charset="UTF-8" Received-SPF: pass client-ip=2a00:1450:4864:20::135; envelope-from=dthompson2@worcester.edu; helo=mail-lf1-x135.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-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=1664215754; 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:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=zcwEt9fWzTCebQEElEFe4Kgj4sp2SMgI8axGuty4kqE=; b=a68UoQJYgWs1FQMnQ/sKt+rTqef/K/aZeC4Cz0G1KmbD7Sn23bzeaMX9PdoQeQQTSCk2tE F+EX/HMnRf1aipDZ2icwc4lUGBhkKoaK0LdQu106+Gq/3toJ/DtfsXostMab4PgZR3yjiT lknHcOMxWipV0afCON1JxieJcL9gJcqkxdZTHv6zsrTXY8jEVaKCgiWf4NoiOF0mFt6AGv sLtfRqXPFIdxseU1dswJNi8MK6dXmmLgYe7FwBBR4u9jKtHTSF3oatxADXV62ioTGBJUN5 +Dp056zNKuAxS2WgkU1BN2qRut2Bz05u9TGNYvdrfynRG4jf0cz2aTrQ3Ao6aw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1664215754; a=rsa-sha256; cv=none; b=DIlRNosD2ViRHv6wVg8eep4o5+LuxWTzDcHQb2nC3kf93DGNMWjjssor1kcdd0phgVteTk RcsyaHly9Ghl+Kuhbm1IlP3PYYgAC89Yguwdpy/DljFC7y8mqFM8QdLiotOKsWK6+LJic8 to5gAHkMiCIW7m8y/aP+/uNodK0QJCITdK/9myjy+PTrnH4XO7og/AbHWTKrjI8sgGRK2g NcXctcHMMgNswQ1ZPurWv5xIu+rKstuNavkETy5aCWLEEzpWJfQuW17WZPlx7oD8atZGLS NEV99+zJMAy5A63nAoMvc8WYJP005rfhaJmWkQC1Q4xMGhyDnGI7n2tk0G8XZg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=worcester-edu.20210112.gappssmtp.com header.s=20210112 header.b=rWZMlwZo; 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=worcester-edu.20210112.gappssmtp.com header.s=20210112 header.b=rWZMlwZo; 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: F0A659C1D X-Spam-Score: -1.85 X-Migadu-Scanner: scn1.migadu.com X-TUID: LT6KDw3f4Oxv 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/