all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Alan Mackenzie <acm@muc.de>
To: Eli Zaretskii <eliz@gnu.org>
Cc: al@petrofsky.org, rudalics@gmx.at, acm@muc.de,
	monnier@iro.umontreal.ca, 63967@debbugs.gnu.org
Subject: bug#63967: 28.2; switch-to-buffer in normal window fails if minibuffer window is active
Date: Tue, 13 Jun 2023 21:36:37 +0000	[thread overview]
Message-ID: <ZIjhZcbTcLoxCfIJ@ACM> (raw)
In-Reply-To: <83v8frursu.fsf@gnu.org>

Hello, Eli.

On Tue, Jun 13, 2023 at 21:43:13 +0300, Eli Zaretskii wrote:
> > Cc: al@petrofsky.org, rudalics@gmx.at, monnier@iro.umontreal.ca,
> >  63967@debbugs.gnu.org
> > Date: Sun, 11 Jun 2023 16:53:48 +0300
> > From: Eli Zaretskii <eliz@gnu.org>
> > 
> > > Do you want me to fix this bug?  It seems there are quite a lot of people
> > > who've made observations about it in the last couple of days.
> > 
> > I want to fix the bug whose recipe is in
> > https://debbugs.gnu.org/cgi/bugreport.cgi?bug=63967#5 and other
> > similar ones, yes.  Basically, if Emacs reads from a recursive
> > minibuffer when the selected window before that was not a mini-window,
> > we now signal a user-error, which is a regression since Emacs 28, and
> > I'd like that to be solved.  But please begin by looking at the
> > solution proposed by Martin in
> > https://debbugs.gnu.org/cgi/bugreport.cgi?bug=63967#38 and tell if it
> > looks good to you, and if not, why not.

> Ping!  Any progress there?

Sorry.  I've had a few very busy days in real life.

Firstly, I'm reasonably sure that the Fset_frame_selected_window I put
into minibuf_unwind was a mistake based on the misconception that after
reading the minibuffer recursively, we always wanted to go back to the
next outer minibuffer.

I think Martin's patch (from 2023-06-10 08:52 +0200) is along the right
lines, i.e. go back to the invoking window rather than the minibuffer
window.  But I'm not sure whether it might be better, from the point of
view of preserving maintainability of read_minibuf, to try to get the
restore_window_buffer_configuration call to go back to the calling
window, rather than adding the extra parameter to minibuffer_unwind.

It would be somewhat complicated by the need to go to some other window
if that calling window no longer exists.  We need to decide which
window.  This dilemma might have been what moved me to put that
Fset_frame_selected_window in in the first place.  :-(

So I see the fix somewhat along the lines of removing the offending
Fset_frame_selected_window from minibuffer_unwind, and maybe rearranging
the calls to record_unwind_protect* in read_minibuf to arrange for the
window configuration call to do the job of restoring the "current"
window.

It seems to me you might want to put the fix into Emacs 29.  Am I right?

-- 
Alan Mackenzie (Nuremberg, Germany).





  reply	other threads:[~2023-06-13 21:36 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-08 21:32 bug#63967: 28.2; switch-to-buffer in normal window fails if minibuffer window is active Al Petrofsky
2023-06-09 11:16 ` Eli Zaretskii
2023-06-09 15:08   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-06-09 16:09     ` Eli Zaretskii
2023-06-09 19:18       ` Eli Zaretskii
2023-06-10 15:49         ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-06-10 19:42           ` Alan Mackenzie
2023-06-11  5:03             ` Eli Zaretskii
2023-06-11 13:40               ` Alan Mackenzie
2023-06-11 13:53                 ` Eli Zaretskii
2023-06-13 18:43                   ` Eli Zaretskii
2023-06-13 21:36                     ` Alan Mackenzie [this message]
2023-06-14 12:15                       ` Eli Zaretskii
2023-06-15 10:25                         ` Alan Mackenzie
2023-06-17 11:31                         ` Alan Mackenzie
2023-06-17 13:08                           ` Eli Zaretskii
2023-06-17 13:52                           ` martin rudalics
2023-06-17 16:23                             ` Alan Mackenzie
2023-06-17 18:46                           ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-06-11 14:35                 ` Drew Adams
2023-06-11 16:01                   ` Alan Mackenzie
2023-06-12  7:17                     ` martin rudalics
2023-06-12 12:04                       ` Eli Zaretskii
2023-06-11 16:12                   ` Eli Zaretskii
2023-06-09 16:52   ` Gregory Heytings
2023-06-09 17:21     ` Eli Zaretskii
2023-06-09 20:04       ` Gregory Heytings
2023-06-10  5:59         ` Eli Zaretskii
2023-06-10  6:39           ` Gregory Heytings
2023-06-10  6:45             ` Eli Zaretskii
2023-06-10  8:45               ` Gregory Heytings
2023-06-10  6:52   ` martin rudalics
2023-06-10  8:28     ` Eli Zaretskii
2023-06-10 14:51       ` martin rudalics
2023-06-10 17:09         ` Eli Zaretskii
2023-06-11  8:10           ` 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=ZIjhZcbTcLoxCfIJ@ACM \
    --to=acm@muc.de \
    --cc=63967@debbugs.gnu.org \
    --cc=al@petrofsky.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.