From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Max Nikulin Newsgroups: gmane.emacs.bugs Subject: bug#57752: 28.1.91; emacsclient-mail.desktop doesn't work for me Date: Fri, 2 Dec 2022 21:52:39 +0700 Message-ID: <2da5b5aa-d42c-1df2-3a4c-af7532893d1c@gmail.com> References: <87r10gcum8.fsf@cassou.me> <87bkrj31r0.fsf@gnus.org> <87y1unxv15.fsf@cassou.me> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17675"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Cc: Jim Porter , Peter Oliver , 57752@debbugs.gnu.org To: Damien Cassou , Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Dec 02 15:53:13 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1p17Pc-0004So-Nb for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 02 Dec 2022 15:53:12 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p17PT-0004aj-KX; Fri, 02 Dec 2022 09:53:03 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p17PS-0004ab-La for bug-gnu-emacs@gnu.org; Fri, 02 Dec 2022 09:53:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p17PS-0007uP-A9 for bug-gnu-emacs@gnu.org; Fri, 02 Dec 2022 09:53:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p17PS-0006Io-2i for bug-gnu-emacs@gnu.org; Fri, 02 Dec 2022 09:53:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Max Nikulin Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 02 Dec 2022 14:53:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57752 X-GNU-PR-Package: emacs Original-Received: via spool by 57752-submit@debbugs.gnu.org id=B57752.166999277224220 (code B ref 57752); Fri, 02 Dec 2022 14:53:02 +0000 Original-Received: (at 57752) by debbugs.gnu.org; 2 Dec 2022 14:52:52 +0000 Original-Received: from localhost ([127.0.0.1]:47155 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p17PI-0006Ia-Hx for submit@debbugs.gnu.org; Fri, 02 Dec 2022 09:52:52 -0500 Original-Received: from mail-lj1-f179.google.com ([209.85.208.179]:40956) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p17PE-0006IU-RG for 57752@debbugs.gnu.org; Fri, 02 Dec 2022 09:52:51 -0500 Original-Received: by mail-lj1-f179.google.com with SMTP id x11so5665551ljh.7 for <57752@debbugs.gnu.org>; Fri, 02 Dec 2022 06:52:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :sender:from:to:cc:subject:date:message-id:reply-to; bh=xj4k3+chdBo1ys5uFPNaQ2+KS1hmVCnP2GKbYYsCf3Y=; b=VR+rhhxS5a6ERVTjiNQwJlX6oWa1DUDBwNPV0L0yN4nwLKYt4uM1Elgn+9rGIpby+R hygYZ+4Aq5AGY1PIoIwALnVSke1PVVk0fydzrtlok4qNjUGvlTawAY/7HAaSikNgJEBJ oJyi7pDwZVqXunYivHjEyGPUy6OR2QowJ6HD9Lvzii9gBj//dM6ScliC9J0ckVJEOlNN Ts64kyndfJ26gKd3bmsFicLJesW0aS6VNGQ+j3E7AxFc+0CvlfLcQOwMuPJkaFhA4mlG J73Hn7p+4M822Iy+bJpbGz/h+/T11aoyjwcvJHG2pfwoB3mwpZtfyb0xz7OygA3IX7pW Gd8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :sender:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=xj4k3+chdBo1ys5uFPNaQ2+KS1hmVCnP2GKbYYsCf3Y=; b=ltx3HSONff/mks2PWG211AGCmFkWihpz93L0OGaaepr7IlsfIgmJgOiVxlIr8JqaKO ZfTYKnFpRnjKao2tMxQ3rhIR1R6u2d7mznyK00DlKqcFa1M0JzdK9O0pNAqgi6ZmnHRA pU5ykzjiY6M5p4CslTd+CJ9dn5aaYTmDX0/Um91yfoGJHgHM7c9p1BTTPWHAKOxXjKls UjjfBFiuG5F/dtmwvF3SI457tWOEewKnniMf665HdInho29qP2dX+ah2SgrKx5PqgalR vvsgITG2uwM/bncVCEW9tp+mNcgUWSrQYd6NIsf2z8iuwtahNaefHy5fXH7fyqOhiL8C 8cxg== X-Gm-Message-State: ANoB5pmovyGCBaztAQ5ne8SV5tbYwujJLYL2Cmnw6VPlfDoP6eLcaAqn VMzZlETBY74goLiNDJNrhhM= X-Google-Smtp-Source: AA0mqf53e7voSlWkOMsILTjANh4sr17CTHhyK0uWj9csCkoK1Y7s1A6bPYmN5Hp2xOrsfX8LCpY57A== X-Received: by 2002:a2e:7a0a:0:b0:279:c812:1b35 with SMTP id v10-20020a2e7a0a000000b00279c8121b35mr3554775ljc.344.1669992762571; Fri, 02 Dec 2022 06:52:42 -0800 (PST) Original-Received: from [192.168.0.101] (nat-0-0.nsk.sibset.net. [5.44.169.188]) by smtp.googlemail.com with ESMTPSA id d11-20020ac244cb000000b004a1e592837esm1036375lfm.140.2022.12.02.06.52.41 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 02 Dec 2022 06:52:41 -0800 (PST) Content-Language: en-US In-Reply-To: <87y1unxv15.fsf@cassou.me> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:249754 Archived-At: On 13/09/2022 20:29, Damien Cassou wrote: > Lars Ingebrigtsen writes: >> I'd prefer to have a .desktop file that works without any helper >> scripts. Can't the emacsclient-mail.desktop file be rewritten to not >> use quoting here? > > This is maybe possible but I haven't found a way. Moreover, the > constraints that "Field codes must not be used inside a quoted argument" > makes things more complex. It is possible to pass %u to shell using positional parameters: sh -c 'echo "$1"' demo ARGUMENT However POSIX shell is not enough to escape double quote and backslash inside %u for elisp. BASH allows to perform substitutions during variable expansion. The idea is the following (it needs more backslashes to conform XDG spec): bash -c 'e=${1//\\/\\\\}; e=${e///\"/\\\"}; emacsclient --alternate-editor= --display="$DISPLAY" --eval=\(message-mailto\ "\"$e\""\)' emacsclient-mailto %u