summaryrefslogtreecommitdiff
path: root/etc/NEWS
diff options
context:
space:
mode:
authorSpencer Baugh <sbaugh@catern.com>2023-09-21 21:35:50 -0400
committerEli Zaretskii <eliz@gnu.org>2023-10-29 14:10:23 +0200
commit683efb8de5ac3a2ba5ecc073d8c912ec6a61191d (patch)
tree7dbcdda2792a34b22fb19f1c36568e5329442bdd /etc/NEWS
parentf3a27180b7b22e8220f9d92d91ece835545da4aa (diff)
downloademacs-683efb8de5ac3a2ba5ecc073d8c912ec6a61191d.tar.gz
Add 'server-eval-args-left' to server.el
Passing arbitrary arguments to functions through "emacsclient --eval" sometimes requires complicated escaping to avoid them being parsed as Lisp (as seen in emacsclient-mail.desktop before this change). The new variable 'server-eval-args-left' allows access to the arguments before they are parsed as Lisp. By removing arguments from the variable before they're parsed, a snippet of Lisp can consume arguments, as in emacsclient-mail.desktop. org-protocol might be able to use this as well, which might allow it to drop its current advice on server-visit-files. * etc/emacsclient-mail.desktop: Use 'server-eval-args-left'. * lisp/server.el (server-eval-args-left): New variable. (server-process-filter, server-execute): Make '-eval' arguments available through 'server-eval-args-left'. * lisp/startup.el (argv): Mention 'server-eval-args-left' in docstring. * etc/NEWS: Announce 'server-eval-args-left'. * doc/emacs/misc.texi (emacsclient Options): Document 'server-eval-args-left'. (Bug#65902)
Diffstat (limited to 'etc/NEWS')
-rw-r--r--etc/NEWS10
1 files changed, 10 insertions, 0 deletions
diff --git a/etc/NEWS b/etc/NEWS
index 8ae7b89..84a0349 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -233,6 +233,16 @@ to enter the file you want to modify.
It can be used to customize the look of the appointment notification
displayed on the mode line when 'appt-display-mode-line' is non-nil.
+** Emacs Server and Client
+
+---
+*** 'server-eval-args-left' can be used to pop subsequent eval args
+When '--eval' is passed to emacsclient and Emacs is evaluating each
+argument, this variable is set to those which have not yet been
+evaluated. It can be used to 'pop' arguments to prevent them from
+being evaluated, which is useful when those arguments contain
+arbitrary data.
+
* Editing Changes in Emacs 30.1