emacs-devel
[Top][All Lists]
Advanced

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

Re: master ce4ec17: Fix display-buffer-override-next-command to call act


From: Stefan Monnier
Subject: Re: master ce4ec17: Fix display-buffer-override-next-command to call action only once (bug#39722)
Date: Tue, 23 Jun 2020 00:09:06 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

>> I'm not sure how.  I think `C-x 4 4` followed by `C-u` will work thanks
>> to the (eq this-command command) check (because
>> `prefix-command-preserve-state` does (setq this-command last-command)),
>> but I don't think the reverse will work.
> Could you give an example of a key sequence where this might not work?

`C-u C-x 5 5 C-x =` won't display the extra info requested by the `C-u`.

You can still get it with `C-x 5 5 C-u C-x =`, but the user shouldn't
have to remember in which order prefix commands need to be entered.

> display-buffer-overriding-action has exactly the same format as
> display-buffer-fallback-action, and display-buffer-fallback-action
> holds a list of actions:
>
>   (defconst display-buffer-fallback-action
>     '((display-buffer--maybe-same-window  ;FIXME: why isn't this redundant?
>        display-buffer-reuse-window
>        display-buffer--maybe-pop-up-frame-or-window
>        display-buffer-in-previous-window
>        display-buffer-use-some-window
>        ;; If all else fails, pop up a new frame.
>        display-buffer-pop-up-frame))

Look again!  This is not a list of functions: it's a cons cell whose car
is a list of functions.

> Incidentally, the echo area feedback and the extra transient keymap
> is exactly what is currently discussed for project-switch-project
> where `C-x p p` displays a short menu in the echo area and reads keys
> to run commands from the project.el prefix keymap.

I was referring to the each area info also displayed by `C-u`, via
`prefix-command-echo-keystrokes-functions`.  Nothing fancy like a menu:
just a brief mention to reflect the fact that a prefix command is "about
to be applied".


        Stefan




reply via email to

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