mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-11-25 07:28:20 +00:00
683efb8de5
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)
21 lines
616 B
Desktop File
21 lines
616 B
Desktop File
[Desktop Entry]
|
|
Categories=Network;Email;
|
|
Comment=GNU Emacs is an extensible, customizable text editor - and more
|
|
Exec=emacsclient --alternate-editor= --eval "(message-mailto (pop server-eval-args-left))" %u
|
|
Icon=emacs
|
|
Name=Emacs (Mail, Client)
|
|
MimeType=x-scheme-handler/mailto;
|
|
NoDisplay=true
|
|
Terminal=false
|
|
Type=Application
|
|
Keywords=emacsclient;
|
|
Actions=new-window;new-instance;
|
|
|
|
[Desktop Action new-window]
|
|
Name=New Window
|
|
Exec=emacsclient --alternate-editor= --create-frame --eval "(message-mailto (pop server-eval-args-left))" %u
|
|
|
|
[Desktop Action new-instance]
|
|
Name=New Instance
|
|
Exec=emacs -f message-mailto %u
|