GNU bug report logs - #12780
Starting emacs as a daemon, and requesting a client with -n

Previous Next

Package: emacs;

Reported by: Justin Wood <justin.k.wood <at> gmail.com>

Date: Thu, 1 Nov 2012 21:14:01 UTC

Severity: important

Done: Jan Djärv <jan.h.d <at> swipnet.se>

Bug is archived. No further changes may be made.

Full log


Message #14 received at 12780 <at> debbugs.gnu.org (full text, mbox):

From: Jan Djärv <jan.h.d <at> swipnet.se>
To: Glenn Morris <rgm <at> gnu.org>
Cc: 12780 <at> debbugs.gnu.org, Justin Wood <justin.k.wood <at> gmail.com>
Subject: Re: bug#12780: Starting emacs as a daemon,
	and requesting a client with -n
Date: Fri, 2 Nov 2012 19:32:47 +0100
Hello.

2 nov 2012 kl. 16:46 skrev Glenn Morris <rgm <at> gnu.org>:

> 
> Forwarding a reply I received off list (please reply-to-all).
> 
> Justin Wood wrote (on Fri, 2 Nov 2012 at 10:49 -0400):
> 
>> Unfortunately, using "emacs -Q --daemon" still does not work
>> correctly with "emacsclient -c -n".
> 
> Can anyone else with a Mac reproduce this?

Yes.  Basically server.el does not handle the non-display situation of Nextstep.  When emacsclient connects it sends back window system unsupported, and then emacsclient tries to create a tty frame (which end up being a GUI frame).  A side effect is that emacsclient gives two "Waiting for Emacs..." messages.

But with -n, there is just window system unsupported, no attempt to create a tty frame.

The patch below fixes this, but the code is probably in the wrong place.

	Jan D.

=== modified file 'lisp/server.el'
--- lisp/server.el	2012-10-07 22:31:58 +0000
+++ lisp/server.el	2012-11-02 18:27:36 +0000
@@ -841,7 +841,9 @@
 
     (unless (assq w window-system-initialization-alist)
       (setq w nil))
-
+    (if (and (not w) (eq (window-system) 'ns))
+	(progn (setq w 'ns)
+	       (setq display nil)))
     (cond (w
            ;; Flag frame as client-created, but use a dummy client.
            ;; This will prevent the frame from being deleted when


	Jan D.





This bug report was last modified 12 years and 201 days ago.

Previous Next


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