From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id 8DqUMXdkll+jFQAA0tVLHw (envelope-from ) for ; Mon, 26 Oct 2020 05:53:59 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id INFoLXdkll8hdAAAbx9fmQ (envelope-from ) for ; Mon, 26 Oct 2020 05:53:59 +0000 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 77E8D9402A7 for ; Mon, 26 Oct 2020 05:53:59 +0000 (UTC) Received: from localhost ([::1]:41758 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kWvSA-0001wt-FZ for larch@yhetil.org; Mon, 26 Oct 2020 01:53:58 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47324) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kWvRz-0001wf-8x for guix-devel@gnu.org; Mon, 26 Oct 2020 01:53:47 -0400 Received: from mail-il1-x133.google.com ([2607:f8b0:4864:20::133]:39534) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kWvRw-0005lL-Sq for guix-devel@gnu.org; Mon, 26 Oct 2020 01:53:46 -0400 Received: by mail-il1-x133.google.com with SMTP id q1so7142597ilt.6 for ; Sun, 25 Oct 2020 22:53:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=m/Og50wJziG/TG3Pa91PW9HBDGIlOyuWMWrCZ+JMQxI=; b=Mzn9EfQNPlUgVo016gB+R8ruhkdMS3r9YAAGXQlMK53MEZnqF3G81h9bEwwpfAxi2w YUzv8Nt4QM8RnGcNZMWoeD/Bhjm/NJHgEjPZ1yLKbG2PwIYdtmXKCPVC5sXZ352bPiIe ezzZO3nSrD95AuFAUM1qMoe2JHuGMy+57tTJBPJhXf0cGJZ/ZsgTiCNUIh7pjUdjuR/s 2BOML6PGewXqDcsDPkhCeSs/Mgz/YufNq+fTkfJ2EX8CWIheiL5H3jiy3pU4u9BU7rZ6 vRip0jUv/YVvtExfDU3T5VTOewcHkyoruJXK1xjlZG5377kmuqQ3ZrMoKR05MDoFrLFW WS8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=m/Og50wJziG/TG3Pa91PW9HBDGIlOyuWMWrCZ+JMQxI=; b=kE8qb11XNEr30YquypBbMl4hfvgAcdzuc8jGcbGzZshgL47kupVLSKwGPVEdinnpiT 52EPvAOfTl5jj7QF7wZIwvvwqPtor0Anm4BIeFAPU7GkxzQL1OWzs2ues67kzw32SwSC NpR8a2rEUgYsfnlibszYx+1qub8VH/TPQo/mnDV3IFZzvzLY8ke3hohOzbjHdcdnqfle O8lY18L/sp41ZglNWu3tfqdNVGtIP2KTTGJR0XHx+BH+Ycg/7t9flqWDPm344jL1SjwV oeuGZsuP8vAIk6ZkihzuHppxHyshi6LjlWeVj9U48C8esW6o/8T/uwEYXMC8VHHwRlK6 1V0g== X-Gm-Message-State: AOAM531Eb+Qys3WXmWAPjql6FERiDyesIL1zlgLeHsOzlyJdWsB6xASX oTYbvQrK39uE8a2tEWUYINTnnlaJ2sbiEg== X-Google-Smtp-Source: ABdhPJxPDAtYecMs1GskygbU+b9W2RoIgZzD9hHow0gojBWxogPooF5GERW8PJK7Iat+SctfKPXyjQ== X-Received: by 2002:a05:6e02:1305:: with SMTP id g5mr9971425ilr.237.1603691623793; Sun, 25 Oct 2020 22:53:43 -0700 (PDT) Received: from localhost.localdomain (dsl-10-129-233.b2b2c.ca. [72.10.129.233]) by smtp.gmail.com with ESMTPSA id w15sm3296740ilm.57.2020.10.25.22.53.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 25 Oct 2020 22:53:43 -0700 (PDT) From: Maxim Cournoyer To: guix-devel@gnu.org Subject: [PATCH v2] .dir-locals.el: Automatically set the GEISER-GUILE-LOAD-PATH variable. Date: Mon, 26 Oct 2020 01:53:16 -0400 Message-Id: <20201026055316.25592-1-maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <87o8kqowa5.fsf@gmail.com> References: <87o8kqowa5.fsf@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2607:f8b0:4864:20::133; envelope-from=maxim.cournoyer@gmail.com; helo=mail-il1-x133.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, FREEMAIL_FROM=0.001, 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.23 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Maxim Cournoyer Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: "Guix-devel" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=fail (rsa verify failed) header.d=gmail.com header.s=20161025 header.b=Mzn9EfQN; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-devel-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-devel-bounces@gnu.org X-Spam-Score: 4.09 X-TUID: c5eMAxJ4JCiJ * .dir-locals.el: Set the GUIX-DIRECTORY and GEISER-GUILE-LOAD-PATH Emacs variables based on the location of the .dir-locals file. --- .dir-locals.el | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/.dir-locals.el b/.dir-locals.el index 19f15b3e1a..68df95a6d5 100644 --- a/.dir-locals.el +++ b/.dir-locals.el @@ -8,7 +8,26 @@ ;; For use with 'bug-reference-prog-mode'. (bug-reference-url-format . "http://bugs.gnu.org/%s") (bug-reference-bug-regexp - . ""))) + . "") + + ;; Emacs-Guix + (eval . (setq guix-directory + (locate-dominating-file default-directory ".dir-locals.el"))) + + ;; Geiser + ;; This allows automatically setting the `geiser-guile-load-path' + ;; variable when using various Guix checkouts (e.g., via git worktrees). + (eval . (let* ((root-dir (expand-file-name + (locate-dominating-file + default-directory ".dir-locals.el"))) + ;; Workaround for bug https://issues.guix.gnu.org/43818. + (root-dir* (directory-file-name root-dir))) + (unless (fboundp 'geiser-guile-load-path) + (defvar geiser-guile-load-path '())) + (make-local-variable 'geiser-guile-load-path) + (cl-pushnew root-dir* geiser-guile-load-path + :test #'string-equal))))) + (c-mode . ((c-file-style . "gnu"))) (scheme-mode . -- 2.28.0