From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id D4724158020 for ; Sat, 17 Dec 2022 07:49:15 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 0416EE088F; Sat, 17 Dec 2022 07:49:15 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id E04EEE088F for ; Sat, 17 Dec 2022 07:49:14 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 1E68B341118 for ; Sat, 17 Dec 2022 07:49:14 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 839BA72B for ; Sat, 17 Dec 2022 07:49:12 +0000 (UTC) From: "Ulrich Müller" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Ulrich Müller" Message-ID: <1671263338.6caef5feb18d261c4a1c99444dc46028c68a8d9a.ulm@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: x11-misc/emacs-desktop-mail/ X-VCS-Repository: repo/gentoo X-VCS-Files: x11-misc/emacs-desktop-mail/emacs-desktop-mail-1.0.ebuild x11-misc/emacs-desktop-mail/emacs-desktop-mail-1.1.ebuild X-VCS-Directories: x11-misc/emacs-desktop-mail/ X-VCS-Committer: ulm X-VCS-Committer-Name: Ulrich Müller X-VCS-Revision: 6caef5feb18d261c4a1c99444dc46028c68a8d9a X-VCS-Branch: master Date: Sat, 17 Dec 2022 07:49:12 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: eda8c219-18f0-49ed-9082-21dc4aae2de7 X-Archives-Hash: 4f0f3a5cb6c813d7be738114db2dffb5 commit: 6caef5feb18d261c4a1c99444dc46028c68a8d9a Author: Ulrich Müller gentoo org> AuthorDate: Sat Dec 17 07:46:36 2022 +0000 Commit: Ulrich Müller gentoo 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 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() {