From: "Ulrich Müller" <ulm@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: x11-misc/emacs-desktop-mail/
Date: Sat, 17 Dec 2022 07:49:12 +0000 (UTC) [thread overview]
Message-ID: <1671263338.6caef5feb18d261c4a1c99444dc46028c68a8d9a.ulm@gentoo> (raw)
commit: 6caef5feb18d261c4a1c99444dc46028c68a8d9a
Author: Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Sat Dec 17 07:46:36 2022 +0000
Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Sat Dec 17 07:48:58 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6caef5fe
x11-misc/emacs-desktop-mail: Inline the wrapper shell script
Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>
...ktop-mail-1.0.ebuild => emacs-desktop-mail-1.1.ebuild} | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/x11-misc/emacs-desktop-mail/emacs-desktop-mail-1.0.ebuild b/x11-misc/emacs-desktop-mail/emacs-desktop-mail-1.1.ebuild
similarity index 61%
rename from x11-misc/emacs-desktop-mail/emacs-desktop-mail-1.0.ebuild
rename to x11-misc/emacs-desktop-mail/emacs-desktop-mail-1.1.ebuild
index 07495faea5b4..92d93860fb2f 100644
--- a/x11-misc/emacs-desktop-mail/emacs-desktop-mail-1.0.ebuild
+++ b/x11-misc/emacs-desktop-mail/emacs-desktop-mail-1.1.ebuild
@@ -27,21 +27,22 @@ src_install() {
MimeType=x-scheme-handler/mailto;
EOF
+ # The Desktop Entry Specification does not allow field codes like %u
+ # inside a quoted argument, therefore we need a shell wrapper.
+ # We want to pass a literal '"(message-mailto \"$1\")"' in the -c
+ # command, but in the desktop entry '"', '\', and '$' must be escaped
+ # as '\\"', '\\\\', and '\\$', respectively. Yet another level of
+ # backslash escapes is needed for '\' and '$' in the here-document.
newmenu - emacsclient-mail.desktop <<-EOF
[Desktop Entry]
Type=Application
Name=Emacsclient (mail)
NoDisplay=true
- Exec=${EPREFIX}/usr/libexec/emacs/emacsclient-mail-wrapper.sh %u
+ Exec=${EPREFIX}/bin/bash -c "exec ${EPREFIX}/usr/bin/emacsclient \
+--eval \\\\"(message-mailto \\\\\\\\\\\\"\\\\\$1\\\\\\\\\\\\")\\\\"" bash %u
Terminal=false
MimeType=x-scheme-handler/mailto;
EOF
-
- exeinto /usr/libexec/emacs
- newexe - emacsclient-mail-wrapper.sh <<-EOF
- #!${EPREXIX}/bin/bash
- exec ${EPREFIX}/usr/bin/emacsclient --eval "(message-mailto \\"\$1\\")"
- EOF
}
pkg_postinst() {
next reply other threads:[~2022-12-17 7:49 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-17 7:49 Ulrich Müller [this message]
-- strict thread matches above, loose matches on Subject: below --
2023-03-07 17:28 [gentoo-commits] repo/gentoo:master commit in: x11-misc/emacs-desktop-mail/ Ulrich Müller
2022-12-16 18:05 Ulrich Müller
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1671263338.6caef5feb18d261c4a1c99444dc46028c68a8d9a.ulm@gentoo \
--to=ulm@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox