GNU bug report logs -
#37826
Very annoying autoraise client/server behavior with -t option
Previous Next
Reported by: Carlos Pita <carlosjosepita <at> gmail.com>
Date: Sat, 19 Oct 2019 20:47:02 UTC
Severity: normal
Tags: patch
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
> From: Carlos Pita <carlosjosepita <at> gmail.com>
> Date: Sat, 26 Oct 2019 17:27:02 -0300
> Cc: Juanma Barranquero <lekktu <at> gmail.com>, 37826 <at> debbugs.gnu.org
>
> Only if minibuffer-auto-rise is also nil:
>
> (let* ((minibuffer-auto-raise (or server-raise-frame minibuffer-auto-raise))
Yes, but minibuffer-auto-raise is nil by default.
> Anyway, I want the frame to be raised when it's switched to, just not
> another frame and specially not because of barely relevant messages.
I understand.
So here's an idea. Does the following change work for you in your
original scenario?
diff --git a/lisp/server.el b/lisp/server.el
index 45fa55a..b23fdc4 100644
--- a/lisp/server.el
+++ b/lisp/server.el
@@ -1405,7 +1405,9 @@ server-visit-files
(if (null obuf)
(progn
(run-hooks 'pre-command-hook)
- (set-buffer (find-file-noselect filen)))
+ (set-buffer
+ (let (minibuffer-auto-raise)
+ (find-file-noselect filen))))
(set-buffer obuf)
;; separately for each file, in sync with post-command hooks,
;; with the new buffer current:
If this works, then can you test this in several situations different
from yours, including:
. invoking emacsclient without -t when there's a GUI client frame
that is iconified
. an existing client frame is visible (not iconified)
. visiting a file that is already visited
and maybe others, and see if the message displayed by
shell-script-mode appears as expected, and causes the right frame to
be raised (if needed)? (It might be that in some of these situations
we need to avoid binding minibuffer-auto-raise to nil, in which case
server-visit-files will need some additional logic or an additional
argument to discern between them.)
Thanks.
This bug report was last modified 4 years and 285 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.