GNU bug report logs - #9305
emacsclient -n -c path/to/file # opens *scratch*

Previous Next

Package: emacs;

Reported by: Stefan Klinger <all-lists <at> stefan-klinger.de>

Date: Mon, 15 Aug 2011 16:39:01 UTC

Severity: normal

Tags: unreproducible

Done: Chong Yidong <cyd <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Chong Yidong <cyd <at> stupidchicken.com>
To: Stefan Klinger <all-lists <at> stefan-klinger.de>
Cc: 9305 <at> debbugs.gnu.org
Subject: bug#9305: emacsclient -n -c path/to/file   # opens *scratch*
Date: Sat, 20 Aug 2011 18:35:50 -0400
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.




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.