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

From: Jim Porter <[email-masked]>
Date: Tue, 12 Sep 2023 20:46:54 -0700

On 9/12/2023 7:30 PM, [email-masked] wrote:
> tags 65902 + patch
> quit
> 
> This patch avoids the complicated scripting needed for
> emacsclient-mail.desktop by adding a new flag to emacsclient, --funcall,
> which mirrors emacs --funcall and allows emacsclient-mail.desktop to be
> basically the same as emacs-mail.desktop.

I think this is actually the same as the (very long) bug#57752, so 
thanks for working on this. (It was on my list of things to get to, but 
I just haven't had time.)

Over there, we agreed that something like your patch is wanted, albeit 
with two caveats:

1. Since "--funcall" for the regular "emacs" binary doesn't pass 
arguments to the function, how about we call this option "--apply" instead?

2. It would be great if we could get "--apply" for the regular "emacs" 
binary too, so that both programs work the same way (at least in this 
regard). Even better, if you could forward "--apply" from "emacsclient" 
to the alternate editor (which would be "emacs" 99% of the time) 
automatically. That works, in a roundabout way, for the Emacs daemon, 
but not if the alternate editor is "emacs".