all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: martin rudalics <rudalics@gmx.at>
To: Thierry Volpiatto <thievol@posteo.net>
Cc: 49248@debbugs.gnu.org
Subject: bug#49248: 28.0.50; read-from-minibuffer returns a window-live-p error when its original window is deleted
Date: Tue, 29 Jun 2021 10:03:11 +0200	[thread overview]
Message-ID: <b824c053-f6ec-61cf-1023-b5cbc6fb011a@gmx.at> (raw)
In-Reply-To: <87a6na5ibc.fsf@posteo.net>

 > Thanks Martin for quick answer and fix, yes it is now working.

Pushed to master now.  Apparently, exiting from the minibuffer may
select a frame no less than four times here:

#1 in read_minibuf_unwind
   if (!EQ (exp_MB_frame, saved_selected_frame)
       && !NILP (exp_MB_frame))
     do_switch_frame (exp_MB_frame, 0, 0, Qt); /* This also sets
					     minibuf_window */

#2 in read_minibuf_unwind
       else if (WINDOW_LIVE_P (calling_window))
	Fset_frame_selected_window (calling_frame, calling_window, Qnil);

#3 in read_minibuf_unwind
   /* Restore the selected frame. */
   if (!EQ (exp_MB_frame, saved_selected_frame)
       && !NILP (exp_MB_frame))
     do_switch_frame (saved_selected_frame, 0, 0, Qt);

#4 in read_minibuf
   if (FRAMEP (calling_frame)
       && FRAME_LIVE_P (XFRAME (calling_frame))
       && (!EQ (selected_frame, calling_frame)
	  || (WINDOW_LIVE_P (XFRAME (calling_frame)->minibuffer_window)
	      && !EQ (XWINDOW (XFRAME (calling_frame)->minibuffer_window)
		      ->frame,
		      calling_frame))))
     call2 (Qselect_frame_set_input_focus, calling_frame, Qnil);

These will confuse the hell out of any window manager (and of me).  Can
some knowledgeable soul tell us what all this code is supposed to do and
whether it could be refactored in some sane way?

Many thanks in advance, martin






  parent reply	other threads:[~2021-06-29  8:03 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-28  6:32 bug#49248: 28.0.50; read-from-minibuffer returns a window-live-p error when its original window is deleted Thierry Volpiatto
2021-06-28  7:53 ` martin rudalics
2021-06-28 11:47   ` Thierry Volpiatto
     [not found]   ` <87a6na5ibc.fsf@posteo.net>
2021-06-29  8:03     ` martin rudalics [this message]
2021-07-01  9:21       ` Eli Zaretskii

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=b824c053-f6ec-61cf-1023-b5cbc6fb011a@gmx.at \
    --to=rudalics@gmx.at \
    --cc=49248@debbugs.gnu.org \
    --cc=thievol@posteo.net \
    /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.