GNU bug report logs -
#9305
emacsclient -n -c path/to/file # opens *scratch*
Previous Next
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 9305 in the body.
You can then email your comments to 9305 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#9305
; Package
emacs
.
(Mon, 15 Aug 2011 16:39:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Stefan Klinger <all-lists <at> stefan-klinger.de>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Mon, 15 Aug 2011 16:39:01 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Hello,
I'm having a problem with newly created frames when running ‘emacsclient -c
path/to/file’: If there is already a frame showing the file, a new frame is
created (as intended) but it displays a *scratch* buffer, instead of the already
existing buffer for that file.
Expecting a configuration problem, I have recently posted this on help-gnu-emacs
[1], but received no reply.
-- Reproduce --
It's not my fault:
killall -9 emacs
rm -rf ~/.emacs.d/
Now request first frame and start emacs daemon, works as expected (well, almost:
I'd prever emacs not to assign focus to the new frame, but that can be
configured away [2]).
emacsclient -n -a '' -c ~/.bashrc
Now, as long as the frame showing ‘~/.bashrc’ is visible (potentially on another
desktop), the following three commands each open a new frame, each of them
showing *scratch*:
emacsclient -n -a '' -c ~/.bashrc
emacsclient -n -c ~/.bashrc
emacsclient -c ~/.bashrc
When there's no frame showing ‘~/.bashrc’, then each of the above creates a new
frame showing the existing buffer.
-- Expected bahavior --
Check whether there is a buffer visiting test. If so, show that buffer in the
new frame. Otherwise, visit the file in a new buffer and display that one.
-- Information --
‘emacs-version’ reports “GNU Emacs 23.3.1 (x86_64-pc-linux-gnu, X toolkit, Xaw3d
scroll bars) of 2011-04-10 on brahms, modified by Debian”
Actually I still assume this could be configured, but on help-gnu-emacs, nobody seems to know [1].
Thank you!
Stefan
____________________
[1] https://lists.gnu.org/archive/html/help-gnu-emacs/2011-08/msg00056.html
[2] https://bugs.launchpad.net/ubuntu/+source/emacs23/+bug/589035/comments/2
--
Stefan Klinger o/klettern
/\/ bis zum
send plaintext only - max size 32kB - no spam \ Abfallen
http://stefan-klinger.de
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#9305
; Package
emacs
.
(Sat, 20 Aug 2011 14:06:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 9305 <at> debbugs.gnu.org (full text, mbox):
Could anyone confirm this?
--
Stefan Klinger o/klettern
/\/ bis zum
send plaintext only - max size 32kB - no spam \ Abfallen
http://stefan-klinger.de
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#9305
; Package
emacs
.
(Sat, 20 Aug 2011 22:39:01 GMT)
Full text and
rfc822 format available.
Message #11 received at 9305 <at> debbugs.gnu.org (full text, mbox):
Stefan Klinger <all-lists <at> stefan-klinger.de> writes:
> Now request first frame and start emacs daemon, works as expected
>
> emacsclient -n -a '' -c ~/.bashrc
>
> Now, as long as the frame showing ‘~/.bashrc’ is visible (potentially
> on another desktop), the following three commands each open a new
> frame, each of them showing *scratch*:
>
> emacsclient -n -a '' -c ~/.bashrc
> emacsclient -n -c ~/.bashrc
> emacsclient -c ~/.bashrc
>
> When there's no frame showing ‘~/.bashrc’, then each of the above
> creates a new frame showing the existing buffer.
>
> -- Expected bahavior --
>
> Check whether there is a buffer visiting test. If so, show that buffer
> in the new frame. Otherwise, visit the file in a new buffer and
> display that one.
Yeah, the -c option to emacsclient means "create a new graphical frame".
Currently, you need to omit -c if you want Emacs to reuse an existing
frame.
The trouble with this is that if no existing graphical frame exists,
that will create a tty frame. Unfortunately, we don't offer an easy way
to change this behavior yet. This ought to be fixed, though probably
for Emacs 24.2.
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#9305
; Package
emacs
.
(Sun, 21 Aug 2011 19:30:04 GMT)
Full text and
rfc822 format available.
Message #14 received at 9305 <at> debbugs.gnu.org (full text, mbox):
Sorry, maybe I did not make myself clear
On 20 August 2011, Chong Yidong wrote with possible deletions:
> Yeah, the -c option to emacsclient means "create a new graphical frame".
> Currently, you need to omit -c if you want Emacs to reuse an existing
> frame.
I do not want to reuse an existing frame, I do want to have a new frame created.
But I want the new frame to show an existing buffer, if the requested file is already being visited.
> The trouble with this is that if no existing graphical frame exists,
> that will create a tty frame.
This is not the problem I encountered.
--
Stefan Klinger o/klettern
/\/ bis zum
send plaintext only - max size 32kB - no spam \ Abfallen
http://stefan-klinger.de
Added tag(s) unreproducible.
Request was from
Chong Yidong <cyd <at> gnu.org>
to
control <at> debbugs.gnu.org
.
(Sun, 04 Nov 2012 03:14:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#9305
; Package
emacs
.
(Sun, 04 Nov 2012 03:16:02 GMT)
Full text and
rfc822 format available.
Message #19 received at 9305 <at> debbugs.gnu.org (full text, mbox):
Stefan Klinger <all-lists <at> stefan-klinger.de> writes:
> emacsclient -n -a '' -c ~/.bashrc
> emacsclient -n -c ~/.bashrc
> emacsclient -c ~/.bashrc
>
> When there's no frame showing ~/.bashrc, then each of the above
> creates a new frame showing the existing buffer.
Does this problem still occur for you? I haven't been able to reproduce
it. If so, please provide your Emacs version and platform (all the
information which would normally be provided with M-x report-emacs-bug).
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#9305
; Package
emacs
.
(Sun, 04 Nov 2012 15:01:02 GMT)
Full text and
rfc822 format available.
Message #22 received at 9305 <at> debbugs.gnu.org (full text, mbox):
Hello,
and thank you very much for looking into this!
On 2012-Nov-04 11:12 (+0800), Chong Yidong wrote with possible deletions:
> Does this problem still occur for you? I haven't been able to reproduce
> it. If so, please provide your Emacs version and platform (all the
> information which would normally be provided with M-x report-emacs-bug).
Unfortunately yes, the problem still persists:
Experiment 1:
killall -9 emacs
rm -rf ~/.emacs.d/
emacsclient -n -a '' -c ~/.bashrc # first call
emacsclient -n -a '' -c ~/.bashrc # second call
The first call starts emacs showing ~/.bashrc. But the second call
creates a new frame showing *scratch*, and then focuses the other frame
showing ~/.bashrc. Expected bahavior: Open new frame on current
desktop, showing the buffer visiting ~/.bashrc.
Experiment 2:
killall -9 emacs
rm -rf ~/.emacs.d/
emacsclient -n -a '' -c ~/.bashrc # first call
# delete the window using the winidow manager
emacsclient -n -a '' -c ~/.bashrc # second call
Good, the second call created a new frame showing the requested file.
Experiment 3:
killall -9 emacs
rm -rf ~/.emacs.d/
emacsclient -n -a '' -c ~/.bashrc # first call
# iconify window
emacsclient -n -a '' -c ~/.bashrc # second call
Bad: Deiconifies existing window, but also creates a new frame showing
*scratch*, which is unexpected.
Here's the requested information. Please ask if you need any further
information...
In GNU Emacs 23.4.1 (x86_64-pc-linux-gnu, X toolkit, Xaw3d scroll bars)
of 2012-09-08 on trouble, modified by Debian
Windowing system distributor `The X.Org Foundation', version 11.0.11204000
configured using `configure '--build' 'x86_64-linux-gnu' '--build' 'x86_64-linux-gnu' '--prefix=/usr' '--sharedstatedir=/var/lib' '--libexecdir=/usr/lib' '--localstatedir=/var/lib' '--infodir=/usr/share/info' '--mandir=/usr/share/man' '--with-pop=yes' '--enable-locallisppath=/etc/emacs23:/etc/emacs:/usr/local/share/emacs/23.4/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/23.4/site-lisp:/usr/share/emacs/site-lisp' '--with-crt-dir=/usr/lib/x86_64-linux-gnu' '--with-x=yes' '--with-x-toolkit=lucid' '--with-toolkit-scroll-bars' '--without-gconf' 'build_alias=x86_64-linux-gnu' 'CFLAGS=-g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wall -DDEBIAN -O2' 'CPPFLAGS=-D_FORTIFY_SOURCE=2''
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: Lisp Interaction
Minor modes in effect:
tooltip-mode: t
mouse-wheel-mode: t
tool-bar-mode: t
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
auto-encryption-mode: t
auto-compression-mode: t
line-number-mode: t
transient-mark-mode: t
Recent input:
M-x <help-echo> <down-mouse-2> <mouse-2> <return>
Recent messages:
Loading /var/cache/dictionaries-common/emacsen-ispell-default.el (source)...done
Loading debian-ispell...done
Loading /var/cache/dictionaries-common/emacsen-ispell-dicts.el (source)...done
Loading /etc/emacs/site-start.d/50dictionaries-common.el (source)...done
Loading /etc/emacs/site-start.d/50haskell-mode.el (source)...
Loading haskell-site-file...done
Loading /etc/emacs/site-start.d/50haskell-mode.el (source)...done
Loading /etc/emacs/site-start.d/50psvn.el (source)...done
Starting Emacs daemon.
When done with this frame, type C-x 5 0
Load-path shadows:
/usr/share/emacs/23.4/site-lisp/debian-startup hides /usr/share/emacs/site-lisp/debian-startup
/usr/share/emacs23/site-lisp/dictionaries-common/ispell hides /usr/share/emacs/23.4/lisp/textmodes/ispell
/usr/share/emacs23/site-lisp/dictionaries-common/flyspell hides /usr/share/emacs/23.4/lisp/textmodes/flyspell
Features:
(shadow sort mail-extr message sendmail regexp-opt ecomplete rfc822 mml
easymenu mml-sec password-cache mm-decode mm-bodies mm-encode mailcap
mail-parse rfc2231 rfc2047 rfc2045 qp ietf-drums mailabbrev nnheader
gnus-util netrc time-date mm-util mail-prsvr gmm-utils wid-edit
mailheader canlock sha1 hex-util hashcash mail-utils emacsbug server
tooltip ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd
font-setting tool-bar dnd fontset image fringe lisp-mode register page
menu-bar rfn-eshadow timer select scroll-bar mldrag mouse jit-lock
font-lock syntax facemenu font-core frame cham georgian utf-8-lang
misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew
greek romanian slovak czech european ethiopic indian cyrillic chinese
case-table epa-hook jka-cmpr-hook help simple abbrev loaddefs button
minibuffer faces cus-face files text-properties overlay md5 base64
format env code-pages mule custom widget hashtable-print-readable
backquote make-network-process dbusbind font-render-setting x-toolkit x
multi-tty emacs)
--
Stefan Klinger o/klettern
/\/ bis zum
send plaintext only - max size 32kB - no spam \ Abfallen
http://stefan-klinger.de
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#9305
; Package
emacs
.
(Sat, 08 Dec 2012 02:41:01 GMT)
Full text and
rfc822 format available.
Message #25 received at 9305 <at> debbugs.gnu.org (full text, mbox):
Stefan Klinger <all-lists <at> stefan-klinger.de> writes:
> killall -9 emacs
> rm -rf ~/.emacs.d/
>
> emacsclient -n -a '' -c ~/.bashrc # first call
> emacsclient -n -a '' -c ~/.bashrc # second call
>
> The first call starts emacs showing ~/.bashrc. But the second call
> creates a new frame showing *scratch*, and then focuses the other frame
> showing ~/.bashrc. Expected bahavior: Open new frame on current
> desktop, showing the buffer visiting ~/.bashrc.
Thanks, I can reproduce this in Emacs 23.4. It is already fixed in
Emacs 24. Thanks for the bug report.
bug closed, send any further explanations to
9305 <at> debbugs.gnu.org and Stefan Klinger <all-lists <at> stefan-klinger.de>
Request was from
Chong Yidong <cyd <at> gnu.org>
to
control <at> debbugs.gnu.org
.
(Sat, 08 Dec 2012 02:41: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
.
(Sat, 05 Jan 2013 12:24:02 GMT)
Full text and
rfc822 format available.
This bug report was last modified 12 years and 172 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.