emacs-devel
[Top][All Lists]
Advanced

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

Re: Stop frames stealing eachothers' minibuffers!


From: Alan Mackenzie
Subject: Re: Stop frames stealing eachothers' minibuffers!
Date: Sun, 10 Jan 2021 18:25:23 +0000

Hello, Martin.

On Sun, Jan 10, 2021 at 18:49:03 +0100, martin rudalics wrote:
>  > Three frames F1, F2, F3:

>  > On F1, C-x C-f foo.el.  Move to F2: C-x C-f bar.el.  Move to F3 C-x C-f
>  > baz.el RET.

>  > baz.el is visited in F3.  The minibuffers remain in F3.  Move point to
>  >   *Minibuf-2* in F3, and type RET.  bar.el is visited in F2, BUT THE
>  > FOCUS REMAINS IN F3.  This is suboptimal.  If we visit a file in a
>  > frame, the focus should be on that frame, not somewhere else.  As an
>  > analogy, C-x 5 f foo.el visits foo.el on another (typically new) frame
>  > and MOVES THE FOCUS TO THAT FRAME.

> This "MOVES THE FOCUS TO THAT FRAME" is done by the WM.  Emacs doesn't
> care normally because it usually can't fight it anyway (you can try by
> setting the ‘no-focus-on-map’ frame parameter but it's no general cure).
> With practically all WMs, a new window always gets focus automatically.

>  > Why shouldn't that be done in the current scenario?

> Because we are talking about a frame (F2) that already exists in your
> scenario.

Sorry, that answer doesn't fit the question I though I was asking.

What I meant was that it is surely a good thing that after visiting a
file with C-x C-f, the focus ends up in the frame where the file's
buffer is.  Why does this cease to be a good thing if the frame already
exists?

Note other scenarios where the frame already exists, such as C-x 5 b
foo.el RET when foo.el is already displayed in another frame.  The focus
is moved to that other frame.  Whether that is done by Emacs or the WM
is immaterial, the focus MUST be moved, otherwise there'd be no point to
doing the C-x 5 b.

Similarly with a "deferred" C-x C-f, the focus must also be moved.
Surely?

I'll need to go back a bit to try and understand the arguments against
shifting the focus.  Right at the moment, I'm not seeing them.

> martin

-- 
Alan Mackenzie (Nuremberg, Germany).



reply via email to

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