From: "Miguel Ángel Arruga Vivas" <rosen644835@gmail.com>
To: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Cc: guix-devel@gnu.org
Subject: Re: [PATCH] Automatically set `geiser-guile-load-path' from .dir-locals
Date: Mon, 16 Nov 2020 15:54:43 +0100 [thread overview]
Message-ID: <87r1otxsgc.fsf@gmail.com> (raw)
In-Reply-To: <87y2j2c4u1.fsf@gmail.com> (Maxim Cournoyer's message of "Sun, 15 Nov 2020 23:18:14 -0500")
[-- Attachment #1: Type: text/plain, Size: 2742 bytes --]
Hi Maxim and Christopher,
Maxim Cournoyer <maxim.cournoyer@gmail.com> writes:
>[...]
> Christopher Lemmer Webber <cwebber@dustycloud.org> writes:
> [...]
>> I figured out what was happening! The bug is *technically* in vc-mode.
>> However, nontheless it manifested here...
>>
>> Here's what happened. vc-mode has some various hacks, as you can see
>> above with "hack-local-variables-apply"... which traverses the dirlocals
>> stuff. (Not sure what the purpose is, didn't look too long.)
The file where these functions are located is lisp/files.el, right on
the Emacs core. Some modes add hooks there, like flyspell or cc, but
not vc, so I don't really think the problem is exclusive from that mode
after some debugging.
This code ends up in file-local-variables-alist, even though
dir-local-variables-alist contains the correct values for some reason I
still don't really understand.
>> However for whatever reason, vc-mode also seems to be reusing buffers
>> such as `*vc-diff*'... and somehow still is left in the directory
>> context it *first* was used in.
This may be the culprit but I think it isn't the issue, as
file-local-variables-alist accumulates every eval marked as nil, not
only the first/last one... when it fails, as we've seen.
>> Thus if I C-x v = in a guix-oriented buffer first, and then switch to
>> another completely different project and do the same, it's loading the
>> dirlocals from Guix(...!!!!)
>>
>> This is clearly a bug in vc-mode, I'll try to report it as such.
> Thank you for the investigation. I'd be really happy if you could
> report the problem upstream (M-x report-emacs-bug) aznd link to it here!
I haven't reported it yet, but as you can see I have a reproducer script
attached. I haven't seen anything in vc-code that points in that
direction, surely though Emacs people will have a better understanding.
Christopher, would you mind to CC me if you open the bug? I can do it
too if you tell me to, but I don't want to create a duplicate entry if
we do it roughly at the same time.
> [..] Miguel had written in IRC at the time of the initial report, but
> to no avail.
Maxim, could you test the script to check if we can narrow the cases?
It shows the README in the emacs it opens, so it should be
straight-forward.
>> In the meanwhile, I used this hacky "fix". Maybe worth applying for the
>> moment... what do you think of it?
>
> I'd like to have the upstream bug linked in that fix rather than the
> Guix one; that way it'll be possible to track upstream resolution and
> know when the workaround can be removed.
Apart from the tracking reference, I agree that it's worth applying it.
And also, thank you both for making easier to work on guix. :-)
Happy hacking!
Miguel
[-- Attachment #2: reproducer --]
[-- Type: application/x-sh, Size: 801 bytes --]
next prev parent reply other threads:[~2020-11-16 14:55 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-25 18:08 [PATCH] Automatically set `geiser-guile-load-path' from .dir-locals Maxim Cournoyer
2020-10-25 18:13 ` Pierre Neidhardt
2020-10-25 18:42 ` [PATCH] .dir-locals.el: Automatically set the GEISER-GUILE-LOAD-PATH variable Maxim Cournoyer
2020-10-25 18:52 ` Pierre Neidhardt
2020-10-25 21:37 ` Maxim Cournoyer
2020-10-25 21:01 ` Miguel Ángel Arruga Vivas
2020-10-26 5:47 ` Maxim Cournoyer
2020-10-26 5:53 ` [PATCH v2] " Maxim Cournoyer
2020-10-26 7:56 ` Pierre Neidhardt
2020-10-26 11:38 ` Miguel Ángel Arruga Vivas
2020-10-27 16:53 ` Maxim Cournoyer
2020-10-27 18:58 ` Miguel Ángel Arruga Vivas
2020-10-27 17:44 ` [PATCH v3] " Maxim Cournoyer
2020-10-31 4:19 ` Maxim Cournoyer
2020-11-01 1:02 ` Miguel Ángel Arruga Vivas
2020-10-26 13:43 ` [PATCH] Automatically set `geiser-guile-load-path' from .dir-locals zimoun
2020-10-26 15:03 ` Pierre Neidhardt
2020-11-05 2:20 ` Christopher Lemmer Webber
2020-11-05 4:00 ` Christopher Lemmer Webber
2020-11-05 9:25 ` Miguel Ángel Arruga Vivas
2020-11-05 17:26 ` Christopher Lemmer Webber
2020-11-14 19:57 ` Christopher Lemmer Webber
2020-11-16 4:18 ` Maxim Cournoyer
2020-11-16 14:54 ` Miguel Ángel Arruga Vivas [this message]
2020-11-16 17:41 ` Christopher Lemmer Webber
2020-11-16 18:07 ` Christopher Lemmer Webber
2020-11-16 20:57 ` Miguel Ángel Arruga Vivas
2020-11-16 23:09 ` Christopher Lemmer Webber
2020-11-17 15:36 ` Maxim Cournoyer
2020-11-18 10:12 ` Miguel Ángel Arruga Vivas
2020-11-05 14:21 ` 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=87r1otxsgc.fsf@gmail.com \
--to=rosen644835@gmail.com \
--cc=guix-devel@gnu.org \
--cc=maxim.cournoyer@gmail.com \
/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).