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: martin rudalics
Subject: Re: Stop frames stealing eachothers' minibuffers!
Date: Sun, 10 Jan 2021 20:05:29 +0100

> 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?

We do call `select-frame-set-input-focus' in `pop-to-buffer' when the
buffer is on another frame and obviously in C-x 5 o.  These are probably
its most prominent clients.

> 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.

I talked about the WM because you mentioned showing a buffer in a
"typically new" frame.

> 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.

It's completely up to you whether to use it or not.  But in my
experience any code is better without dealing with frame focus.  In
particular when there's still a hanging visit for foo.el in F1.

martin



reply via email to

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