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 #116 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: sbaugh <at> catern.com, 63648 <at> debbugs.gnu.org, Dmitry Gutov <dmitry <at> gutov.dev>
Subject: Re: bug#63648: 29.0.90; project.el: with switch-use-entire-map,
 switch-project errors on non-project commands
Date: Tue, 29 Aug 2023 16:36:15 -0400
Juri Linkov <juri <at> linkov.net> writes:

>>>>> I suggest you bring up this feature addition on emacs-devel, or otherwise
>>>>> wait for a review from Eli, at least.
>>>>>
>>>>> It's not a big addition, but it's a distinct new feature (the
>>>>> next-default-directory var).
>>>>
>>>> Indeed, such code addition better to be discussed on emacs-devel.
>>>
>>> Did this end up being discussed on emacs-devel?  I am still quite
>>> interested in this feature.
>>
>> Oh, another thought (which maybe should be discussed on emacs-devel):
>> maybe we don't need to make this specific next-default-directory var.
>>
>> Instead, maybe what we want is a way to bind a dynamic variable
>> *without* changing the buffer-local value.  It would shadow the existing
>> binding, but if we explicitly switched buffer we'd get back to the old
>> value.  So we'd have:
>>
>> (special-let ((default-directory newval))
>>   (assert default-directory newval))
>>
>> and
>>
>> (special-let ((default-directory newval))
>>   (set-buffer (current-buffer))
>>   (assert default-directory oldval))
>>
>> Ignore any complexities of implementing this and any complexities of the
>> semantics which I haven't covered.  If we had this, would it work as an
>> alternative to next-default-directory?
>
> There is no code where to bind a dynamic variable, because its value
> should be available for the next command in the command loop.

Oh, that's true.  (I guess maybe we could add a way to do that, and
other prefix commands could work that way too.  But that would be a big
effort - and worth talking about on emacs-devel)

> If you agree there is no other way to implement this than next-default-directory,
> then I could bring up the discussion on emacs-devel.

Yes, seems like that's the only way.




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.