GNU bug report logs - #3053
"emacsclient -a emacs" produces "No server editing buffers exist" when closing buffer

Previous Next

Package: emacs;

Reported by: Danai SAE-HAN (韓達耐) <danai.saehan <at> gmail.com>

Date: Sun, 19 Apr 2009 14:45:44 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 3053 in the body.
You can then email your comments to 3053 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#3053; Package emacs. (Sun, 19 Apr 2009 14:45:44 GMT) Full text and rfc822 format available.

Acknowledgement sent to Danai SAE-HAN (韓達耐) <danai.saehan <at> gmail.com>:
New bug report received and forwarded. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Sun, 19 Apr 2009 14:45:44 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Danai SAE-HAN (韓達耐) <danai.saehan <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: "emacsclient -a emacs" produces "No server editing buffers exist" 
	when closing buffer
Date: Sun, 19 Apr 2009 16:41:01 +0200
[Please put me in CC when you reply.]

Hi

As suggested per the online Emacs manual [1], I have set the $EDITOR
variable to emacsclient with the -a argument.

[2009-04-19 16:17:37] danai <at> danai:~/examples/examples-current
  $ echo $EDITOR
emacsclient --alternate-editor emacs +%d %s

When $EDITOR gets called from scripts, such as "reportbug" on Debian,
and Emacs is not started yet, a new instance of Emacs will be launched
(as can be expected).  However, I cannot close back the buffer with
C-x #.  Pressing this shortcut so will result in a message "No server
editing buffers exist".

I can still save the file with C-x C-s and then close the buffer with
C-x k, because "reportbug" uses a file in /tmp, but I would like to
see that the classic way of closing a buffer from an external call is
retained (i.e. C-x #).

When Emacs is already started, emacsclient opens correctly and I can
close the buffer with C-#.

[2009-04-19 16:17:39] danai <at> danai:~/examples/examples-current
  $ emacs --version
GNU Emacs 22.3.1
Copyright (C) 2008 Free Software Foundation, Inc.
GNU Emacs comes with ABSOLUTELY NO WARRANTY.
You may redistribute copies of Emacs
under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING.

[2009-04-19 16:22:50] danai <at> danai:~/examples/examples-current
  $ cat /etc/debian_version
squeeze/sid

[1] http://www.gnu.org/software/emacs/manual/html_node/emacs/Invoking-emacsclient.html


Best regards


-- 
Danai





Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#3053; Package emacs. (Mon, 20 Apr 2009 16:25:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Stefan Monnier <monnier <at> IRO.UMontreal.CA>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Mon, 20 Apr 2009 16:25:03 GMT) Full text and rfc822 format available.

Message #10 received at 3053 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
To: Danai SAE-HAN (韓達耐)
 <danai.saehan <at> gmail.com>
Cc: 3053 <at> debbugs.gnu.org
Subject: Re: bug#3053: "emacsclient -a emacs" produces "No server editing buffers exist" when closing buffer
Date: Mon, 20 Apr 2009 12:21:04 -0400
> When $EDITOR gets called from scripts, such as "reportbug" on Debian,
> and Emacs is not started yet, a new instance of Emacs will be launched
> (as can be expected).  However, I cannot close back the buffer with
> C-x #.  Pressing this shortcut so will result in a message "No server
> editing buffers exist".

You probably want to use the new "-a ''" argument, which will start an
Emacs in server mode.


        Stefan




bug closed, send any further explanations to Danai SAE-HAN (韓達耐) <danai.saehan <at> gmail.com> Request was from Chong Yidong <cyd <at> stupidchicken.com> to control <at> emacsbugs.donarmstrong.com. (Thu, 23 Apr 2009 01:55:05 GMT) Full text and rfc822 format available.

Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#3053; Package emacs. (Fri, 24 Apr 2009 09:05:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Danai SAE-HAN (韓達耐) <danai.saehan <at> gmail.com>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Fri, 24 Apr 2009 09:05:04 GMT) Full text and rfc822 format available.

Message #17 received at 3053 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Danai SAE-HAN (韓達耐) <danai.saehan <at> gmail.com>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 3053 <at> debbugs.gnu.org
Subject: Re: bug#3053: "emacsclient -a emacs" produces "No server editing 
	buffers exist" when closing buffer
Date: Fri, 24 Apr 2009 11:00:05 +0200
Hi

> You probably want to use the new "-a ''" argument, which will start an Emacs in server mode.

Is the -a behaviour from the development version different from Emacs 22?

Best regards

-- 
Danai




Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#3053; Package emacs. (Fri, 24 Apr 2009 13:30:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Stefan Monnier <monnier <at> iro.umontreal.ca>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Fri, 24 Apr 2009 13:30:03 GMT) Full text and rfc822 format available.

Message #22 received at 3053 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Danai SAE-HAN (韓達耐)
 <danai.saehan <at> gmail.com>
Cc: 3053 <at> debbugs.gnu.org
Subject: Re: bug#3053: "emacsclient -a emacs" produces "No server editing
Date: Fri, 24 Apr 2009 09:28:15 -0400
>> You probably want to use the new "-a ''" argument, which will start
>> an Emacs in server mode.

> Is the -a behaviour from the development version different from Emacs 22?

Yes, in the case where "-a ''" is used.


        Stefan




Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#3053; Package emacs. (Sat, 25 Apr 2009 00:15:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Danai SAE-HAN (韓達耐) <danai.saehan <at> gmail.com>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Sat, 25 Apr 2009 00:15:04 GMT) Full text and rfc822 format available.

Message #27 received at 3053 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Danai SAE-HAN (韓達耐) <danai.saehan <at> gmail.com>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 3053 <at> debbugs.gnu.org
Subject: Re: bug#3053: "emacsclient -a emacs" produces "No server editing
Date: Sat, 25 Apr 2009 02:08:39 +0200
Hi Stefan

I have compiled "EMACS_PRETEST_23_0_92.tar.gz" and tried the following command:

[2009-04-25 02:01:27] danai <at> danai:/usr/src/EMACS_PRETEST_23_0_92/lib-src
  $ ./emacsclient -a "../src/emacs" ../Makefile
./emacsclient: can't find socket; have you started the server?
To start the server in Emacs, type "M-x server-start".

Now a new Emacs instance is started, and my own ~/.emacs is loaded
which includes "(server-start)".

When I close the "Makefile" buffer with "C-x #" I still get the same
message: "No server editing buffers exist".

In other words: when emacsclient fails to load because there is no
server running, it will launch "../src/emacs ../Makefile".  What I
would like to see instead, is that it will launch "../src/emacs"
first, and then try "emacsclient ../Makefile" again.  This behaviour
seems more logical to me.

Best regards

-- 
Danai




Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#3053; Package emacs. (Sat, 25 Apr 2009 01:15:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Stefan Monnier <monnier <at> iro.umontreal.ca>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Sat, 25 Apr 2009 01:15:03 GMT) Full text and rfc822 format available.

Message #32 received at 3053 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Danai SAE-HAN (韓達耐)
 <danai.saehan <at> gmail.com>
Cc: 3053 <at> debbugs.gnu.org
Subject: Re: bug#3053: "emacsclient -a emacs" produces "No server editing
Date: Fri, 24 Apr 2009 21:06:11 -0400
>   $ ./emacsclient -a "../src/emacs" ../Makefile

Any reason why you didn't try the "-a ''" that I suggested?
I.e. ./emacsclient -a "" ../Makefile


        Stefan




Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#3053; Package emacs. (Sat, 25 Apr 2009 01:20:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Danai SAE-HAN (韓達耐) <danai.saehan <at> gmail.com>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Sat, 25 Apr 2009 01:20:03 GMT) Full text and rfc822 format available.

Message #37 received at 3053 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Danai SAE-HAN (韓達耐) <danai.saehan <at> gmail.com>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 3053 <at> debbugs.gnu.org
Subject: Re: bug#3053: "emacsclient -a emacs" produces "No server editing
Date: Sat, 25 Apr 2009 03:13:52 +0200
Hi Stefan

2009/4/25 Stefan Monnier <monnier <at> iro.umontreal.ca>:
>>   $ ./emacsclient -a "../src/emacs" ../Makefile
>
> Any reason why you didn't try the "-a ''" that I suggested?
> I.e. ./emacsclient -a "" ../Makefile

Because I get an error:

[2009-04-25 03:10:40] danai <at> danai:/usr/src/EMACS_PRETEST_23_0_92/lib-src
  $ ./emacsclient -a "" ../Makefile
./emacsclient: can't find socket; have you started the server?
To start the server in Emacs, type "M-x server-start".

In Emacs I get a Backtrace with the following output:

Debugger entered--Lisp error: (error "Unknown option `--daemon'")
  signal(error ("Unknown option `--daemon'"))
  error("Unknown option `%s'" "--daemon")
  command-line-1(("--daemon"))
  command-line()
  normal-top-level()


Best regards


-- 
Danai




Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#3053; Package emacs. (Sat, 25 Apr 2009 03:40:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Stefan Monnier <monnier <at> iro.umontreal.ca>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Sat, 25 Apr 2009 03:40:04 GMT) Full text and rfc822 format available.

Message #42 received at 3053 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Danai SAE-HAN (韓達耐)
 <danai.saehan <at> gmail.com>
Cc: 3053 <at> debbugs.gnu.org
Subject: Re: bug#3053: "emacsclient -a emacs" produces "No server editing
Date: Fri, 24 Apr 2009 23:34:20 -0400
>>>   $ ./emacsclient -a "../src/emacs" ../Makefile
>> 
>> Any reason why you didn't try the "-a ''" that I suggested?
>> I.e. ./emacsclient -a "" ../Makefile

> Because I get an error:

> [2009-04-25 03:10:40] danai <at> danai:/usr/src/EMACS_PRETEST_23_0_92/lib-src
>   $ ./emacsclient -a "" ../Makefile
> ./emacsclient: can't find socket; have you started the server?
> To start the server in Emacs, type "M-x server-start".

> In Emacs I get a Backtrace with the following output:

> Debugger entered--Lisp error: (error "Unknown option `--daemon'")
>   signal(error ("Unknown option `--daemon'"))
>   error("Unknown option `%s'" "--daemon")
>   command-line-1(("--daemon"))
>   command-line()
>   normal-top-level()

Looks like `emacsclient' finds an older `emacs' which doesn't understand
the --daemon argument.  Can you try to make sure that the `emacs' in the
PATH is 23.0.92?


        Stefan




Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#3053; Package emacs. (Sat, 25 Apr 2009 11:25:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Danai SAE-HAN (韓達耐) <danai.saehan <at> gmail.com>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Sat, 25 Apr 2009 11:25:04 GMT) Full text and rfc822 format available.

Message #47 received at 3053 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Danai SAE-HAN (韓達耐) <danai.saehan <at> gmail.com>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 3053 <at> debbugs.gnu.org
Subject: Re: bug#3053: "emacsclient -a emacs" produces "No server editing
Date: Sat, 25 Apr 2009 13:18:16 +0200
Hi Stefan

2009/4/25 Stefan Monnier <monnier <at> iro.umontreal.ca>:
>
> Looks like `emacsclient' finds an older `emacs' which doesn't understand
> the --daemon argument.  Can you try to make sure that the `emacs' in the
> PATH is 23.0.92?

You are absolutely right; my bad.  I have now symlinked src/emacs to
~/bin/emacs (which comes earlier in the PATH) and it works.

Thanks for all your help, Stefan!


-- 
Danai




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> emacsbugs.donarmstrong.com. (Sun, 24 May 2009 14:24:09 GMT) Full text and rfc822 format available.

This bug report was last modified 16 years and 86 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.