GNU bug report logs - #57752
28.1.91; emacsclient-mail.desktop doesn't work for me

Previous Next

Package: emacs;

Reported by: Damien Cassou <damien <at> cassou.me>

Date: Mon, 12 Sep 2022 18:32:01 UTC

Severity: normal

Merged with 59743

Found in version 28.1.91

Full log


Message #74 received at 57752 <at> debbugs.gnu.org (full text, mbox):

From: Gregory Heytings <gregory <at> heytings.org>
To: Jim Porter <jporterbugs <at> gmail.com>
Cc: Damien Cassou <damien <at> cassou.me>, Robert Pluim <rpluim <at> gmail.com>,
 Peter Oliver <p.d.oliver <at> mavit.org.uk>, 57752 <at> debbugs.gnu.org,
 git <at> mavit.org.uk, Lars Ingebrigtsen <larsi <at> gnus.org>,
 Eli Zaretskii <eliz <at> gnu.org>
Subject: Re: bug#57752: 28.1.91; emacsclient-mail.desktop doesn't work for me
Date: Fri, 16 Sep 2022 18:26:48 +0000
>
> I'm not convinced that '--function-arg' is necessary, but I do think 
> that adding '--function' to emacsclient would be the best solution of 
> the ones presented so far.
>

It's not very adaptable, whereas --eval allows you to run an arbitrary 
form.

>
> That would allow both of the following in .desktop files:
>
> emacsclient --function my-function-taking-one-url %u
> emacsclient --function my-function-taking-many-urls %U
>

Sure, and how would you use it say in shell scripts, in which these 
%u/%U/%f/%F constructs do not exist?

>
> '--setq' has the disadvantage that you'd need some way to prepend *each* 
> URL/filename with it in the %U/%F cases.
>

What about --setq args "(list %U)"?

>
> The functions above would need to be able to consume command-line 
> arguments (like 'message-mailto' does), but that's not a big deal. We 
> could even add an 'apply-from-command-line' function that adapts any 
> existing function to do this:
>
> emacsclient --function apply-from-command-line func arg1 arg2
>
> 'apply-from-command-line' could look at the arity of 'func' and consume 
> the appropriate number of command-line arguments.
>

That's over-engineering IMO.

>
> Adding '--function' to emacsclient also has the advantage that it's 
> already available for emacs,
>

No, emacs only has --funcall: call Emacs Lisp function FUNC with no 
arguments.




This bug report was last modified 1 year and 282 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.