[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Best practices for launching Emacs on Windows 7/8
From: |
Ludwig, Mark |
Subject: |
RE: Best practices for launching Emacs on Windows 7/8 |
Date: |
Thu, 21 Feb 2013 15:56:20 +0000 |
[Resending with nicer line breaks for text readers]
> From: Jason Rumney, Wednesday, February 20, 2013 7:37 AM
>
> On Tuesday, 19 February 2013 03:59:43 UTC+8, Ludwig, Mark wrote:
>
> > For example, on Windows Vista, I used to be able to make a file
> > association with .TXT files that invoked emacsclient with the
> > --alternate-editor=runemacs option so that if Emacs wasn't
> > running, it would be launched.
> >
> > In Windows 7 and 8, the GUI simply does not allow any options.
>
> Setting ALTERNATE_EDITOR as an environment variable is an alternative to
> using the command line option. At least in Windows 7 environment variables
> are still accessible from the Advanced properties of "My Computer".
Thanks, everyone!
When I looked back at what I had on Vista, I found that I was
using Emacs 23.1 and working around a bug in emacsclientw that,
if Emacs wasn't running as a server, insisted on popping up an
error dialog box that had to be manually dismissed. (My
workaround was a very complicated command line using NirCmd to
launch emacsclient but keep it hidden. Because it was
emacsclient, I also needed the --no-wait option.) Now that I'm
on Emacs 24.2, I can use emacsclientw directly (which does not
need --no-wait); combined with setting the ALTERNATE_EDITOR
environmental variable, it all works perfectly by simply
associating emacsclientw using the regular file association GUI.
It's very nice.
In reviewing the documentation in
http://www.gnu.org/software/emacs/manual/html_node/emacs/emacsclient-Options.html,
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?
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?
Cheers,
Mark
P.S. I am not subscribed to gnu.emacs.help, so cannot post there.
Can someone else forward this or is there a gateway from
help-gnu-emacs?