Subject: bug#2024: 23.0.60; Document --daemon incompatibility with X11 options

From: Stephen Berman <[email-masked]>
Date: Sat, 24 Jan 2009 16:06:04 +0100

In GNU Emacs 23.0.60.30 (i686-pc-linux-gnu, GTK+ Version 2.14.4)
 of 2009-01-21 on escher

The discussion of the Emacs server in the Emacs manual (node Emacs
Server) suggests that --daemon and server-start are basically equivalent
methods of starting the server (aside from the difference with respect
to frames, of course).  This leads me to expect that regardless of which
way I start the server, the result of subsequently invoking emacsclient
should be the same.  This is not the case, as the following examples
show:

(i) X resources passed via the -xrm command line option (these are all
shell invocations):

emacs -Q -xrm 'Emacs.ReverseVideo: on' -f server-start
emacsclient -c
=> The client frame is in reverse video

emacs -Q -xrm 'Emacs.ReverseVideo: on' --daemon
emacsclient -c
=> The client frame is in normal video

(ii) The font specification option -fn:

emacs -Q -fn "Dejavu Sans Mono-10" -f server-start
emacsclient -c
=> The client frame's font is Dejavu Sans Mono-10

emacs -Q -fn "Dejavu Sans Mono-10" --daemon
emacsclient -c
=> The client frame's font is
-etl-fixed-medium-r-normal--16-160-72-72-c-80-iso8859-1

(On my system the latter font is used when invoking emacsclient after
emacs with the --daemon option regardless of which font I specify with
-fn.)

I reported the above observations in emacs-devel (see
http://thread.gmane.org/gmane.emacs.devel/108060) and Dan Nicolaescu
replied:

"You seem to assume that "emacs" and "emacs --daemon" are doing the same
thing, they are not,
emacs --daemon 
is similar to 
emacs -nw -f server-start

so emacs --daemon it will ignore all the X11 related options."

I think this similarity should be documented in the Emacs manual.  It
would suffice to prevent the kind of confusion I had to simply point out
the similarity, but it would be more helpful and interesting to briefly
explain why this similarity holds, since it is not obvious and Dan
acknowledged that it would "probably" be possible to implement the
daemon so that X11 options could be passed.

Steve Berman