From: martin rudalics <rudalics@gmx.at>
To: Alan Mackenzie <acm@muc.de>
Cc: 48674@debbugs.gnu.org, "Iris García" <iris.garcia.desebastian@gmail.com>
Subject: bug#48674: Frames and minibuffer bug
Date: Thu, 27 May 2021 18:33:45 +0200 [thread overview]
Message-ID: <1e21b121-91c1-cbe9-d9ae-24915f163ae5@gmx.at> (raw)
In-Reply-To: <YK91vK/0eW629D/E@ACM>
> What is happening is that the with-selected-frame invocation is
> selecting (temporarily) a different frame from the minibuffer's frame.
> This has the (intended) side effect of making the MB no longer selected
> in that frame. When the MB's frame becomes selected again, nothing
> makes the mini-window the selected window. This needs fixing.
Does this mean that the
Fselect_window (f->selected_window, norecord);
in do_switch_frame fails? If so, why? Do we anywhere violate the
(eq (selected-window) (frame-selected-window (selected-frame)))
invariant? That might be fatal. Both, `with-selected-frame' and
`with-selected-window', should leave no traces behind.
> Martin, that Qt in the Fselect_window call (the NORECORD argument) -
> would it be perhaps be better as Qnil?
>
>
> diff --git a/src/minibuf.c b/src/minibuf.c
> index cffb7fe787..3468643a7e 100644
> --- a/src/minibuf.c
> +++ b/src/minibuf.c
> @@ -893,6 +893,11 @@ read_minibuf (Lisp_Object map, Lisp_Object initial, Lisp_Object prompt,
>
> run_hook (Qminibuffer_setup_hook);
>
> + /* If the above hook has made the mini-window no longer the selected
> + window, restore it. */
> + if (!EQ (selected_window, minibuf_window))
> + Fselect_window (minibuf_window , Qt);
> +
Are we sure that we want to disallow a function on
`minibuffer-setup-hook' to change the selected window? With Emacs 27
(defun foo ()
(select-window (frame-first-window)))
(add-hook 'minibuffer-setup-hook 'foo)
works without any problems here.
The NORECORD argument is important only if you need it - so far, the
previous buffers of the minibuffer window were largely ignored.
martin
next prev parent reply other threads:[~2021-05-27 16:33 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-26 11:23 bug#48674: Frames and minibuffer bug Iris García
2021-05-26 17:45 ` martin rudalics
2021-05-27 10:34 ` Alan Mackenzie
2021-05-27 16:33 ` martin rudalics [this message]
2021-05-27 19:56 ` Iris García
2021-05-28 8:25 ` martin rudalics
2021-05-28 9:34 ` Iris García
2021-05-28 9:51 ` martin rudalics
2021-05-31 16:36 ` Alan Mackenzie
2021-06-01 11:29 ` Iris García
2021-05-27 20:01 ` Alan Mackenzie
2021-05-28 8:26 ` martin rudalics
2021-05-28 17:15 ` Alan Mackenzie
2021-05-28 20:14 ` Alan Mackenzie
2021-05-29 9:20 ` martin rudalics
2021-05-29 13:10 ` Alan Mackenzie
2021-05-29 15:12 ` martin rudalics
2021-05-29 15:24 ` Eli Zaretskii
2021-05-29 17:00 ` Alan Mackenzie
2021-05-30 13:58 ` Alan Mackenzie
2021-05-31 7:55 ` martin rudalics
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=1e21b121-91c1-cbe9-d9ae-24915f163ae5@gmx.at \
--to=rudalics@gmx.at \
--cc=48674@debbugs.gnu.org \
--cc=acm@muc.de \
--cc=iris.garcia.desebastian@gmail.com \
/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.