Subject: Re: 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:30:33 +0300

Eli Zaretskii <[email-masked]> writes:

>> From: [email-masked]
>> Date: Wed, 13 Sep 2023 13:01:52 +0000 (UTC)
>> Cc: [email-masked]
>> 
>> Eli Zaretskii <[email-masked]> writes:
>> 
>> > Is quoting the only issue with --eval?  If so, why not have a variant
>> > of --eval that quotes the argument by itself, like you do in the
>> > patch, i.e. by using quote_argument, instead of inventing yet another
>> > weird option with its own small DSL and extra-special rules of how to
>> > write the command line with it?
>> 
>> I am not sure what you're suggesting.  Can you show how the equivalent
>> of:
>> 
>> emacsclient --apply message-mailto -- %u
>> 
>> would work with that design?
>
>   emacsclient --qeval '(message-mailto %u)'
>
Try desktop-file-validate. ' is a reserved character.

I have a desktop file for a similar use case, I validated that desktop
file using desktop-file-validate and got the following output:
emacs-gnus.desktop: error: value "emacsclient  --create-frame --eval '(gnus)'" for key "Exec" in group "Desktop Entry" contains a reserved character ''' outside of a quote