[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Stop frames stealing eachothers' minibuffers!
From: |
Eli Zaretskii |
Subject: |
Re: Stop frames stealing eachothers' minibuffers! |
Date: |
Sat, 31 Oct 2020 18:45:19 +0200 |
> Date: Sat, 31 Oct 2020 16:14:22 +0000
> Cc: emacs-devel@gnu.org
> From: Alan Mackenzie <acm@muc.de>
>
> > > @@ -416,11 +471,12 @@ read_minibuf (Lisp_Object map, Lisp_Object initial,
> > > Lisp_Object prompt,
> > > {
> > > Lisp_Object str
> > > = build_string ("Command attempted to use minibuffer while in
> > > minibuffer");
> > > - if (EQ (selected_window, minibuf_window))
> > > - Fsignal (Quser_error, (list1 (str)));
> > > + if (!minibuf_follows_frame ()
> > > + || EQ (selected_window, minibuf_window))
> > > + Fsignal (Quser_error, (list1 (str)));
>
> > I don't think I understand this change: what does
> > minibuffer-follows-selected-frame have to do with recursive minibuffer
> > usage? They are two independent features.
>
> They're not as independent as all that. The existing logic appeared to
> say "if we're in the miniwindow, just abort the current command,
> otherwise abort all nested commands.". Extending that logic to when we
> have several miniwindows, we'd (perhaps) get "if we're in _A_ miniwindow
> just abort the current command.".
>
> Which, further extended, goes "if we're in ANY window, just abort the
> current command.". I agree, this is an independent feature from the
> main one. But it brings consistency (and, possibly, usability) to this
> abort facility. I can put this back to more or less what it was. But
> why do we abort the whole command stack when there's just a single
> error?
Sorry, you've lost me here. The existing logic is: if we are in a
minibuffer with minibuf_level > 1, then we throw to top-level, either
by signaling a user-error or silently. Your change introduced the
call to minibuf_follows_frame into this equation, and I just cannot
understand what business does it have here? Recursive minibuffers
should be "verboten" regardless of whether the minibuffer follows the
selected frame or not. What am I missing here?
> > > - /* Empty out the minibuffers of all frames other than the one
> > > - where we are going to display one now.
> > > - Set them to point to ` *Minibuf-0*', which is always empty. */
> > > - empty_minibuf = get_minibuffer (0);
> > > -
> > > - FOR_EACH_FRAME (dummy, frame)
> > > - {
> > > - Lisp_Object root_window = Fframe_root_window (frame);
> > > - Lisp_Object mini_window = XWINDOW (root_window)->next;
> > > -
> > > - if (! NILP (mini_window) && ! EQ (mini_window, minibuf_window)
> > > - && !NILP (Fwindow_minibuffer_p (mini_window)))
> > > - /* Use set_window_buffer instead of Fset_window_buffer (see
> > > - discussion of bug#11984, bug#12025, bug#12026). */
> > > - set_window_buffer (mini_window, empty_minibuf, 0, 0);
> > > - }
>
> > Does this mean the minibuffers on other frames will now not be emptied?
>
> Yes, indeed. If minibuffer-follows-selected-frame, there'll only be a
> single mini-window, which we're about to write into, so there's no point
> emptying out a null set of other windows.
That's the intention, perhaps, but are we really 110% sure this will
happen? And where's the alternative code which will make sure the
other minibuffers are cleared in this case?
- Re: Stop frames stealing eachothers' minibuffers!, (continued)
- Re: Stop frames stealing eachothers' minibuffers!, Eli Zaretskii, 2020/10/22
- C-x o is moving between frames. [Was: Stop frames stealing eachothers' minibuffers!], Alan Mackenzie, 2020/10/23
- Re: C-x o is moving between frames. [Was: Stop frames stealing eachothers' minibuffers!], Stefan Monnier, 2020/10/23
- Re: C-x o is moving between frames. [Was: Stop frames stealing eachothers' minibuffers!], Eli Zaretskii, 2020/10/24
- Re: C-x o is moving between frames. [Was: Stop frames stealing eachothers' minibuffers!], Alan Mackenzie, 2020/10/24
- Re: C-x o is moving between frames. [Was: Stop frames stealing eachothers' minibuffers!], Stefan Monnier, 2020/10/24
- Re: C-x o is moving between frames. [Was: Stop frames stealing eachothers' minibuffers!], Alan Mackenzie, 2020/10/24
- Re: Stop frames stealing eachothers' minibuffers!, Alan Mackenzie, 2020/10/30
- Re: Stop frames stealing eachothers' minibuffers!, Eli Zaretskii, 2020/10/31
- Re: Stop frames stealing eachothers' minibuffers!, Alan Mackenzie, 2020/10/31
- Re: Stop frames stealing eachothers' minibuffers!,
Eli Zaretskii <=
- Re: Stop frames stealing eachothers' minibuffers!, Alan Mackenzie, 2020/10/31
- Re: Stop frames stealing eachothers' minibuffers!, Eli Zaretskii, 2020/10/31
- Re: Stop frames stealing eachothers' minibuffers!, Alan Mackenzie, 2020/10/31
- Re: Stop frames stealing eachothers' minibuffers!, Gregory Heytings, 2020/10/14
- Re: Stop frames stealing eachothers' minibuffers!, Gregory Heytings, 2020/10/14
- Re: Stop frames stealing eachothers' minibuffers!, Andreas Schwab, 2020/10/13
- Re: Stop frames stealing eachothers' minibuffers!, Gregory Heytings, 2020/10/13
- Re: Stop frames stealing eachothers' minibuffers!, Stefan Monnier, 2020/10/13
Re: Stop frames stealing eachothers' minibuffers!, Stefan Monnier, 2020/10/13