GNU bug report logs -
#1980
23.0.60; emacs switches focus to graphical frame when server-edit exits terminal frame
Previous Next
Reported by: Gregor Zattler <telegraph <at> gmx.net>
Date: Wed, 21 Jan 2009 21:20:03 UTC
Severity: normal
Done: Chong Yidong <cyd <at> stupidchicken.com>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 1980 in the body.
You can then email your comments to 1980 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#1980
; Package
emacs
.
(Wed, 21 Jan 2009 21:20:03 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Gregor Zattler <telegraph <at> gmx.net>
:
New bug report received and forwarded. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
(Wed, 21 Jan 2009 21:20:04 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):
Please write in English if possible, because the Emacs maintainers
usually do not have translators to read other languages for them.
Your bug report will be posted to the emacs-pretest-bug <at> gnu.org mailing list.
Please describe exactly what actions triggered the bug
and the precise symptoms of the bug:
When using emacs 23 in daemon mode some graphical emacs frame
gets fokus if an editing session on a terminal window which was
initiated via "emacsclient -t ..." is finished with C-x #
(server-edit). In order to continue work in the terminal window
I have to manually switch back to the terminal window.
I checked this behaviour with two window managers: icwwm-lite and
xfce4 on a up to date debian sid system.
I consider this behaviour a bug since it is recommended emacs
usage to use one instance of emacs to edit several files in
several buffers and frames. When exiting emacsclient should
return control to the calling application (the shell) and nothing
should happen with the windows/frames on my graphical display.
Emacs is not a window manager and should not manage windows since
it cannot know which task I want to do next.
This happens dozens of times every day, since I use to edit my
email in a terminal window while there is a graphical emacs frame
in the background of my desktop which I use for editing a org
file:
For emails I use mutt in a gnu screen session running in a
rxvt-unicode terminal window. For editing emails I use
emacsclient with the "-t" command line option in order to edit
the email in a Text-only frame in the terminal window.
Most of the time on my desktop there is also a graphical emacs
frame which I use with org-mode.
When I edit a email the terminal window is on top of the emacs
graphical frame and has the fokus. When I finish editing the
email emacsclient gives back control to mutt which happens to
show the compose menu. In order to send the email I have to hit
the "y" key. But before I can do so, the graphical emacs frame
with the org file swaps in front of the rxvt-unicode terminal
window and gets fokus. In order to resume sending the email and
reading the next one I have to manually switch to the terminal
window.
Thank you for emacs, the --daemon command line option which is
great and for your attention to this bug report.
Sincerely, Gregor
If Emacs crashed, and you have the Emacs process in the gdb debugger,
please include the output from the following gdb commands:
`bt full' and `xbacktrace'.
If you would like to further debug the crash, please read the file
/usr/share/emacs/23.0.60/etc/DEBUG for instructions.
In GNU Emacs 23.0.60.1 (i486-pc-linux-gnu, GTK+ Version 2.12.11)
of 2009-01-18 on elegiac, modified by Debian
(emacs-snapshot package, version 1:20090118-1)
Windowing system distributor `The X.Org Foundation', version 11.0.10402000
configured using `configure '--build' 'i486-linux-gnu' '--host' 'i486-linux-gnu' '--prefix=/usr' '--sharedstatedir=/var/lib' '--libexecdir=/usr/lib' '--localstatedir=/var' '--infodir=/usr/share/info' '--mandir=/usr/share/man' '--with-pop=yes' '--enable-locallisppath=/etc/emacs-snapshot:/etc/emacs:/usr/local/share/emacs/23.0.60/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/23.0.60/site-lisp:/usr/share/emacs/site-lisp' '--with-x=yes' '--with-x-toolkit=gtk' 'build_alias=i486-linux-gnu' 'host_alias=i486-linux-gnu' 'CFLAGS=-DDEBIAN -DSITELOAD_PURESIZE_EXTRA=5000 -g -O2' 'LDFLAGS=-g -Wl,--as-needed' 'CPPFLAGS=''
Important settings:
value of $LC_ALL: nil
value of $LC_COLLATE: de_DE <at> euro
value of $LC_CTYPE: de_DE <at> euro
value of $LC_MESSAGES: C
value of $LC_MONETARY: de_DE <at> euro
value of $LC_NUMERIC: de_DE <at> euro
value of $LC_TIME: de_DE <at> euro
value of $LANG: de_DE <at> euro
value of $XMODIFIERS: nil
locale-coding-system: iso-latin-9-unix
default-enable-multibyte-characters: t
Major mode: Lisp Interaction
Minor modes in effect:
global-hl-line-mode: t
display-time-mode: t
show-paren-mode: t
tooltip-mode: t
mouse-wheel-mode: t
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
global-auto-composition-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
size-indication-mode: t
column-number-mode: t
line-number-mode: t
transient-mark-mode: t
Recent input:
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo>
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo>
<menu-bar> <help-menu> <send-emacs-bug-report>
Recent messages:
No diary entries for Wednesday, 21 January 2009
Preparing diary...
No diary entries for Wednesday, 21 January 2009
Mark set
Marking diary entries...done
Marking diary entries...done
Loading avoid...done
Starting Emacs daemon.
When done with this frame, type C-x 5 0
call-interactively: Text is read-only [3 times]
Information forwarded
to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#1980
; Package
emacs
.
(Tue, 24 Mar 2009 18:00:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Chong Yidong <cyd <at> stupidchicken.com>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
(Tue, 24 Mar 2009 18:00:02 GMT)
Full text and
rfc822 format available.
Message #10 received at 1980 <at> emacsbugs.donarmstrong.com (full text, mbox):
> When using emacs 23 in daemon mode some graphical emacs frame gets
> fokus if an editing session on a terminal window which was initiated
> via "emacsclient -t ..." is finished with C-x # (server-edit). In
> order to continue work in the terminal window I have to manually
> switch back to the terminal window.
Sorry for the late response. I haven't been able to reproduce this bug
with metacity---closing an `emacsclient -t' client keeps the xterm
window in focus. This problem may be a quirk of the window managers you
tried (xfce4 and icwwm-lite); I am not sure what Emacs can do
differently to try to mitigate this.
Information forwarded
to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#1980
; Package
emacs
.
(Wed, 25 Mar 2009 21:00:03 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Gregor Zattler <telegraph <at> gmx.net>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
(Wed, 25 Mar 2009 21:00:03 GMT)
Full text and
rfc822 format available.
Message #15 received at 1980 <at> emacsbugs.donarmstrong.com (full text, mbox):
Hi Chong,
* Chong Yidong <cyd <at> stupidchicken.com> [24. Mär. 2009]:
>> When using emacs 23 in daemon mode some graphical emacs frame gets
>> fokus if an editing session on a terminal window which was initiated
>> via "emacsclient -t ..." is finished with C-x # (server-edit). In
>> order to continue work in the terminal window I have to manually
>> switch back to the terminal window.
>
> Sorry for the late response. I haven't been able to reproduce this bug
> with metacity---closing an `emacsclient -t' client keeps the xterm
> window in focus. This problem may be a quirk of the window managers you
> tried (xfce4 and icwwm-lite); I am not sure what Emacs can do
> differently to try to mitigate this.
O.k. I'll test it with other window managers. ATM I don't have
time to do this but I will report back when I've done it.
In the meantime I discovered that emacs does switch
windows/fokus if the graphical emacs is started via
emacsclient -c filename
but not (or at least only in rare occasions) when started via
emacsclient -c -n filename
^^
Perhaps this is helpful?
Ciao, Gregor
--
-... --- .-. . -.. ..--.. ...-.-
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#1980
; Package
emacs
.
(Sat, 04 Dec 2010 15:52:02 GMT)
Full text and
rfc822 format available.
Message #18 received at 1980 <at> debbugs.gnu.org (full text, mbox):
Hi Chong, Emacs developers, readers of old bug reports,
* Gregor Zattler <telegraph <at> gmx.net> [25. Mar. 2009]:
> * Chong Yidong <cyd <at> stupidchicken.com> [24. Mär. 2009]:
>>> When using emacs 23 in daemon mode some graphical emacs frame gets
>>> fokus if an editing session on a terminal window which was initiated
>>> via "emacsclient -t ..." is finished with C-x # (server-edit). In
>>> order to continue work in the terminal window I have to manually
>>> switch back to the terminal window.
>>
>> Sorry for the late response. I haven't been able to reproduce this bug
>> with metacity---closing an `emacsclient -t' client keeps the xterm
>> window in focus. This problem may be a quirk of the window managers you
>> tried (xfce4 and icwwm-lite); I am not sure what Emacs can do
>> differently to try to mitigate this.
>
> O.k. I'll test it with other window managers. ATM I don't have
> time to do this but I will report back when I've done it.
I did some tests and research today: This is not a WM issue, it's
reproducible without any WM.
Meanwhile this issue is discussed in bug 7269 as focus follows
mouse (actually: mouse follows frame). The workaround mentioned
by Anders Kaseorg in the discussion of the aforementioned bug is
to
M-x customize-save-variable focus-follows-mouse n.
This works for me.
But I think the default value of this variable is surprising and
it's documentation does not explain that this actually leads to
mouse movements.
Ciao, Gregor
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#1980
; Package
emacs
.
(Mon, 20 Dec 2010 11:12:02 GMT)
Full text and
rfc822 format available.
Message #21 received at 1980 <at> debbugs.gnu.org (full text, mbox):
Gregor Zattler <telegraph <at> gmx.net> writes:
> I did some tests and research today: This is not a WM issue, it's
> reproducible without any WM.
>
> Meanwhile this issue is discussed in bug 7269 as focus follows
> mouse (actually: mouse follows frame). The workaround mentioned
> by Anders Kaseorg in the discussion of the aforementioned bug is
> to
>
> M-x customize-save-variable focus-follows-mouse n.
>
> This works for me.
I've changed focus-follows-mouse to nil on the trunk. Closing the bug.
bug closed, send any further explanations to Gregor Zattler <telegraph <at> gmx.net>
Request was from
Chong Yidong <cyd <at> stupidchicken.com>
to
control <at> debbugs.gnu.org
.
(Mon, 20 Dec 2010 11:12:02 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Mon, 17 Jan 2011 12:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 14 years and 213 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.