GNU bug report logs -
#70577
[PATCH] New command other-project-prefix
Previous Next
Full log
View this message in rfc822 format
On 21/05/2024 09:08, Juri Linkov wrote:
>> Here's a patch using symbol properties that makes the prefix commands work
>> combined in arbitrary order. At least according to my limited testing - and
>> only the commands that have this property set, of course.
>
> This works until I moved project-prompter to the beginning,
> then 'C-x 5 p p' doesn't work with this:
>
> (letrec ((root (funcall project-prompter))
> (depth (minibuffer-depth))
> (echofun (lambda () "[switch-project]"))
> (around-fun
>
> Maybe there is a better place?
Last I checked, the project-prompter can change the value of this-command.
Perhaps you can try a let-binding for this-command around the call to
project-prompter, so that it's restored at the end.
Something to also be concerned about is having any of the display-buffer
modifications, or other-project advices, get applied to one of the
commands inside the project-prompter UI (if it's implemented using a
sequence of commands). Perhaps I haven't triggered this case mostly by
luck so far. How to guard against that? Maybe a dynamic variable of some
sort. But then it'd also have to be checked uniformly in all such
functions (hooks that prefix commands install).
>> Something to discuss:
>> - A better name for the property? Maybe something longer would be more
>> obvious for an accidental reader.
>
> If it makes sense to use it outside of project.el
> then 'prefix-command' is fine.
>
>> - Applying it through 'declare' forms could be a more self-contained
>> approach.
>
> This could be added later as well.
This bug report was last modified 125 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.