GNU bug report logs -
#69242
project-any-command with overriding-local-map
Previous Next
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
View this message in rfc822 format
>> And indeed evaluating in a*vc-diff* buffer:
>> M-: (let ((overriding-local-map project-prefix-map)) (key-binding
>> (read-key-sequence "? ") t))
>> returns nil for any longer than 1-key binding such as 'C-c C-a' or 'C-c
>> RET a'.
>
> I suppose that's because you are entering a sequence that belongs to
> a local map (diff-mode-map), and overriding-local-map overrides them
> entirely ("INSTEAD OF" in the docstring), rather than having a higher
> priority, which is overriding-terminal-local-map does.
>
>> Then found this patch fixes the problem completely (no idea why):
>> @@ -1871,7 +1874,7 @@ project-any-command
>> (interactive)
>> (let* ((pr (project-current t))
>> (prompt-format (or prompt-format "[execute in %s]:"))
>> - (command (let ((overriding-local-map overriding-map))
>> + (command (let ((overriding-terminal-local-map overriding-map))
>> (key-binding (read-key-sequence
>> (format prompt-format (project-root pr)))
>> t)))
>
> LGTM, thanks. Let's see if this one triggers any other edge cases we didn't
> test for.
There is another use of 'overriding-local-map' in project.el:
in 'project--switch-project-command'. Not sure if this should be
replaced with 'overriding-terminal-local-map' as well.
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.
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.