bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#70577: [PATCH] New command other-project-prefix


From: Dmitry Gutov
Subject: bug#70577: [PATCH] New command other-project-prefix
Date: Sun, 5 May 2024 21:55:15 +0300
User-agent: Mozilla Thunderbird

On 05/05/2024 19:40, Juri Linkov wrote:
We would want 'C-h' to show the regular buffer with key bindings, won't we?
With similar output to the one that we get after 'C-x p C-h' or 'C-x
v C-h'. The output might be weirder because of the composed keymap, but it
could still be useful.

Then maybe something like

   (define-key map (vector help-char)
               (lambda () (interactive) (describe-bindings)))

or

   (define-key map (vector help-char)
               (lambda () (interactive) (describe-keymap (cons 'keymap 
(current-active-maps)))))

or

   (define-key map (vector help-char)
               (lambda () (interactive) (describe-keymap (cons 'keymap 
project-prefix-map))))

This actually seems unnecessary. See the attached latest version where the binding works automatically without explicit assignment.

However, a much bigger problem is that unfortunately many test cases from
https://debbugs.gnu.org/63648#203 are broken.  For example,
'C-x p p C-b' fails the same way as in bug#58784.
'C-x p p f M-n' fails because it expects to read arguments
in a previous project with an old value of default-directory, etc.

Thanks for noticing. Looks like the call to project-prompter can change the
value of this-command, and that's why the subsequent check went down the
wrong branch. See the attached v3 with the fix.

Wow, everything works now, will test more as a primary 'C-x p p' command.

Thanks, let me know if you find any other problems.

Attachment: other-project-prefix-v4.diff
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]