[Top][All Lists]

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

Re: Best practices for launching Emacs on Windows 7/8

From: W. Greenhouse
Subject: Re: Best practices for launching Emacs on Windows 7/8
Date: Thu, 21 Feb 2013 15:37:47 +0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux)

Hi Mark,

"Ludwig, Mark" <> writes:

> In reviewing the documentation in
> it incorrectly claims:
>    '-a command'
>    '--alternate-editor=command'
>    Specify a command to run if emacsclient fails to contact Emacs. This is 
> useful when running emacsclient in a script. 
>    As a special exception, if command is the empty string, then
> emacsclient starts Emacs in daemon mode (as emacs --daemon) and then
> tries connecting again.
> Instead with an empty string, emacsclient/emacsclientw 24.2 complain:
>    --alternate-editor argument or ALTERNATE_EDITOR variable cannot be
>    an empty string
> Is this a documentation problem or is the code incorrect?  That is,
> which way should I report the bug?

Sounds like a documentation bug.  The Info node/online manual entry for
Emacsclient is correct with respect to Emacs on UNIX-like systems, where
launching emacsclient with ALTERNATE_EDITOR set to the empty string does
launch an emacs daemon and then immediately attach a client to it.
emacsclientw is subtly different from emacsclient, and this is one of
the ways.

> Side-question: I have (server-start) in my init (which is fairly
> complicated), so I use runemacs and never use emacs --daemon, but I
> wonder if there's any effective difference.  Is there anything really
> special about emacs --daemon that I might be missing by using
> (server-start) myself?

The initialization and behavior of a normal, interactive Emacs with
(server-start) vs. an Emacs invoked with emacs --daemon is subtly
different.  This is because the "normal" Emacs has a GUI window or a
terminal as its "initial frame," whereas the "initial frame" of an emacs
--daemon instance is not displayed to the user at all.  This matters for
things like what happens if you kill the sole GUI window/emacs frame
displayed on the system (for a "normal" Emacs, this will kill Emacs, but
for emacs --daemon it keeps running backgrounded), and for some
initialization issues like font selection and detection of whether Emacs
is running under a window system or not (operations on the "initial
frame" of an Emacs daemon that are supposed to detect the windowing
environment or set fonts won't do anything, because they're operating on
that backgrounded not-a-frame-at-all daemon frame; you should use
variables such as default-frame-alist or after-make-frame-functions

As far as the server/emacsclient functionality they're the same, though.

> Cheers,
> Mark
> P.S. I am not subscribed to, so cannot post there.  Can
> someone else forward this or is there a gateway from help-gnu-emacs?

It's a gateway to help-gnu-emacs.


Attachment: pgpdr94uCXese.pgp
Description: PGP signature

reply via email to

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