From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id EBfuOmz0MmNvDgAAbAwnHQ (envelope-from ) for ; Tue, 27 Sep 2022 15:02:37 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id wO0DOmz0MmOHkQAAG6o9tA (envelope-from ) for ; Tue, 27 Sep 2022 15:02:36 +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 89A7626862 for ; Tue, 27 Sep 2022 15:02:36 +0200 (CEST) Received: from localhost ([::1]:50658 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1odAE7-00052S-OB for larch@yhetil.org; Tue, 27 Sep 2022 09:02:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54744) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1od8X1-0000oh-U2 for guix-devel@gnu.org; Tue, 27 Sep 2022 07:13:45 -0400 Received: from mail-lf1-x12a.google.com ([2a00:1450:4864:20::12a]:39802) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1od8Wv-0006rE-UF for guix-devel@gnu.org; Tue, 27 Sep 2022 07:13:40 -0400 Received: by mail-lf1-x12a.google.com with SMTP id a2so15161526lfb.6 for ; Tue, 27 Sep 2022 04:13:37 -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=B/sQePOM1pMJtiRdPPhxODxpcMK1FbFb6kWXUEwZ75k=; b=8TbAjSmNp9M704hrBrqH/WLTfIBUM3SbWaFnD5k4Wg1nZLGMI3BBcZscvM7ugkvePW +3jmyr44XXLNLr57WULsqS8YJ3Q5X0rxRUkYCjViqfBf+Gc3pcy0jmks8iKk5zCKGRgh w0Ec8ClBgKnpa6gZA7cmj56t9kER/NBI3n9Na+lAb9Pus6PGeUVSkbGGDbGo/0pw00vi xKu4lSSSG23GxX9HS3r4MlYD1KoVaL8z8uxk7JP9kzyrzos9vs8jVL+LgF4DmNfee2c3 lJ1nEIz4aB6me0Wp2anGBkOAxIksrlqrGcfvbIAPUgVPNBVl8Cutn9V3OblrjhMS7AYL 0/mA== 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=B/sQePOM1pMJtiRdPPhxODxpcMK1FbFb6kWXUEwZ75k=; b=t6M3Kqn5ltRWzWA8qGrRgnM4r42J9wmr0e5b/EV9qY0+AtqIrd/6PxACxrWsHIO59b UnJ1BkRq9B0q8Ft72F6SZtnxrxhep3MQ6VAz1YHgo6I+76q4qfYtRW+KB7TqPnVT8Z/F x6F+MMbdtR6Csjc+Murcjs0IWx+JXmU0JrQ3GZroJ/Nc4V1UehHhEet/qxeaBr6CRRb0 hsG4oU/baichwbz8cmY43wGh5MUjvTDQtkEUwb/i8NwARhKKVZTOd8NqlAgLn+ZnmWWy 5imikfh7re7gSrAYmMLZDvv+sqt1qnHtfI+LK2iHpq1oBiw7etfHF4FC5UdT6SX+rjiX 5WAA== X-Gm-Message-State: ACrzQf0lE0Ryoge2Se2OUGJmuNUjiJ+YIbOWc0g9jnpg4VY8x9m9jx4U yrqTOhpvv7Jg5Ex0Mn5/FXgEzOI/V0UJs1l68puSWg== X-Google-Smtp-Source: AMsMyM44M8zD7tNIJzHXqrTSMF0EASrsLn3VQSyDKQMWEDWjt8a4Jo7nmY5vqkVL20jLBGIRFyNhRibgLF+6uhP/nOw= X-Received: by 2002:a05:6512:1151:b0:4a0:50f2:9509 with SMTP id m17-20020a056512115100b004a050f29509mr9552223lfg.297.1664277214712; Tue, 27 Sep 2022 04:13:34 -0700 (PDT) MIME-Version: 1.0 References: <87czbiugxn.fsf@laura> <87k05py1sf.fsf@gmail.com> In-Reply-To: <87k05py1sf.fsf@gmail.com> From: "Thompson, David" Date: Tue, 27 Sep 2022 07:13:22 -0400 Message-ID: Subject: Re: Emacs integration for 'guix shell' To: Maxim Cournoyer Cc: "Olivier Dion via Development of GNU Guix and the GNU System distribution." , Olivier Dion Content-Type: text/plain; charset="UTF-8" Received-SPF: pass client-ip=2a00:1450:4864:20::12a; envelope-from=dthompson2@worcester.edu; helo=mail-lf1-x12a.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=1664283756; 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=B/sQePOM1pMJtiRdPPhxODxpcMK1FbFb6kWXUEwZ75k=; b=VH5QsmuB83Rg1Fnr561SiRj5bjTf65pTI9DlQqyC4bzLGQ1GYVEXfCfQAZoPEYqrf0aKKk whVTzasL+5imZqdEjLBQrQyD87PQcfy/1NzCIaFTn/2rjgc/y6JRy75Gyc2UMV7S6aHkvl w+BTZOkncrfwhmNKSizBwXXZJOY7eUz/bcVwvDpXWWvpptRJAS9YL3GWrv3IvqexII6VZ3 ntO33g+DOSoCXWxRzQYdIytdIOsTwtYKIYV+EvuRW4hM0rCdfUxA78/LM4ovmfDD4KW9hB UrFDz43XyooasUr3pLKPyvpt+bo3T1nbGd2Uj30xV4ecjidferRdCk/oE3g5MA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1664283756; a=rsa-sha256; cv=none; b=b2bZMpqWJYvreFPCI8tk6f/i7HPG6Erok+jI8D4a/fgF4vwH/ZKxzOFjgD7ijypxsaG4tD WyPxlBG2usMVJISLNTSJg3k4Ca6Qftc0ToExJ5o+5gjy4iKTc9qzqVgPT/qCbfTH++JI6j cSOjR8IfJtm5/4rhYJt7Xh95hMAdxoZC1ImoDJ/UsX4tHlFU8q7gu3Wbm8xrQnVgdE9kSV 3NxGQTmYXarpcJeQyJXzWcshB/0qgK3FLTPKp4oNgVNS6GELofosXEdpkkvc9rWIzzq44z tVBoZ+GxVmoePirpwV2oYmfq1/FH4kLY+erqDWn98Vnf70GlhbVKDlp67haHCw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=worcester-edu.20210112.gappssmtp.com header.s=20210112 header.b=8TbAjSmN; 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.84 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=worcester-edu.20210112.gappssmtp.com header.s=20210112 header.b=8TbAjSmN; 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: 89A7626862 X-Spam-Score: -1.84 X-Migadu-Scanner: scn1.migadu.com X-TUID: Lv5JWZFCQ//o On Mon, Sep 26, 2022 at 10:44 PM Maxim Cournoyer wrote: > > Hi, > > Olivier Dion via "Development of GNU Guix and the GNU System > distribution." writes: > > [...] > > > I have the following in my .dir-locals.el for my library libpatch. The > > idea is the same, but without direnv: > > > > ((nil > > . ((eval . > > (let ((root (locate-dominating-file > > default-directory ".dir-locals.el"))) > > (when root > > (let ((real-root (directory-file-name (expand-file-name root)))) > > (setq-local geiser-guile-binary (concat real-root "/.geiser-guile")) > > (setq-local projectile-project-compilation-cmd > > (concat real-root "/.projectile-compile")) > > (setq-local projectile-project-test-cmd > > (concat real-root "/.projectile-test"))))))))) > > > > It seems to me it'd help everyone if Geiser should handle the above by > itself. It'd be cool to have the above functionality merged into Geiser > itelf. Just saying; thank you for sharing! With Emacs 28 and new versions of Geiser (such as the one in Guix) I highly recommend enabling per-project REPLs. By setting geiser-repl-per-project-p to 't', commands like M-x run-guile and C-c C-a will open/switch to a REPL associated with the current project as determined by project.el. This is useful for when you are working on multiple projects at once as it makes it harder to mix up REPLs, but Geiser also automatically inserts the project root directory into Guile's load path. When combined with emacs-direnv, emacs-envrc, emacs-buffer-env, or emacs-guix-shell, the Guile binary that Geiser uses when launching a per-project REPL will be the one from the 'guix shell' profile, and it will honor the GUILE_LOAD_PATH/GUILE_LOAD_COMPILED_PATH settings. So now, at long last, my Geiser REPLs automatically use the proper build of Guile, it can load the external libraries my project depends on, *and* it can load my local project modules. I'm quite happy with this setup. Maybe I could write a blog post specifically about setting up a Guile development environment with Guix and include all these details. - Dave