From 98f01a13a3bf2a4db2dcc82a342ee017326de732 Mon Sep 17 00:00:00 2001 From: Reuben Thomas Date: Thu, 1 Dec 2016 15:21:57 +0000 Subject: Add support for arguments in emacsclient's ALTERNATE_EDITOR (Bug #25082) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * lib-src/emacsclient.c (fail): Parse ALTERNATE_EDITOR, or corresponding command-line argument, into quote- or space-separated tokens. If a token starts with a quote, then it naturally is expected to end with a quote; escaping is not supported. This is enough to cope with the typical case of requiring the initial path to be quoted, common on Windows where it may contain spaces. * etc/NEWS: Document. * doc/emacs/misc.texi: Likewise. * doc/man/emacsclient.1: Tweak to remove the implication that only an editor can be specified (the manual already mentions a “command”). Fix a small error where “EDITOR” is referred to rather than “ALTERNATE_EDITOR”. * test/lib-src/emacsclient-tests.el: Add tests. --- doc/man/emacsclient.1 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'doc/man/emacsclient.1') diff --git a/doc/man/emacsclient.1 b/doc/man/emacsclient.1 index 010eeba19c1..daaacab7f3e 100644 --- a/doc/man/emacsclient.1 +++ b/doc/man/emacsclient.1 @@ -62,10 +62,10 @@ A missing is treated as column 1. This option applies only to the next file specified. .TP -.B \-a, \-\-alternate-editor=EDITOR -if the Emacs server is not running, run the specified editor instead. +.B \-a, \-\-alternate-editor=COMMAND +if the Emacs server is not running, run the specified shell command instead. This can also be specified via the ALTERNATE_EDITOR environment variable. -If the value of EDITOR is the empty string, run "emacs \-\-daemon" to +If the value of ALTERNATE_EDITOR is the empty string, run "emacs \-\-daemon" to start Emacs in daemon mode, and try to connect to it. .TP .B -c, \-\-create-frame -- cgit v1.2.3