diff options
| author | Reuben Thomas | 2016-12-01 15:21:57 +0000 |
|---|---|---|
| committer | Reuben Thomas | 2017-08-30 21:59:38 +0100 |
| commit | 98f01a13a3bf2a4db2dcc82a342ee017326de732 (patch) | |
| tree | 70aac99762c0ee95026ec72fc307304b6700d372 /doc | |
| parent | dc313922d826b9f53cf1426ff36c8cc3f71d64c6 (diff) | |
| download | emacs-98f01a13a3bf2a4db2dcc82a342ee017326de732.tar.gz emacs-98f01a13a3bf2a4db2dcc82a342ee017326de732.zip | |
Add support for arguments in emacsclient's ALTERNATE_EDITOR (Bug #25082)
* 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.
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/emacs/misc.texi | 4 | ||||
| -rw-r--r-- | doc/man/emacsclient.1 | 6 |
2 files changed, 6 insertions, 4 deletions
diff --git a/doc/emacs/misc.texi b/doc/emacs/misc.texi index 73a6bae767a..7602fbb7454 100644 --- a/doc/emacs/misc.texi +++ b/doc/emacs/misc.texi | |||
| @@ -1821,8 +1821,10 @@ listed below: | |||
| 1821 | @table @samp | 1821 | @table @samp |
| 1822 | @item -a @var{command} | 1822 | @item -a @var{command} |
| 1823 | @itemx --alternate-editor=@var{command} | 1823 | @itemx --alternate-editor=@var{command} |
| 1824 | Specify a command to run if @code{emacsclient} fails to contact Emacs. | 1824 | Specify a shell command to run if @code{emacsclient} fails to contact Emacs. |
| 1825 | This is useful when running @code{emacsclient} in a script. | 1825 | This is useful when running @code{emacsclient} in a script. |
| 1826 | The command may include arguments, which may be quoted "like this". | ||
| 1827 | Currently, escaping of quotes is not supported. | ||
| 1826 | 1828 | ||
| 1827 | As a special exception, if @var{command} is the empty string, then | 1829 | As a special exception, if @var{command} is the empty string, then |
| 1828 | @code{emacsclient} starts Emacs in daemon mode (as @command{emacs | 1830 | @code{emacsclient} starts Emacs in daemon mode (as @command{emacs |
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 | |||
| 62 | is treated as column 1. | 62 | is treated as column 1. |
| 63 | This option applies only to the next file specified. | 63 | This option applies only to the next file specified. |
| 64 | .TP | 64 | .TP |
| 65 | .B \-a, \-\-alternate-editor=EDITOR | 65 | .B \-a, \-\-alternate-editor=COMMAND |
| 66 | if the Emacs server is not running, run the specified editor instead. | 66 | if the Emacs server is not running, run the specified shell command instead. |
| 67 | This can also be specified via the ALTERNATE_EDITOR environment variable. | 67 | This can also be specified via the ALTERNATE_EDITOR environment variable. |
| 68 | If the value of EDITOR is the empty string, run "emacs \-\-daemon" to | 68 | If the value of ALTERNATE_EDITOR is the empty string, run "emacs \-\-daemon" to |
| 69 | start Emacs in daemon mode, and try to connect to it. | 69 | start Emacs in daemon mode, and try to connect to it. |
| 70 | .TP | 70 | .TP |
| 71 | .B -c, \-\-create-frame | 71 | .B -c, \-\-create-frame |