From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id cFeOLDHHlV8uPwAA0tVLHw (envelope-from ) for ; Sun, 25 Oct 2020 18:42:57 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id ILBNKDHHlV+5SQAAB5/wlQ (envelope-from ) for ; Sun, 25 Oct 2020 18:42:57 +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 3E277940149 for ; Sun, 25 Oct 2020 18:42:57 +0000 (UTC) Received: from localhost ([::1]:55994 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kWkym-0004iR-7r for larch@yhetil.org; Sun, 25 Oct 2020 14:42:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52742) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kWkyc-0004iH-UG for guix-devel@gnu.org; Sun, 25 Oct 2020 14:42:46 -0400 Received: from mail-qt1-x834.google.com ([2607:f8b0:4864:20::834]:35836) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kWkyb-0000FP-6U for guix-devel@gnu.org; Sun, 25 Oct 2020 14:42:46 -0400 Received: by mail-qt1-x834.google.com with SMTP id c15so5207705qtc.2 for ; Sun, 25 Oct 2020 11:42: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=vzh2BaKxKMWPL8Av7baajRlDccOXv0tRETHg8eiTAX0=; b=CySCBYLqXAPMEQBY4oxnDQ8CAzQBOnicFFFlBrhgGMGUrXcjLo7eFEvLGALqxciYu+ jgJnZztQU/+h1ucHeDBdugLDUsLTbk/IeS4sN+EPrXroo5IYYBdWN7RgIAK17J7dqZT1 dSHA4EYrwSI7KI7j2YT6H4mi1jATmnTtWz307M5HcmREzC48SsgnumOB0G6PCwk9T0Li gp5K4Xhb42EX3M6SjF5MwGMK20ktHwXuvmNlNApzP/4ZhEIB0hkYPFGZcDZT0dKsrnEU lSiSQay4s85j8CCI+xCJzBW1Ih6Rn29Hol1ZDzicQ4XPsT7dE/HauQZLDYUkpfaBcXp4 axRA== 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=vzh2BaKxKMWPL8Av7baajRlDccOXv0tRETHg8eiTAX0=; b=Lt9Y+z9SGcjXIRIfdPN0UHTKhVuOEigPshu3uA+9ejTZk6tlco3OvQ9TDTlKSmUm74 x7G1Olrp/oNDYUn3hXktXvEg/8FYeyba8gIdJrgKLuDoQ+4gsXOL8PatfynzWS6elgqT Mn+g4Pj6pWl6wuVZ+KDFOWbRbC+I3A7jStaQ2iLlMIXq1jWnsf5cmrS9LI1C0uwrn7M2 Gaud/fQDQZwnp9Wl7Zyt7SkXuSQTKn5WQZnPyMooi/pxW882G8H3DmqkHw7qXFO9ul/k qTBDOW1xCZp60jtSNlNp7S0uTpd3f+2FZb1Ti8RWwSrd2zreXyERKFnjSV6sGsfEHbxc DKmA== X-Gm-Message-State: AOAM532GBbitD0zBIxA3BZJAQPHS5lFDsXIN80gh74YntbDYXSu/+ufZ Yl6WHSKK03zWK85BzOidZDBlgracXJA= X-Google-Smtp-Source: ABdhPJws9Fb1Yf1tMKSeDjFugJyXyVaJr/hbcThOja2IvC0bjqtV+PqjJroR0t0VGQ+AG8d34HsRFA== X-Received: by 2002:ac8:360e:: with SMTP id m14mr11119650qtb.99.1603651363007; Sun, 25 Oct 2020 11:42:43 -0700 (PDT) Received: from localhost.localdomain (dsl-10-129-233.b2b2c.ca. [72.10.129.233]) by smtp.gmail.com with ESMTPSA id x6sm3280092qto.48.2020.10.25.11.42.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 25 Oct 2020 11:42:42 -0700 (PDT) From: Maxim Cournoyer To: guix-devel@gnu.org Subject: [PATCH] .dir-locals.el: Automatically set the GEISER-GUILE-LOAD-PATH variable. Date: Sun, 25 Oct 2020 14:42:28 -0400 Message-Id: <20201025184228.2460-1-maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <87tuuixjno.fsf@gmail.com> References: <87tuuixjno.fsf@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2607:f8b0:4864:20::834; envelope-from=maxim.cournoyer@gmail.com; helo=mail-qt1-x834.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=pass header.d=gmail.com header.s=20161025 header.b=CySCBYLq; dmarc=pass (policy=none) header.from=gmail.com; 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: 2.29 X-TUID: RqxY8SBnWVl+ * .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 | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/.dir-locals.el b/.dir-locals.el index 19f15b3e1a..df5267ab8b 100644 --- a/.dir-locals.el +++ b/.dir-locals.el @@ -8,7 +8,31 @@ ;; 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). + ;; The checkout root directory name should be prefixed by "guix" for it + ;; to work correctly. + (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* (if (string-suffix-p "/" root-dir) + (substring root-dir 0 -1) + root-dir)) + (clean-geiser-guile-load-path + (seq-remove (lambda (x) + (string-match "/guix" x)) + geiser-guile-load-path))) + (setq geiser-guile-load-path + (cons root-dir* clean-geiser-guile-load-path)))))) + (c-mode . ((c-file-style . "gnu"))) (scheme-mode . -- 2.28.0