emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#43818: closed (Use of local-file in icecat-source definition breaks


From: GNU bug Tracking System
Subject: bug#43818: closed (Use of local-file in icecat-source definition breaks REPL)
Date: Sat, 24 Oct 2020 04:56:02 +0000

Your message dated Sat, 24 Oct 2020 00:55:16 -0400
with message-id <87k0vg5ikr.fsf@gmail.com>
and subject line Re: bug#43818: Use of local-file in icecat-source definition 
breaks REPL
has caused the debbugs.gnu.org bug report #43818,
regarding Use of local-file in icecat-source definition breaks REPL
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs@gnu.org.)


-- 
43818: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=43818
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems
--- Begin Message --- Subject: Use of local-file in icecat-source definition breaks REPL Date: Mon, 05 Oct 2020 13:36:07 -0400
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")

Any ideas of what could be done about it?

Maxim



--- End Message ---
--- Begin Message --- Subject: Re: bug#43818: Use of local-file in icecat-source definition breaks REPL Date: Sat, 24 Oct 2020 00:55:16 -0400 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)
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


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]