GNU bug report logs - #63648
29.0.90; project.el: with switch-use-entire-map, switch-project errors on non-project commands

Previous Next

Package: emacs;

Reported by: Spencer Baugh <sbaugh <at> janestreet.com>

Date: Mon, 22 May 2023 16:29:02 UTC

Severity: normal

Found in version 29.0.90

Done: Dmitry Gutov <dmitry <at> gutov.dev>

Bug is archived. No further changes may be made.

Full log


Message #164 received at 63648 <at> debbugs.gnu.org (full text, mbox):

From: Spencer Baugh <sbaugh <at> janestreet.com>
To: Juri Linkov <juri <at> linkov.net>
Cc: Dmitry Gutov <dmitry <at> gutov.dev>, 63648 <at> debbugs.gnu.org, sbaugh <at> catern.com
Subject: Re: bug#63648: 29.0.90; project.el: with switch-use-entire-map,
 switch-project errors on non-project commands
Date: Mon, 11 Sep 2023 16:16:13 -0400
Juri Linkov <juri <at> linkov.net> writes:

>> Thinking about it, I guess there's (roughly) two classes of commands
>> which want different things from default-directory, classes 1 and 2:
>>
>> 1. wants whatever the current value of default-directory is (and gets
>> this by just using default-directory as a variable)
>>
>> 2. wants the value of default-directory for some specific buffer X (and
>> gets this either with buffer-local-value or by using
>> with-current-buffer)
>>
>> If we could change 1 without changing 2, then we'd be happy.
>
> I think we can't solve this logical paradox because it contains
> self-contradictory requirements.  Here is the command that
> illustrates this paradox.  What should this command print?
>
>   C-x p p ... C-h v default-directory RET
>
> Like Schrödinger's cat, it belongs simultaneously to both classes:
>
> 1. wants to print the new value of default-directory
>    because 'C-h v' is the next command for which
>    the value of default-directory was explicitly set.
>
> 2. wants to print the original value of default-directory
>    because 'C-h v' was invoked in the buffer where
>    the value of default-directory should stay unchanged.

I would argue that it's in class 1.  Or at least, it would make sense
for C-h v to print the new value.




This bug report was last modified 1 year and 200 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.