diff options
author | 2022-12-17 08:46:36 +0100 | |
---|---|---|
committer | 2022-12-17 08:48:58 +0100 | |
commit | 6caef5feb18d261c4a1c99444dc46028c68a8d9a (patch) | |
tree | 84a2022a33fb4755aa326718abafda16de4413d2 /x11-misc/emacs-desktop-mail | |
parent | app-emulation/firecracker-bin: add 1.2.0 (diff) | |
download | gentoo-6caef5feb18d261c4a1c99444dc46028c68a8d9a.tar.gz gentoo-6caef5feb18d261c4a1c99444dc46028c68a8d9a.tar.bz2 gentoo-6caef5feb18d261c4a1c99444dc46028c68a8d9a.zip |
x11-misc/emacs-desktop-mail: Inline the wrapper shell script
Signed-off-by: Ulrich Müller <ulm@gentoo.org>
Diffstat (limited to 'x11-misc/emacs-desktop-mail')
-rw-r--r-- | x11-misc/emacs-desktop-mail/emacs-desktop-mail-1.1.ebuild (renamed from x11-misc/emacs-desktop-mail/emacs-desktop-mail-1.0.ebuild) | 15 |
1 files 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 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() { |