[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Stop frames stealing eachothers' minibuffers!

From: martin rudalics
Subject: Re: Stop frames stealing eachothers' minibuffers!
Date: Tue, 5 Jan 2021 19:53:23 +0100

>> - doesn't get me _always_ into the minibuffer window of the frame
>>     switched to (I'm not sure whether it should and under which
>>     circumstances - this should be clarified),
> I don't think it should, in general, unless the miniwindow is (still) the
> frame's current window.

OK.  Let's stick to this rule.

> I've found out why, in Gregory's scenario, after the "middle" RET to
> visit a file, point was not moving back to the "middle frame": it's
> because select_frame is insufficient of itself to move X-Window's focus,
> which stays in the "old" frame.  Any command now causes a "switch-frame"
> event which moves the minibuffers back into the "old" frame, which isn't
> what we want.  The solution (a bit ugly) is to call the lisp function
> select-frame-set-input-focus rather than just do_switch_frame near the
> end of read_minibuf.

This is indeed ugly and might harm 'redirect-frame-focus'.

>> How do I edit an outer level minibuffer whilst an inner level buffer is
>> active?
> At the moment, you can't.  This isn't good.

I think it is good (enough).  Do we want spaghetti minibuffers?

>  What do you think of the
> following solution?
> Instead of setting outer minibuffers' maps temporarily to
> minibuffer-inactive-mode-map, I could amend exit-minibuffer so that it
> would throw an error when there was a more nested active minibuffer, but
> leave the current minibuffers untouched.  Also, C-g should then abort the
> current minibuffer's caller, together with those of any more nested MBs.

We're right in hell's kitchen here.

> The change in the current version of the patch (attached) is that, as
> already mentioned, select-frame-set-input-focus is called rather than
> just do_select_frame from near the end of read_minibuf.  Also, that call
> has been moved from just after the recursive edit to the very end of
> read_minibuf.  Also, move_minibuffer_onto_frame now moves the entire
> stack of minibuffers, not just the current one (it is not called when
> minibuffers-follows-selected-frame is nil).
> How would you feel about committing this patch?  It is an improvement
> over the current state, even though not yet finished.

Let's wait for a week at least.  I'd really want to hear the comments
from the rest of the bunch.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]