From: Juri Linkov <juri@linkov.net>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org
Subject: Re: master ce4ec17: Fix display-buffer-override-next-command to call action only once (bug#39722)
Date: Tue, 23 Jun 2020 03:01:18 +0300 [thread overview]
Message-ID: <874kr24p5l.fsf@mail.linkov.net> (raw)
In-Reply-To: <jwv4kr3dbku.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Sun, 21 Jun 2020 23:38:10 -0400")
>>>> Fix display-buffer-override-next-command to call action only once (bug#39722)
>>> How do prefix commands using `display-buffer-override-next-command`
>>> interact with other prefix commands such as `C-u`?
>> They play nicely with all prefix commands, and even with the minibuffer:
>> display-buffer-override-next-command comes into play only after exiting
>> the minibuffer.
>
> 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?
> Another problem I see in the code is that
> `display-buffer-override-next-command` does
>
> (setq display-buffer-overriding-action
> (delq action display-buffer-overriding-action))
> [...]
> (push action display-buffer-overriding-action)))
>
> But `display-buffer-overriding-action` is not supposed to hold a list
> of actions.
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))
"Default fallback action for `display-buffer'.
This is the action used by `display-buffer' if no other actions
have been specified, for example, by the user options
`display-buffer-alist' or `display-buffer-base-action', or they
all fail. It should never be set by programs or users. See
`display-buffer'.")
>>> Any chance this can be merged/unified with `other-frame-window` code?
>> What features do you miss from other-frame-window?
>
> I'm not really worried about features but more about the code and about
> what we've learned about the detailed interactions (i.e. trying to avoid
> reinventing the same not-quite-circular wheel). In terms of features
> (besides the extra transient keymap which allows the use of shorter `C-x
> 4` and `C-x 5` prefixes and special bindings under those prefixes)
> I suspect that there's the echo area feedback that's missing, tho I'm
> not sure it works really well yet in `other-frame-window`.
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. But I'm not sure
if `C-x 4` and `C-x 5` should be bound to a command like that.
next prev parent reply other threads:[~2020-06-23 0:01 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20200621233622.23590.68753@vcs0.savannah.gnu.org>
[not found] ` <20200621233623.C811520A26@vcs0.savannah.gnu.org>
2020-06-22 0:29 ` master ce4ec17: Fix display-buffer-override-next-command to call action only once (bug#39722) Stefan Monnier
2020-06-22 0:35 ` Juri Linkov
2020-06-22 3:38 ` Stefan Monnier
2020-06-23 0:01 ` Juri Linkov [this message]
2020-06-23 4:09 ` Stefan Monnier
2020-06-23 23:45 ` Juri Linkov
2020-06-24 5:14 ` Stefan Monnier
2020-06-24 23:58 ` Juri Linkov
2020-06-28 22:14 ` Juri Linkov
2020-06-29 12:29 ` Stefan Monnier
2020-06-29 22:43 ` Juri Linkov
2020-06-30 2:48 ` Stefan Monnier
2020-06-30 8:52 ` Kévin Le Gouguec
2020-06-30 21:31 ` Juri Linkov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=874kr24p5l.fsf@mail.linkov.net \
--to=juri@linkov.net \
--cc=emacs-devel@gnu.org \
--cc=monnier@iro.umontreal.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).