GNU bug report logs - #70577
[PATCH] New command other-project-prefix

Previous Next

Package: emacs;

Reported by: Dmitry Gutov <dmitry <at> gutov.dev>

Date: Fri, 26 Apr 2024 03:03:21 UTC

Severity: wishlist

Tags: patch

Full log


View this message in rfc822 format

From: Dmitry Gutov <dmitry <at> gutov.dev>
To: Juri Linkov <juri <at> linkov.net>
Cc: 70577 <at> debbugs.gnu.org
Subject: bug#70577: [PATCH] New command other-project-prefix
Date: Sun, 26 May 2024 05:38:33 +0300
On 23/05/2024 09:24, Juri Linkov wrote:
>> -		     (eq this-command command))
>> +		     (eq this-original-command command)
> Actually the real problem is that in project--other-place-prefix
> prefix-command-preserve-state changes this-command to last-command.

This one might not be so bad (the idea, as documented, seems sensible).

Changing this-read-command seems more suspect.

But I guess it really means more checks would need to be done on 
this-original-command instead. :-/

The (eq this-original-command command) check could probably be dropped, 
but otherwise your addition looks good (I don't know any cases where 
this-original-command would be wrong, though apparently there might be 
some -- remappings of the prefix commands? seems an odd thing to do).

It might also be possible to rewrite 
display-buffer-override-next-command in a way that the installation of 
the "advice" (not actual advice in its case) happens in pre-command-hook 
- then at that point the current command hasn't had a chance to alter 
this-command.

prefun would check whether it needs to be applied, if yet, add the 
cleanup function to post-command-hook, and run the setup. The 
modification of display-buffer-overriding-action might also be better 
done there, so it doesn't alter any prompter UI in the next prefix 
command that might be invoked.

Not an urgent change, just something to consider.

Have you had a chance to run with the modified patch a little? Any edge 
new edge cases crop up?




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.