From: Peter Oliver <p.d.oliver@mavit.org.uk>
To: "Peter Münster" <pm@a16n.net>, 49986@debbugs.gnu.org
Subject: bug#49986: Valid .desktop files
Date: Tue, 10 Aug 2021 22:30:31 +0100 (BST) [thread overview]
Message-ID: <742faf7b-1ada-8dc0-50bb-d660503b859d@froglet.home.mavit.org.uk> (raw)
In-Reply-To: <87wnotj949.fsf@a16n.net>
[-- Attachment #1: Type: text/plain, Size: 160 bytes --]
On Tue, 10 Aug 2021, Peter Münster wrote:
> "echo"?
>
> I guess, that was for testing... ;)
Thanks, indeed so. A fixed version is attached.
--
Peter Oliver
[-- Attachment #2: Type: text/plain, Size: 2341 bytes --]
From a301cae39f82ceb4af4d9c174cd6b7b8b6342326 Mon Sep 17 00:00:00 2001
From: Peter Oliver <git@mavit.org.uk>
Date: Wed, 7 Jul 2021 22:04:01 +0100
Subject: [PATCH 1/3] Valid quoting in .desktop files
* etc/emacsclient.desktop, emacsclient-mail.desktop (Exec): Quote
according to the rules in the Freedesktop.org Desktop Entry
Specification.
---
etc/emacsclient-mail.desktop | 4 ++--
etc/emacsclient.desktop | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/etc/emacsclient-mail.desktop b/etc/emacsclient-mail.desktop
index 8d51dcdd2f..f96e8a3c97 100644
--- a/etc/emacsclient-mail.desktop
+++ b/etc/emacsclient-mail.desktop
@@ -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
diff --git a/etc/emacsclient.desktop b/etc/emacsclient.desktop
index cd45463093..0feec67da5 100644
--- a/etc/emacsclient.desktop
+++ b/etc/emacsclient.desktop
@@ -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
--
2.31.1
next prev parent reply other threads:[~2021-08-10 21:30 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-10 20:13 bug#49986: Valid .desktop files Peter Oliver
[not found] ` <87wnotj949.fsf@a16n.net>
2021-08-10 21:30 ` Peter Oliver [this message]
2021-08-11 12:05 ` Lars Ingebrigtsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=742faf7b-1ada-8dc0-50bb-d660503b859d@froglet.home.mavit.org.uk \
--to=p.d.oliver@mavit.org.uk \
--cc=49986@debbugs.gnu.org \
--cc=pm@a16n.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).