unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
To: 43818-done@debbugs.gnu.org
Subject: bug#43818: Use of local-file in icecat-source definition breaks REPL
Date: Sat, 24 Oct 2020 00:55:16 -0400	[thread overview]
Message-ID: <87k0vg5ikr.fsf@gmail.com> (raw)
In-Reply-To: <878sckk22g.fsf@gmail.com> (Maxim Cournoyer's message of "Mon, 05 Oct 2020 13:36:07 -0400")

Hello,

Maxim Cournoyer <maxim.cournoyer@gmail.com> writes:

> CC: Mark H Weaver, one of the Icecat maintainer.
>
> Hello,
>
> The problem is that local-file doesn't work in Geiser.  This breaks
> working at the REPL:
>
> Enter `,help' for help.
> scheme@(guile-user)> ,m (gnu packages linux)
> While executing meta-command:
> ERROR:
>   1. &formatted-message:
>       format: "~a: patch not found\n"
>       arguments: ("icecat-use-older-reveal-hidden-html.patch")

Thanks for Christopher Baines on #guix who pointed that local-file
seemed to behave correctly at the REPL and Geiser (indeed!).  It made me
try to reproduce it in a --pure environment and I couldn't.

After a couple hours digging, I found that this snippet in my modified
.dir-locals file:

--8<---------------cut here---------------start------------->8---
(with-eval-after-load 'geiser-guile
  (let ((root-dir (locate-dominating-file
                   default-directory ".dir-locals.el")))
    (setq geiser-guile-load-path
          (cons root-dir
                (delete root-dir geiser-guile-load-path)))))
--8<---------------cut here---------------end--------------->8---

Was the culprit, especially the use of with-eval-after-load (which
turned out to be unnecessary).

This snippet allows to switch between git worktrees and always have the
geiser-guile-load-path (which configures both the Guile %load-path and
the %load-compiled-path) set correctly.

Here's the diff of my (fixed) .dir-locals in my Guix git checkout:

--8<---------------cut here---------------start------------->8---
~/src/guix$ git diff .dir-locals.el
diff --git a/.dir-locals.el b/.dir-locals.el
index 19f15b3e1a..0869fbaa20 100644
--- a/.dir-locals.el
+++ b/.dir-locals.el
@@ -8,7 +8,17 @@
      ;; For use with 'bug-reference-prog-mode'.
      (bug-reference-url-format . "http://bugs.gnu.org/%s")
      (bug-reference-bug-regexp
-      . "<https?://\\(debbugs\\|bugs\\)\\.gnu\\.org/\\([0-9]+\\)>")))
+      . "<https?://\\(debbugs\\|bugs\\)\\.gnu\\.org/\\([0-9]+\\)>")
+
+     ;; Emacs-Guix
+     (eval . (setq guix-directory
+                   (locate-dominating-file default-directory ".dir-locals.el")))
+     ;; Geiser
+     (eval . (let ((root-dir (locate-dominating-file
+                              default-directory ".dir-locals.el")))
+               (setq geiser-guile-load-path
+                     (cons root-dir
+                           (delete root-dir geiser-guile-load-path)))))))
  (c-mode          . ((c-file-style . "gnu")))
  (scheme-mode
   .
--8<---------------cut here---------------end--------------->8---

I am closing this issue, sorry for the noise!

Maxim




  parent reply	other threads:[~2020-10-24  4:56 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-05 17:36 bug#43818: Use of local-file in icecat-source definition breaks REPL Maxim Cournoyer
2020-10-05 17:39 ` Maxim Cournoyer
2020-10-24  4:55 ` Maxim Cournoyer [this message]
     [not found] ` <handler.43818.D43818.160351533211096.notifdone@debbugs.gnu.org>
2020-10-25  2:14   ` bug#43818: Use of local-file in icecat-source definition breaks REPL) Maxim Cournoyer
2020-10-25  5:52 ` bug#43818: [PATCH] packages: Fix a bug in %patch-path Maxim Cournoyer
2020-10-26 23:15   ` Ludovic Courtès
2020-10-27 16:41     ` Maxim Cournoyer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87k0vg5ikr.fsf@gmail.com \
    --to=maxim.cournoyer@gmail.com \
    --cc=43818-done@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).