diff options
| author | Ulrich Müller | 2023-03-08 19:37:27 +0100 |
|---|---|---|
| committer | Ulrich Müller | 2023-03-08 19:37:27 +0100 |
| commit | c8ec0017cb96d4ac98be21e1fe9a95e1aa723e99 (patch) | |
| tree | d0ee1bb086c2bd534f1c1774d01b1b9541c8c7c7 | |
| parent | a588937094f7beb7c716c1badff681afa8c4d5ae (diff) | |
| download | emacs-c8ec0017cb96d4ac98be21e1fe9a95e1aa723e99.tar.gz emacs-c8ec0017cb96d4ac98be21e1fe9a95e1aa723e99.zip | |
Avoid using bash in the emacsclient desktop file
* etc/emacsclient-mail.desktop (Exec): Use sh and sed instead
of bash, because the latter may not be available everywhere.
| -rw-r--r-- | etc/emacsclient-mail.desktop | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/etc/emacsclient-mail.desktop b/etc/emacsclient-mail.desktop index 49c6f99f317..0a2420ddead 100644 --- a/etc/emacsclient-mail.desktop +++ b/etc/emacsclient-mail.desktop | |||
| @@ -2,9 +2,9 @@ | |||
| 2 | Categories=Network;Email; | 2 | Categories=Network;Email; |
| 3 | Comment=GNU Emacs is an extensible, customizable text editor - and more | 3 | Comment=GNU Emacs is an extensible, customizable text editor - and more |
| 4 | # We want to pass the following commands to the shell wrapper: | 4 | # We want to pass the following commands to the shell wrapper: |
| 5 | # u=${1//\\/\\\\}; u=${u//\"/\\\"}; exec emacsclient --alternate-editor= --display="$DISPLAY" --eval "(message-mailto \"$u\")" | 5 | # u=$(echo "$1" | sed 's/[\"]/\\&/g'); exec emacsclient --alternate-editor= --display="$DISPLAY" --eval "(message-mailto \"$u\")" |
| 6 | # Special chars '"', '$', and '\' must be escaped as '\\"', '\\$', and '\\\\'. | 6 | # Special chars '"', '$', and '\' must be escaped as '\\"', '\\$', and '\\\\'. |
| 7 | Exec=bash -c "u=\\${1//\\\\\\\\/\\\\\\\\\\\\\\\\}; u=\\${u//\\\\\\"/\\\\\\\\\\\\\\"}; exec emacsclient --alternate-editor= --display=\\"\\$DISPLAY\\" --eval \\"(message-mailto \\\\\\"\\$u\\\\\\")\\"" bash %u | 7 | Exec=sh -c "u=\\$(echo \\"\\$1\\" | sed 's/[\\\\\\"]/\\\\\\\\&/g'); exec emacsclient --alternate-editor= --display=\\"\\$DISPLAY\\" --eval \\"(message-mailto \\\\\\"\\$u\\\\\\")\\"" sh %u |
| 8 | Icon=emacs | 8 | Icon=emacs |
| 9 | Name=Emacs (Mail, Client) | 9 | Name=Emacs (Mail, Client) |
| 10 | MimeType=x-scheme-handler/mailto; | 10 | MimeType=x-scheme-handler/mailto; |
| @@ -16,7 +16,7 @@ Actions=new-window;new-instance; | |||
| 16 | 16 | ||
| 17 | [Desktop Action new-window] | 17 | [Desktop Action new-window] |
| 18 | Name=New Window | 18 | Name=New Window |
| 19 | Exec=bash -c "u=\\${1//\\\\\\\\/\\\\\\\\\\\\\\\\}; u=\\${u//\\\\\\"/\\\\\\\\\\\\\\"}; exec emacsclient --alternate-editor= --create-frame --eval \\"(message-mailto \\\\\\"\\$u\\\\\\")\\"" bash %u | 19 | Exec=sh -c "u=\\$(echo \\"\\$1\\" | sed 's/[\\\\\\"]/\\\\\\\\&/g'); exec emacsclient --alternate-editor= --create-frame --eval \\"(message-mailto \\\\\\"\\$u\\\\\\")\\"" sh %u |
| 20 | 20 | ||
| 21 | [Desktop Action new-instance] | 21 | [Desktop Action new-instance] |
| 22 | Name=New Instance | 22 | Name=New Instance |