From: Alan Mackenzie <acm@muc.de>
To: Eli Zaretskii <eliz@gnu.org>
Cc: rudalics@gmx.at, 56305@debbugs.gnu.org, monnier@iro.umontreal.ca,
acm@muc.de
Subject: bug#56305: 29.0.50; 'yes-or-no-p' deselects minibuffer frame
Date: Mon, 11 Jul 2022 17:15:08 +0000 [thread overview]
Message-ID: <YsxanDhgeULKWUQN@ACM> (raw)
In-Reply-To: <83fsj7zjkw.fsf@gnu.org>
Hello, Eli.
On Mon, Jul 11, 2022 at 19:43:11 +0300, Eli Zaretskii wrote:
> > Date: Mon, 11 Jul 2022 16:22:21 +0000
> > Cc: Eli Zaretskii <eliz@gnu.org>, monnier@iro.umontreal.ca,
> > 56305@debbugs.gnu.org, acm@muc.de
> > From: Alan Mackenzie <acm@muc.de>
> > > So you implemented 'minibuffer-follows-selected-frame' despite the fact
> > > that multiple frames hardly make sense on your usual setup?
> > That's not a fact. I typically run with several/many frames on my tty.
> > Six, or even nine, is not uncommon. I switch between them using the
> > <Fn> keys. The minibuffer not staying in "its own" frame was annoying
> > me quite a bit.
> I hope you'll agree that focus redirection is not very relevant to TTY
> frames. There, the top-most frame is the only one visible, and by
> definition it has the focus.
I think we're in violent agreement here.
> > > Note that sometimes selecting a window is not enough to show it, or
> > > make its frame the top-most frame on display: you may also need to
> > > raise the frame or make sure input focus is directed to that frame.
> > That sounds like the text from a bug report. Selecting a window should
> > either do all these GUI things, or it shouldn't do them. "Sometimes"
> > feels like an apology for failing to fix a bug before a release.
> Please don't forget that Emacs is not entirely in control of what
> happens here: the window manager is also an important part of this
> dance, and it has its own ideas about which frame should be raised and
> which should be given focus. It is unreasonable to expect Emacs to be
> able to work around every idiosyncratic aspect of the behavior of
> every window manager, let alone customized by users.
Perhaps that "sometimes" could be expanded upon. How is the Lisp hacker
supposed to know when she's got to raise or focus the frame in addition
to selecting a window?
> > > wouldn't make sense if in a majority of cases selecting a window
> > > would _not_ also raise its frame and direct input focus to it.
> > So why can't we make select-window _always_ raise its frame and get
> > input focus?
> Because it's wrong! If I want to type into a window, it does NOT mean
> I want that window's frame raise! Imagine a situation where I look at
> some text in one frame and type something into another frame: I can
> legitimately want to see all of the text I'm reading, but only a small
> portion of the text into which I'm writing.
OK, but that doesn't really address the point I was trying to make. That
is, that select-window (and other functions too) should have an
unambiguous, clear function, which should be unambiguously documented.
Whether select-window raises the frame or not (and you say here not), it
should _always_ either do it or not do it. There shouldn't be a
"sometimes" in the doc. It is these "sometimes"es which lead to bugs
like the current one.
> Automatically raising a frame in this case would be an annoyance, since
> each time I move the focus into the "typing" frame, it would raise and
> obscure my "reading" frame.
OK, so maybe we could agree that select-window ought to move focus onto
the target frame, but not raise it (modulo fascistic window managers).
Then we'd probably want a separate function which does raise that frame.
My larger point is that all these functionalities, focussing, raising,
selecting, "highlighting", whatever, seem to be mixed together in the
code. If we could separate them into coherent functions, we would have
fewer bugs like the current one in the future.
--
Alan Mackenzie (Nuremberg, Germany).
next prev parent reply other threads:[~2022-07-11 17:15 UTC|newest]
Thread overview: 83+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-29 17:54 bug#56305: 29.0.50; 'yes-or-no-p' deselects minibuffer frame martin rudalics
2022-06-29 19:10 ` Eli Zaretskii
2022-06-30 10:35 ` Alan Mackenzie
2022-06-30 20:32 ` Alan Mackenzie
2022-07-02 11:38 ` Alan Mackenzie
2022-07-03 8:16 ` martin rudalics
2022-07-03 16:09 ` Alan Mackenzie
2022-07-03 16:17 ` Eli Zaretskii
2022-07-04 19:10 ` Alan Mackenzie
2022-07-04 19:21 ` Eli Zaretskii
2022-07-04 19:43 ` Alan Mackenzie
2022-07-05 2:29 ` Eli Zaretskii
2022-07-05 15:59 ` Alan Mackenzie
2022-07-05 16:24 ` Eli Zaretskii
2022-07-05 17:09 ` Alan Mackenzie
2022-07-06 17:04 ` Alan Mackenzie
2022-07-06 17:29 ` Eli Zaretskii
2022-07-06 18:16 ` Alan Mackenzie
2022-07-06 18:34 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-07-06 18:58 ` Andreas Schwab
2022-07-06 19:05 ` Alan Mackenzie
2022-07-06 19:09 ` Andreas Schwab
2022-07-06 19:22 ` Alan Mackenzie
2022-07-07 17:25 ` Alan Mackenzie
2022-07-07 18:57 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-07-08 21:03 ` Alan Mackenzie
2022-07-09 2:15 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-07-07 7:55 ` martin rudalics
2022-07-07 9:12 ` Alan Mackenzie
2022-07-08 7:01 ` martin rudalics
2022-07-08 10:55 ` Alan Mackenzie
2022-07-08 11:55 ` Eli Zaretskii
2022-07-08 18:31 ` Alan Mackenzie
2022-07-09 8:36 ` martin rudalics
2022-07-08 21:45 ` Gregory Heytings
2022-07-09 8:35 ` martin rudalics
2022-07-09 10:57 ` Alan Mackenzie
2022-07-10 8:07 ` martin rudalics
2022-07-10 11:34 ` Alan Mackenzie
2022-07-10 11:47 ` Eli Zaretskii
2022-07-10 12:41 ` Alan Mackenzie
2022-07-10 13:01 ` Eli Zaretskii
2022-07-10 16:13 ` Drew Adams
2022-07-10 16:55 ` Alan Mackenzie
2022-07-11 7:45 ` martin rudalics
2022-07-11 11:12 ` Eli Zaretskii
2022-07-12 7:33 ` martin rudalics
2022-07-12 16:02 ` Eli Zaretskii
2022-07-11 16:22 ` Alan Mackenzie
2022-07-11 16:43 ` Eli Zaretskii
2022-07-11 17:15 ` Alan Mackenzie [this message]
2022-07-11 17:33 ` Eli Zaretskii
2022-07-11 17:34 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-07-11 20:09 ` Alan Mackenzie
2022-07-11 17:06 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-07-11 20:01 ` Alan Mackenzie
2022-07-12 7:35 ` martin rudalics
2022-07-12 14:56 ` Drew Adams
2022-07-16 7:06 ` martin rudalics
2022-07-16 20:34 ` Alan Mackenzie
2022-07-18 7:36 ` martin rudalics
2022-07-18 14:44 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-07-19 8:09 ` martin rudalics
2022-07-19 16:04 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-07-16 23:39 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-07-17 11:29 ` Alan Mackenzie
2022-07-17 14:03 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-07-17 15:06 ` Alan Mackenzie
2022-07-18 7:37 ` martin rudalics
2022-07-18 14:58 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-07-18 15:58 ` Eli Zaretskii
2022-07-18 16:12 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-07-18 16:50 ` Eli Zaretskii
2022-07-19 20:48 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-07-20 12:17 ` Eli Zaretskii
2022-07-20 14:54 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-07-20 16:02 ` Eli Zaretskii
2022-07-21 15:07 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-07-21 15:58 ` Eli Zaretskii
2022-07-19 8:09 ` martin rudalics
2022-07-07 15:54 ` Alan Mackenzie
2022-07-04 19:46 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-07-04 19:59 ` Alan Mackenzie
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YsxanDhgeULKWUQN@ACM \
--to=acm@muc.de \
--cc=56305@debbugs.gnu.org \
--cc=eliz@gnu.org \
--cc=monnier@iro.umontreal.ca \
--cc=rudalics@gmx.at \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.