emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

--daemon vs. server-start


From: Stephen Berman
Subject: --daemon vs. server-start
Date: Thu, 22 Jan 2009 00:03:41 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

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.  But I have encountered some systematic asymmetries.
I don't know if these are expected but undocumented, or I have failed to
find the documentation, or there is a bug.

(i) One asymmetry concerns certain 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

The same pattern holds for the resources Foreground, Background,
MenuBar, ToolBar.  (I haven't tested all X resources yet.)  In contrast,
for resources that have their own command line option, there is no
asymmetry:

emacs -Q -rv -f server-start
emacsclient -c
=> The client frame is in reverse video

emacs -Q -rv --daemon
emacsclient -c
=> The client frame is in reverse video

Likewise for -fg and -bg.

(ii) Another asymmetry concerns 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.)

(iii) In the preceding cases it is with --daemon that the expected (and
desirable) result of invoking emacsclient is missing.  But there is also
a case, apparently unrelated to X resources, where after invoking Emacs
with --daemon, the result of invoking emacsclient is what I expect (and
prefer) but not after invoking Emacs with -f start-server:

emacs -Q --daemon
emacsclient -c
=> The frame that appears has desktop focus

emacs -Q -f start-server
emacsclient -c
=> The frame that appears does not have desktop focus (rather, the xterm
window still has focus).

All these aysmmetries seem like bugs.  Are they?

Steve Berman





reply via email to

[Prev in Thread] Current Thread [Next in Thread]