]> git.eshelyaron.com Git - emacs.git/commitdiff
Valid quoting in .desktop files
authorPeter Oliver <git@mavit.org.uk>
Wed, 7 Jul 2021 21:04:01 +0000 (22:04 +0100)
committerLars Ingebrigtsen <larsi@gnus.org>
Wed, 11 Aug 2021 12:04:58 +0000 (14:04 +0200)
* etc/emacsclient.desktop, emacsclient-mail.desktop (Exec): Quote
according to the rules in the Freedesktop.org Desktop Entry
Specification.

etc/emacsclient-mail.desktop
etc/emacsclient.desktop

index 8d51dcdd2fc292e659d9a5e515d0dbdb34a5fc73..f96e8a3c97f018eb02eccfb320fbc46fa3a01583 100644 (file)
@@ -1,7 +1,7 @@
 [Desktop Entry]
 Categories=Network;Email;
 Comment=GNU Emacs is an extensible, customizable text editor - and more
-Exec=sh -c 'exec emacsclient --alternate-editor= --display="$DISPLAY" --eval "(message-mailto \"%u\")"'
+Exec=sh -c "exec emacsclient --alternate-editor= --display=\\"\\$DISPLAY\\" --eval \\\\(message-mailto\\\\ \\\\\\"%u\\\\\\"\\\\)"
 Icon=emacs
 Name=Emacs (Mail, Client)
 MimeType=x-scheme-handler/mailto;
@@ -12,7 +12,7 @@ Actions=new-window;new-instance;
 
 [Desktop Action new-window]
 Name=New Window
-Exec=emacsclient --alternate-editor= --create-frame --eval '(message-mailto "%u")'
+Exec=emacsclient --alternate-editor= --create-frame --eval "(message-mailto \\"%u\\")"
 
 [Desktop Action new-instance]
 Name=New Instance
index cd45463093be576e11741a40529228b915c7ca09..0feec67da5070b19165b05b0cba649ba432c2095 100644 (file)
@@ -3,7 +3,7 @@ Name=Emacs (Client)
 GenericName=Text Editor
 Comment=Edit text
 MimeType=text/english;text/plain;text/x-makefile;text/x-c++hdr;text/x-c++src;text/x-chdr;text/x-csrc;text/x-java;text/x-moc;text/x-pascal;text/x-tcl;text/x-tex;application/x-shellscript;text/x-c;text/x-c++;
-Exec=sh -c 'if [ -n "$*" ]; then exec emacsclient --alternate-editor= --display="$DISPLAY" "$@"; else exec emacsclient --alternate-editor= --create-frame; fi' placeholder %F
+Exec=sh -c "if [ -n \\"\\$*\\" ]; then exec emacsclient --alternate-editor= --display=\\"\\$DISPLAY\\" \\"\\$@\\"; else exec emacsclient --alternate-editor= --create-frame; fi" placeholder %F
 Icon=emacs
 Type=Application
 Terminal=false