diff options
| -rw-r--r-- | doc/emacs/misc.texi | 17 | ||||
| -rw-r--r-- | etc/NEWS | 11 |
2 files changed, 16 insertions, 12 deletions
diff --git a/doc/emacs/misc.texi b/doc/emacs/misc.texi index 9c7c5dcd5da..d3c5712099d 100644 --- a/doc/emacs/misc.texi +++ b/doc/emacs/misc.texi | |||
| @@ -2079,13 +2079,16 @@ files. When this option is given, the arguments to | |||
| 2079 | evaluate, @emph{not} as a list of files to visit. | 2079 | evaluate, @emph{not} as a list of files to visit. |
| 2080 | 2080 | ||
| 2081 | @vindex server-eval-args-left | 2081 | @vindex server-eval-args-left |
| 2082 | If you have arbitrary data which you want to provide as input to one | 2082 | Passing complex Lisp expression via the @option{--eval} command-line |
| 2083 | of your expressions, you can pass the data as another argument to | 2083 | option sometimes requires elaborate escaping of characters special to |
| 2084 | @command{emacsclient} and use @var{server-eval-args-left} in the | 2084 | the shell. To avoid this, you can pass arguments to Lisp functions in |
| 2085 | expression to access the data. Be careful to have your expression | 2085 | your expression as additional separate arguments to |
| 2086 | remove the data from @var{server-eval-args-left} regardless of whether | 2086 | @command{emacsclient}, and use @var{server-eval-args-left} in the |
| 2087 | your code succeeds, such as by using @code{pop}, otherwise Emacs will | 2087 | expression to access those arguments. Be careful to have your |
| 2088 | attempt to evaluate the data as a Lisp expression. | 2088 | expression remove the processed arguments from |
| 2089 | @var{server-eval-args-left} regardless of whether your code succeeds, | ||
| 2090 | for example by using @code{pop}, otherwise Emacs will attempt to | ||
| 2091 | evaluate those arguments as separate Lisp expressions. | ||
| 2089 | 2092 | ||
| 2090 | @item -f @var{server-file} | 2093 | @item -f @var{server-file} |
| 2091 | @itemx --server-file=@var{server-file} | 2094 | @itemx --server-file=@var{server-file} |
| @@ -236,12 +236,13 @@ displayed on the mode line when 'appt-display-mode-line' is non-nil. | |||
| 236 | ** Emacs Server and Client | 236 | ** Emacs Server and Client |
| 237 | 237 | ||
| 238 | --- | 238 | --- |
| 239 | *** 'server-eval-args-left' can be used to pop subsequent eval args | 239 | *** 'server-eval-args-left' can be used to pop and eval subsequent args. |
| 240 | When '--eval' is passed to emacsclient and Emacs is evaluating each | 240 | When '--eval' is passed to emacsclient and Emacs is evaluating each |
| 241 | argument, this variable is set to those which have not yet been | 241 | argument, this variable is set to those arguments not yet evaluated. |
| 242 | evaluated. It can be used to 'pop' arguments to prevent them from | 242 | It can be used to 'pop' arguments and process them by the function |
| 243 | being evaluated, which is useful when those arguments contain | 243 | called in the '--eval' expression, which is useful when those |
| 244 | arbitrary data. | 244 | arguments contain arbitrary characters that otherwise might require |
| 245 | elaborate and error-prone escaping (to protect them from the shell). | ||
| 245 | 246 | ||
| 246 | 247 | ||
| 247 | * Editing Changes in Emacs 30.1 | 248 | * Editing Changes in Emacs 30.1 |