* bug#4386: 23.1; emacsclient -t FILE -vs- server-window
@ 2009-09-09 20:37 Tom Tromey
2009-09-10 5:56 ` martin rudalics
0 siblings, 1 reply; 4+ messages in thread
From: Tom Tromey @ 2009-09-09 20:37 UTC (permalink / raw
To: bug-gnu-emacs
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 bug-gnu-emacs@gnu.org mailing list,
and to the gnu.emacs.bug news group.
Please describe exactly what actions triggered the bug
and the precise symptoms of the bug:
I set server-window in my .emacs:
(server-start)
(setq server-window (selected-frame))
Recently I decided to try emacsclient -t. So I changed my shell
environment to have:
EDITOR='emacsclient -t'
Then I did a "git commit" in a shell. This brought up emacsclient in
the terminal, as expected. However, the commit message buffer was not
displayed.
I looked, and the buffer was shown in server-window.
I wish it was shown in the terminal instead.
I tried setting server-window to a function:
(setq saved-server-window server-window)
(setq server-window
(lambda (buffer)
(if window-system
saved-server-window
(selected-frame))))
However, this did not work either.
(I did not check but I assume that the terminal is not selected when
this is invoked?)
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.1/etc/DEBUG for instructions.
In GNU Emacs 23.1.1 (i386-redhat-linux-gnu, GTK+ Version 2.16.5)
of 2009-08-26 on x86-2.fedora.phx.redhat.com
Windowing system distributor `The X.Org Foundation', version 11.0.10601901
configured using `configure '--build=i386-redhat-linux-gnu' '--host=i386-redhat-linux-gnu' '--target=i586-redhat-linux-gnu' '--program-prefix=' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib' '--libexecdir=/usr/libexec' '--localstatedir=/var' '--sharedstatedir=/var/lib' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--with-dbus' '--with-gif' '--with-jpeg' '--with-png' '--with-rsvg' '--with-tiff' '--with-xft' '--with-xpm' '--with-x-toolkit=gtk' 'build_alias=i386-redhat-linux-gnu' 'host_alias=i386-redhat-linux-gnu' 'target_alias=i586-redhat-linux-gnu' 'CFLAGS=-DMAIL_USE_LOCKF -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-bu
ffer-size=4 -m32 -march=i586 -mtune=generic -fasynchronous-unwind-tables''
Important settings:
value of $LC_ALL: nil
value of $LC_COLLATE: nil
value of $LC_CTYPE: nil
value of $LC_MESSAGES: nil
value of $LC_MONETARY: nil
value of $LC_NUMERIC: nil
value of $LC_TIME: nil
value of $LANG: en_US.UTF-8
value of $XMODIFIERS: nil
locale-coding-system: utf-8-unix
default-enable-multibyte-characters: t
Major mode: Fundamental
Minor modes in effect:
server-buffer-clients: (server <4>)
shell-dirtrack-mode: t
erc-list-mode: t
erc-menu-mode: t
erc-autojoin-mode: t
erc-ring-mode: t
erc-pcomplete-mode: t
erc-track-mode: t
erc-track-minor-mode: t
erc-match-mode: t
erc-button-mode: t
erc-fill-mode: t
erc-stamp-mode: t
erc-netsplit-mode: t
erc-spelling-mode: t
erc-truncate-mode: t
diff-auto-refine-mode: t
erc-status-mode: t
erc-services-mode: t
erc-networks-mode: t
erc-irccontrols-mode: t
erc-noncommands-mode: t
erc-move-to-prompt-mode: t
erc-readonly-mode: t
tooltip-mode: t
mouse-wheel-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
line-number-mode: t
transient-mark-mode: t
Recent input:
. SPC t h a t ' s SPC p r e t t y SPC g o o d <return>
<f10> C-c b <f10> <f10> <f10> <f10> <f10> <f10> C-z
n n 2 K i SPC SPC SPC n SPC SPC SPC SPC SPC SPC n C-u
<return> <return> <return> <return> <return> <return>
<return> <return> <return> <return> <return> <return>
C-z o <f10> <f10> <f10> C-z n <switch-frame> <switch-frame>
C-z o f C-v C-v C-v M-< C-x k <return> d f C-v C-v
C-v C-v C-v C-x k <return> C-u C-n C-u C-n C-u C-n
p p f C-v C-x k <return> d C-x b * c o m <tab> <return>
C-c c M-p <return> n C-c c M-p <return> n M-> <f10>
<f10> <f10> <f10> <f10> <f10> <f10> <f10> <f10> <f10>
<f10> M-v M-v M-v M-v M-> C-z n <switch-frame> <help-echo>
<help-echo> <switch-frame> <help-echo> C-z n <f10>
<f10> <f10> <f10> <f10> <f10> <f10> M-v C-x b <return>
C-r s l y C-r C-r C-g C-c b C-v C-v C-v M-> M-< M->
C-z o SPC SPC SPC C-z o C-x C-f ~ / g n <tab> b a s
e <tab> s r <tab> g d <tab> g d b . 1 <tab> <return>
C-v C-v C-v C-v C-v C-v C-v C-v C-v C-v C-v C-x k <return>
C-z o SPC SPC SPC > M S-SPC SPC = M-v M-v M-v C-v C-u
C-n C-u C-n SPC C-z o M-> <f10> <f10> <f10> <f10> <f10>
<switch-frame> <switch-frame> C-z n ESC [ > 1 ; 2 0
0 5 ; 0 c <switch-frame> C-x C-b C-x o C-x 1 C-n C-n
1 C-o I n t r o d u c e SPC <switch-frame> C-x 1 M-x
r e p o r t - e m <tab> b <tab> <return>
Recent messages:
Mark set
call-interactively: Beginning of buffer [2 times]
Mark set
Quit
Mark set [3 times]
call-interactively: End of buffer
Opening nntp server on news.gmane.org...done
Mark set
Compilation finished
When done with a buffer, type C-x #
Tom
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#4386: 23.1; emacsclient -t FILE -vs- server-window
2009-09-09 20:37 bug#4386: 23.1; emacsclient -t FILE -vs- server-window Tom Tromey
@ 2009-09-10 5:56 ` martin rudalics
2009-09-10 13:42 ` Stefan Monnier
2009-09-10 15:55 ` Tom Tromey
0 siblings, 2 replies; 4+ messages in thread
From: martin rudalics @ 2009-09-10 5:56 UTC (permalink / raw
To: Tom Tromey, 4386
> (lambda (buffer)
> (if window-system
> saved-server-window
> (selected-frame))))
The doc-string of `server-window' says
If it is a function, it should take one argument (a buffer) and
display and select it.
where the "and select it" part is obviously silly. Anyway, something in
the mood of
(lambda (buffer)
(let ((window
(if window-system
saved-server-window
(frame-selected-window))))
(set-window-buffer window buffer)
(select-window window)))
seems more appropriate here.
martin
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#4386: 23.1; emacsclient -t FILE -vs- server-window
2009-09-10 5:56 ` martin rudalics
@ 2009-09-10 13:42 ` Stefan Monnier
2009-09-10 15:55 ` Tom Tromey
1 sibling, 0 replies; 4+ messages in thread
From: Stefan Monnier @ 2009-09-10 13:42 UTC (permalink / raw
To: martin rudalics; +Cc: Tom Tromey, 4386
> where the "and select it" part is obviously silly. Anyway, something in
> the mood of
> (lambda (buffer)
> (let ((window
> (if window-system
> saved-server-window
> (frame-selected-window))))
> (set-window-buffer window buffer)
> (select-window window)))
> seems more appropriate here.
I believe checking window-system is wrong. Instead, the test should be
whether the current terminal and the saved-server-window are equal.
Stefan
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#4386: 23.1; emacsclient -t FILE -vs- server-window
2009-09-10 5:56 ` martin rudalics
2009-09-10 13:42 ` Stefan Monnier
@ 2009-09-10 15:55 ` Tom Tromey
1 sibling, 0 replies; 4+ messages in thread
From: Tom Tromey @ 2009-09-10 15:55 UTC (permalink / raw
To: martin rudalics; +Cc: 4386
>>>>> "martin" == martin rudalics <rudalics@gmx.at> writes:
martin> The doc-string of `server-window' says
martin> If it is a function, it should take one argument (a buffer) and
martin> display and select it.
Oops. I'm sorry I missed this.
martin> (lambda (buffer)
martin> (let ((window
martin> (if window-system
martin> saved-server-window
martin> (frame-selected-window))))
martin> (set-window-buffer window buffer)
martin> (select-window window)))
martin> seems more appropriate here.
Yeah, this worked. Thank you.
Tom
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-09-10 15:55 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-09 20:37 bug#4386: 23.1; emacsclient -t FILE -vs- server-window Tom Tromey
2009-09-10 5:56 ` martin rudalics
2009-09-10 13:42 ` Stefan Monnier
2009-09-10 15:55 ` Tom Tromey
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.