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

From: Spencer Baugh <[email-masked]>
Date: Thu, 14 Sep 2023 11:10:44 -0400

Eli Zaretskii <[email-masked]> writes:
>> Date: Thu, 14 Sep 2023 14:48:14 +0000 (UTC)
>> From: Spencer Baugh <[email-masked]>
>> Cc: Spencer Baugh <[email-masked]>, [email-masked],
>> 	[email-masked]
>> 
>> Okay, if I do this without making modifications to emacsclient.c or the server protocol, would that be
>> more acceptable? The approach I described in another email, with server-eval-args-left, all it adds is
>> a new variable.
>
> I cannot find the description of that approach.  What did it say?

We could make a command-line-args-left equivalent for emacsclient,
called server-eval-args-left, which contains the FILE arguments passed
to emacsclient as strings.  This can be done without making any changes
to emacsclient.c or the server protocol.  Then the message-mailto
use case would look like this:

emacsclient --eval '(message-mailto (pop server-eval-args-left))' %u

This would match how message-mailto uses (pop command-line-args-left)
internally.

This would work for all the use-cases I described before; I'd be very
happy with this solution (actually, I'm starting to prefer it to
--apply).  And again, it doesn't change emacsclient.c or the server
protocol.