GNU bug report logs - #69242
project-any-command with overriding-local-map

Previous Next

Package: emacs;

Reported by: Juri Linkov <juri <at> linkov.net>

Date: Sun, 18 Feb 2024 18:25:08 UTC

Severity: normal

Fixed in version 30.0.50

Done: Juri Linkov <juri <at> linkov.net>

Bug is archived. No further changes may be made.

Full log


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

From: Juri Linkov <juri <at> linkov.net>
To: Dmitry Gutov <dmitry <at> gutov.dev>
Cc: 69242 <at> debbugs.gnu.org
Subject: Re: bug#69242: project-any-command with overriding-local-map
Date: Sun, 25 Feb 2024 09:33:17 +0200
close 69242 30.0.50
thanks

> LGTM, thanks. Let's see if this one triggers any other edge cases we didn't
> test for.

Ok, now pushed to master.

>> Also not sure how 'overriding-terminal-local-map' will affect
>> 'universal-argument' that relies on 'overriding-terminal-local-map'.
>> Maybe project.el should use
>>    (internal-push-keymap map 'overriding-terminal-local-map)
>> like in 'set-transient-map'.  Ok, need to try and test this more.
>
> Please do.

Regarding 'universal-argument', I discovered that currently e.g.
'C-x p p RET C-u C-c C-a' keeps the argument, but loses default-directory
(i.e. sets default-directory back to the old directory).

So tried a patch below, and it keeps default-directory,
but loses the argument.

@@ -1883,7 +1886,11 @@ project-any-command
           (let ((project-current-directory-override root))
             (call-interactively command))
         (let ((default-directory root))
-          (call-interactively command))))))
+          (call-interactively command)))
+      (when (memq command
+                  '( universal-argument universal-argument-more
+                     digit-argument negative-argument))
+        (project-any-command overriding-map prompt-format)))))

Then tried 'C-u C-x p p RET C-c C-a' and it keeps default-directory
and also keeps the C-u argument for 'C-c C-a' after switching the project.

This means no more changes needed because the above key sequence works nicely.
So now closing.




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

Previous Next


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