aboutsummaryrefslogtreecommitdiffstats
path: root/etc/emacsclient-mail.desktop (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Add 'server-eval-args-left' to server.elSpencer Baugh2023-10-291-5/+2
| | | | | | | | | | | | | | | | | | | | | | | | | 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)
* Avoid using bash in the emacsclient desktop fileUlrich Müller2023-03-081-3/+3
| | | | | * etc/emacsclient-mail.desktop (Exec): Use sh and sed instead of bash, because the latter may not be available everywhere.
* Fix Elisp code injection vulnerability in emacsclient-mail.desktopUlrich Müller2023-03-071-2/+5
| | | | | | | | | | | | | | | | | A crafted mailto URI could contain unescaped double-quote characters, allowing injection of Elisp code. Therefore, any '\' and '"' characters are replaced by '\\' and '\"', using Bash pattern substitution (which is not available in the POSIX shell). We want to pass literal 'u=${1//\\/\\\\}; u=${u//\"/\\\"};' in the bash -c command, but in the desktop entry '"', '$', and '\' must be escaped as '\\"', '\\$', and '\\\\', respectively (backslashes are expanded twice, see the Desktop Entry Specification). Reported by Gabriel Corona <gabriel.corona@free.fr>. * etc/emacsclient-mail.desktop (Exec): Escape backslash and double-quote characters.
* Fix quoted argument in emacsclient-mail.desktop Exec keyUlrich Müller2022-12-241-2/+2
| | | | | | | | | | | | | | | | | | | | Apparently the emacsclient-mail.desktop file doesn't conform to the Desktop Entry Specification at https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html#exec-variables which says about the Exec key: | Field codes must not be used inside a quoted argument, the result of | field code expansion inside a quoted argument is undefined. However, the %u field code is used inside a quoted argument of the Exec key in both the [Desktop Entry] and [Desktop Action new-window] sections. * etc/emacsclient-mail.desktop (Exec): The Desktop Entry Specification does not allow field codes like %u inside a quoted argument. Work around it by passing %u as first parameter ($1) to the shell wrapper. * etc/emacsclient.desktop (Exec): Use `sh` rather than `placeholder` as the command name of the shell wrapper. (Bug#60204)
* Hint that emacsclient.desktop should match a search for “emacsclient”Peter Oliver2021-08-111-0/+1
| | | | | | | | This is necessary to get the Gnome desktop to show “Emacs (Client)” when the user searches for “emacsclient”. * etc/emacsclient.desktop, emacsclient-mail.desktop (Keywords): Add “emacsclient”.
* Valid quoting in .desktop filesPeter Oliver2021-08-111-2/+2
| | | | | | * etc/emacsclient.desktop, emacsclient-mail.desktop (Exec): Quote according to the rules in the Freedesktop.org Desktop Entry Specification.
* Hide emacs-mail.desktop, emacsclient-mail.desktop from menusPeter Oliver2021-07-021-1/+1
| | | | | | | | These are intended for use as mailto: URL handlers, not for launching directly, so we can reduce clutter by hiding them from a desktop environment’s menus. * etc/emacs-mail.desktop, etc/emacsclient-mail.desktop: NoDisplay=true
* Provide an emacsclient-mail.desktopPeter Oliver2021-07-021-0/+19
We provide both an emacs.desktop and an emacsclient.desktop, so for consistency let’s do the same with mail. * etc/emacs-mail.desktop: Extract suggestions for using emacsclient from comments to create emacsclient-mail.desktop. * etc/emacsclient-mail.desktop: Send mail using an existing Emacs rather than starting a new one.