[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#69242: project-any-command with overriding-local-map
From: |
Juri Linkov |
Subject: |
bug#69242: project-any-command with overriding-local-map |
Date: |
Sun, 25 Feb 2024 09:33:17 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) |
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.