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 iPoXFR26sl8MEgAA0tVLHw (envelope-from ) for ; Mon, 16 Nov 2020 17:42:53 +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 cH/cEB26sl8CaQAAB5/wlQ (envelope-from ) for ; Mon, 16 Nov 2020 17:42:53 +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 E9B239401CD for ; Mon, 16 Nov 2020 17:42:52 +0000 (UTC) Received: from localhost ([::1]:39628 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1keiWh-0003qY-Ud for larch@yhetil.org; Mon, 16 Nov 2020 12:42:51 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:53998) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1keiWS-0003pY-L5 for guix-devel@gnu.org; Mon, 16 Nov 2020 12:42:36 -0500 Received: from dustycloud.org ([2600:3c02::f03c:91ff:feae:cb51]:53184) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1keiWQ-0006Tk-Oj; Mon, 16 Nov 2020 12:42:36 -0500 Received: from twig (localhost [127.0.0.1]) by dustycloud.org (Postfix) with ESMTPS id E13FA26650; Mon, 16 Nov 2020 12:41:51 -0500 (EST) References: <87tuuixjno.fsf@gmail.com> <87zh3w5ytp.fsf@dustycloud.org> <87wnz05u7d.fsf@dustycloud.org> <87tuu46tqm.fsf@gmail.com> <87lff3iueo.fsf@dustycloud.org> <87y2j2c4u1.fsf@gmail.com> <87r1otxsgc.fsf@gmail.com> User-agent: mu4e 1.4.13; emacs 27.1 From: Christopher Lemmer Webber To: Miguel =?utf-8?Q?=C3=81ngel?= Arruga Vivas Subject: Re: [PATCH] Automatically set `geiser-guile-load-path' from .dir-locals In-reply-to: <87r1otxsgc.fsf@gmail.com> Date: Mon, 16 Nov 2020 12:41:16 -0500 Message-ID: <877dqlgpxf.fsf@dustycloud.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2600:3c02::f03c:91ff:feae:cb51; envelope-from=cwebber@dustycloud.org; helo=dustycloud.org X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-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: guix-devel@gnu.org, Maxim Cournoyer Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: "Guix-devel" X-Scanner: ns3122888.ip-94-23-21.eu Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=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: -1.01 X-TUID: jA66veza6Hou Miguel =C3=81ngel Arruga Vivas writes: > Hi Maxim and Christopher, > > Maxim Cournoyer writes: >>[...] >> Christopher Lemmer Webber 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 =3D 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. It sounds like you're already putting together the work to do it. If you don't mind doing it that would save me a lot of time right now... I'm quite swamped! I'd be very grateful! >> [..] 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. :-) Okay cool; since you two have already basically reviewed this code I'll just make the suggested change and push it to the master branch. Thank you!