unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#69242: project-any-command with overriding-local-map
@ 2024-02-17 17:17 Juri Linkov
  2024-02-19 16:01 ` Dmitry Gutov
  0 siblings, 1 reply; 5+ messages in thread
From: Juri Linkov @ 2024-02-17 17:17 UTC (permalink / raw)
  To: 69242; +Cc: Dmitry Gutov

With 'project-switch-commands' customized to 'project-prefix-or-any-command'
tried to do such a useful thing as applying a diff to a sibling project
with the same source tree:

C-x v =
C-x p p RET
C-c RET a     (diff-apply-buffer)

But it failed with an undefined key.

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'.

Then found this patch fixes the problem completely (no idea why):

diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el
index aa92a73336e..fe866312931 100644
--- a/lisp/progmodes/project.el
+++ b/lisp/progmodes/project.el
@@ -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)))





^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-02-25  7:33 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-17 17:17 bug#69242: project-any-command with overriding-local-map Juri Linkov
2024-02-19 16:01 ` Dmitry Gutov
2024-02-20  7:49   ` Juri Linkov
2024-02-22  3:42     ` Dmitry Gutov
2024-02-25  7:33       ` Juri Linkov

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).