all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Ludwig, Mark" <ludwig.mark@siemens.com>
To: Jason Rumney <jasonrumney@gmail.com>,
	"gnu.emacs.help@googlegroups.com"
	<gnu.emacs.help@googlegroups.com>
Cc: "help-gnu-emacs@gnu.org" <help-gnu-emacs@gnu.org>
Subject: RE: Best practices for launching Emacs on Windows 7/8
Date: Thu, 21 Feb 2013 15:56:20 +0000	[thread overview]
Message-ID: <BC5672F8AD4C054BAF167C9801500D1ABCACD435@USSLMMBX002.net.plm.eds.com> (raw)
In-Reply-To: <c08c6938-83c3-483a-8f10-a1554faf9c98@googlegroups.com>

[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?



  parent reply	other threads:[~2013-02-21 15:56 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.20310.1361217600.855.help-gnu-emacs@gnu.org>
2013-02-20 13:36 ` Best practices for launching Emacs on Windows 7/8 Jason Rumney
2013-02-21 15:23   ` Ludwig, Mark
2013-02-21 15:37     ` W. Greenhouse
2013-02-21 15:56   ` Ludwig, Mark [this message]
2013-02-20 16:30 Buchs, Kevin
  -- strict thread matches above, loose matches on Subject: below --
2013-02-19 17:36 Buchs, Kevin
2013-02-18 19:59 Ludwig, Mark
2013-02-19 18:44 ` "Jérôme M. Berger"

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=BC5672F8AD4C054BAF167C9801500D1ABCACD435@USSLMMBX002.net.plm.eds.com \
    --to=ludwig.mark@siemens.com \
    --cc=gnu.emacs.help@googlegroups.com \
    --cc=help-gnu-emacs@gnu.org \
    --cc=jasonrumney@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.