Subject: bug#65902: 29.0.92; emacsclient-mail.desktop fails due to complicated escaping

From: Björn Bidar <[email-masked]>
Date: Sat, 16 Sep 2023 16:43:20 +0300

Eli Zaretskii <[email-masked]> writes:

>> Date: Wed, 13 Sep 2023 12:33:01 -0700
>> Cc: [email-masked], [email-masked]
>> From: Jim Porter <[email-masked]>
>> 
>> On 9/13/2023 12:13 PM, Eli Zaretskii wrote:
>> > And I don't understand why we need to add any options to Emacs itself,
>> > btw.  The suggestion to have some "symmetry" here was one of the
>> > reasons that discussion got nowhere.  So let's learn from that
>> > mistake, at least.
>> 
>> There's a practical benefit to this. If you have $EDITOR set in your 
>> environment to something like "emacsclient --alternate-editor=emacs", 
>> then it would be nice if you could say this:
>> 
>>    $EDITOR --apply some-func arg1 arg2
>> 
>> and have it do the same thing whether or not there was already an Emacs 
>> server running. The symmetry between the two commands (plus proper 
>> argument forwarding) would make that work.
>> 
>> However, if people can't agree, then we could probably drop that part. 
>> To me, it sounds like people *do* agree that this would be good to have 
>> though.
>
> People might agree, but I don't.  Please consider the perspective.
> This started as an obscure and rare problem in a desktop file (which
> we provided solely out of good will, since it really isn't our job to
> do so, it's the job of downstream distros).

Programs ship their own desktop files. It is not the job of the
downstream to provide desktop files unless it is because of a patch from
said downstream.

In any case it doesn't make sense for each downstream to ship their own
desktop file and fix their own.

>From my pov letting Emacs do all work in passing arguments is the best
solution as escaping is error prone. I haven't seen any program besides
Emacs using escaped shell syntax to pass the escaped syntax of their
target language. Most just have options to pass the target file or deal
with the dbus activation/interface.