From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Ludwig, Mark" Newsgroups: gmane.emacs.help Subject: RE: Best practices for launching Emacs on Windows 7/8 Date: Thu, 21 Feb 2013 15:23:49 +0000 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1361460254 1965 80.91.229.3 (21 Feb 2013 15:24:14 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 21 Feb 2013 15:24:14 +0000 (UTC) Cc: "help-gnu-emacs@gnu.org" To: Jason Rumney , "gnu.emacs.help@googlegroups.com" Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Feb 21 16:24:36 2013 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1U8Y0b-0001pJ-Sn for geh-help-gnu-emacs@m.gmane.org; Thu, 21 Feb 2013 16:24:30 +0100 Original-Received: from localhost ([::1]:46127 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U8Y0H-00066O-CZ for geh-help-gnu-emacs@m.gmane.org; Thu, 21 Feb 2013 10:24:09 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:57603) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U8Y06-00065u-JS for help-gnu-emacs@gnu.org; Thu, 21 Feb 2013 10:24:05 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U8Y03-0001vq-Tn for help-gnu-emacs@gnu.org; Thu, 21 Feb 2013 10:23:58 -0500 Original-Received: from usslmhub002.ugs.com ([134.244.32.85]:17989 helo=ugs.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U8Y03-0001up-Mc for help-gnu-emacs@gnu.org; Thu, 21 Feb 2013 10:23:55 -0500 Original-Received: from USSLMMBX003.net.plm.eds.com (161.134.138.61) by USSLMHUB002.net.plm.eds.com (134.244.32.85) with Microsoft SMTP Server (TLS) id 14.2.318.1; Thu, 21 Feb 2013 09:23:51 -0600 Original-Received: from USSLMMBX002.net.plm.eds.com ([169.254.1.37]) by USSLMMBX003.net.plm.eds.com ([169.254.2.248]) with mapi id 14.02.0318.001; Thu, 21 Feb 2013 09:23:51 -0600 Thread-Topic: Best practices for launching Emacs on Windows 7/8 Thread-Index: AQHOD29RO67nGlxtQZmdqBkMyLNrmpiEaNzw In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [146.122.224.34] X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 X-Received-From: 134.244.32.85 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:89213 Archived-At: > From: Jason Rumney, Wednesday, February 20, 2013 7:37 AM >=20 > On Tuesday, 19 February 2013 03:59:43 UTC+8, Ludwig, Mark wrote: >=20 > > 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=3Drunemacs 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. >=20 > Setting ALTERNATE_EDITOR as an environment variable is an alternative to > using the command line option. At least in Windows 7 environment variabl= es > 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 2= 3.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 manu= ally dismissed. (My workaround was a very complicated command line using N= irCmd 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 u= se emacsclientw directly (which does not need --no-wait); combined with set= ting the ALTERNATE_EDITOR environmental variable, it all works perfectly by= simply associating emacsclientw using the regular file association GUI. I= t'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=3Dcommand' Specify a command to run if emacsclient fails to contact Emacs. This is = useful when running emacsclient in a script.=20 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.=20 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 w= ay should I report the bug? Side-question: I have (server-start) in my init (which is fairly complicate= d), 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 some= one else forward this or is there a gateway from help-gnu-emacs?