[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: master 9cef8fc: Ensure that new emacsclient frames has focus
From: |
Joseph Mingrone |
Subject: |
Re: master 9cef8fc: Ensure that new emacsclient frames has focus |
Date: |
Thu, 17 Dec 2020 16:14:20 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (berkeley-unix) |
On Mon, 2020-12-07 at 08:29, larsi@gnus.org (Lars Ingebrigtsen) wrote:
> branch: master
> commit 9cef8fc8cdb5e6e18c9cf617eed3808d67ca340e
> Author: Lars Ingebrigtsen <larsi@gnus.org>
> Commit: Lars Ingebrigtsen <larsi@gnus.org>
> Ensure that new emacsclient frames has focus
> * lisp/server.el (server-execute): Focus the frame here...
> (server-switch-buffer): Instead of here (bug#15469). This ensures
> that the frame has focus if Emacs is querying the user about
> something when opening a file (for instance "Revert from file?").
> ---
> lisp/server.el | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
> diff --git a/lisp/server.el b/lisp/server.el
> index b1b27e3..651f801 100644
> --- a/lisp/server.el
> +++ b/lisp/server.el
> @@ -1334,6 +1334,8 @@ The following commands are accepted by the client:
> ;; inhibit-quit flag, which is good since `commands' (as well as
> ;; find-file-noselect via the major-mode) can run arbitrary code,
> ;; including code that needs to wait.
> + (when (and frame server-raise-frame)
> + (select-frame-set-input-focus frame))
> (with-local-quit
> (condition-case err
> (let ((buffers (server-visit-files files proc nowait)))
> @@ -1686,9 +1688,7 @@ be a cons cell (LINENUMBER . COLUMNNUMBER)."
> (switch-to-buffer next-buffer))
> ;; After all the above, we might still have ended up with
> ;; a minibuffer/dedicated-window (if there's no other).
> - (error (pop-to-buffer next-buffer)))))))
> - (when server-raise-frame
> - (select-frame-set-input-focus (window-frame)))))
> + (error (pop-to-buffer next-buffer)))))))))
> ;;;###autoload
> (defun server-save-buffers-kill-terminal (arg)
Hi,
I'm seeing some new behaviour with this commit that I suspect was
unintended.
Before this commit, calling emacsclient -n <file> from a terminal
emulator caused the emacs frame to be raised.
After this commit, the terminal emulator normally stays in focus. I
haven't figured out for certain when the emacs frame still gains focus,
but it seems to happen when <file> does not exist on disk.
Joe
- Re: master 9cef8fc: Ensure that new emacsclient frames has focus,
Joseph Mingrone <=
- Re: master 9cef8fc: Ensure that new emacsclient frames has focus, Lars Ingebrigtsen, 2020/12/18
- Re: master 9cef8fc: Ensure that new emacsclient frames has focus, Lars Ingebrigtsen, 2020/12/18
- Re: master 9cef8fc: Ensure that new emacsclient frames has focus, Joseph Mingrone, 2020/12/22
- Re: master 9cef8fc: Ensure that new emacsclient frames has focus, Lars Ingebrigtsen, 2020/12/22
- Re: master 9cef8fc: Ensure that new emacsclient frames has focus, T.V Raman, 2020/12/22
- Re: master 9cef8fc: Ensure that new emacsclient frames has focus, Lars Ingebrigtsen, 2020/12/23