all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#3053: "emacsclient -a emacs" produces "No server editing buffers exist" when closing buffer
@ 2009-04-19 14:41 Danai SAE-HAN  
  2009-04-20 16:21 ` Stefan Monnier
  0 siblings, 1 reply; 9+ messages in thread
From: Danai SAE-HAN   @ 2009-04-19 14:41 UTC (permalink / raw)
  To: bug-gnu-emacs

[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@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@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@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







^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#3053: "emacsclient -a emacs" produces "No server editing buffers exist" when closing buffer
  2009-04-19 14:41 bug#3053: "emacsclient -a emacs" produces "No server editing buffers exist" when closing buffer Danai SAE-HAN  
@ 2009-04-20 16:21 ` Stefan Monnier
  2009-04-24  9:00   ` Danai SAE-HAN  
  0 siblings, 1 reply; 9+ messages in thread
From: Stefan Monnier @ 2009-04-20 16:21 UTC (permalink / raw)
  To: Danai SAE-HAN  ; +Cc: 3053

> 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






^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#3053: "emacsclient -a emacs" produces "No server editing buffers exist" when closing buffer
  2009-04-20 16:21 ` Stefan Monnier
@ 2009-04-24  9:00   ` Danai SAE-HAN  
  2009-04-24 13:28     ` bug#3053: "emacsclient -a emacs" produces "No server editing Stefan Monnier
  0 siblings, 1 reply; 9+ messages in thread
From: Danai SAE-HAN   @ 2009-04-24  9:00 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: 3053

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






^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#3053: "emacsclient -a emacs" produces "No server editing
  2009-04-24  9:00   ` Danai SAE-HAN  
@ 2009-04-24 13:28     ` Stefan Monnier
  2009-04-25  0:08       ` Danai SAE-HAN  
  0 siblings, 1 reply; 9+ messages in thread
From: Stefan Monnier @ 2009-04-24 13:28 UTC (permalink / raw)
  To: Danai SAE-HAN  ; +Cc: 3053

>> 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






^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#3053: "emacsclient -a emacs" produces "No server editing
  2009-04-24 13:28     ` bug#3053: "emacsclient -a emacs" produces "No server editing Stefan Monnier
@ 2009-04-25  0:08       ` Danai SAE-HAN  
  2009-04-25  1:06         ` Stefan Monnier
  0 siblings, 1 reply; 9+ messages in thread
From: Danai SAE-HAN   @ 2009-04-25  0:08 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: 3053

Hi Stefan

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

[2009-04-25 02:01:27] danai@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






^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#3053: "emacsclient -a emacs" produces "No server editing
  2009-04-25  0:08       ` Danai SAE-HAN  
@ 2009-04-25  1:06         ` Stefan Monnier
  2009-04-25  1:13           ` Danai SAE-HAN  
  0 siblings, 1 reply; 9+ messages in thread
From: Stefan Monnier @ 2009-04-25  1:06 UTC (permalink / raw)
  To: Danai SAE-HAN  ; +Cc: 3053

>   $ ./emacsclient -a "../src/emacs" ../Makefile

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


        Stefan






^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#3053: "emacsclient -a emacs" produces "No server editing
  2009-04-25  1:06         ` Stefan Monnier
@ 2009-04-25  1:13           ` Danai SAE-HAN  
  2009-04-25  3:34             ` Stefan Monnier
  0 siblings, 1 reply; 9+ messages in thread
From: Danai SAE-HAN   @ 2009-04-25  1:13 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: 3053

Hi Stefan

2009/4/25 Stefan Monnier <monnier@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@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






^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#3053: "emacsclient -a emacs" produces "No server editing
  2009-04-25  1:13           ` Danai SAE-HAN  
@ 2009-04-25  3:34             ` Stefan Monnier
  2009-04-25 11:18               ` Danai SAE-HAN  
  0 siblings, 1 reply; 9+ messages in thread
From: Stefan Monnier @ 2009-04-25  3:34 UTC (permalink / raw)
  To: Danai SAE-HAN  ; +Cc: 3053

>>>   $ ./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@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






^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#3053: "emacsclient -a emacs" produces "No server editing
  2009-04-25  3:34             ` Stefan Monnier
@ 2009-04-25 11:18               ` Danai SAE-HAN  
  0 siblings, 0 replies; 9+ messages in thread
From: Danai SAE-HAN   @ 2009-04-25 11:18 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: 3053

Hi Stefan

2009/4/25 Stefan Monnier <monnier@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






^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2009-04-25 11:18 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-19 14:41 bug#3053: "emacsclient -a emacs" produces "No server editing buffers exist" when closing buffer Danai SAE-HAN  
2009-04-20 16:21 ` Stefan Monnier
2009-04-24  9:00   ` Danai SAE-HAN  
2009-04-24 13:28     ` bug#3053: "emacsclient -a emacs" produces "No server editing Stefan Monnier
2009-04-25  0:08       ` Danai SAE-HAN  
2009-04-25  1:06         ` Stefan Monnier
2009-04-25  1:13           ` Danai SAE-HAN  
2009-04-25  3:34             ` Stefan Monnier
2009-04-25 11:18               ` Danai SAE-HAN  

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.