GNU bug report logs - #38314
No /usr/share/applications mailto presence

Previous Next

Package: emacs;

Reported by: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>

Date: Thu, 21 Nov 2019 17:36:02 UTC

Severity: wishlist

Tags: fixed

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Gijs Hillenius <gijs <at> hillenius.net>
Cc: 38314 <at> debbugs.gnu.org
Subject: bug#38314: No /usr/share/applications mailto presence
Date: Tue, 11 Aug 2020 15:05:30 +0200
Gijs Hillenius <gijs <at> hillenius.net> writes:

> The sample file uses:
> Exec=emacs -f message-mailto %u
>
> Would this work as well?
> Exec=/usr/bin/emacsclient.emacs-snapshot -f message-mailto
>
> I'll experiment with this once it is included in the next snapshot for Debian.

Hm.  No, it won't work, because -f in emacsclient means:

       -f, --server-file=FILENAME
              use TCP configuration file FILENAME for communication.  This can
              also  be  specified  via the EMACS_SERVER_FILE environment vari‐
              able.

So I think that would be

emacsclient -e (message-mailto) %u

?

Or does the Emacs -f thing hide under a different option in emacsclient?  

Hm, no, that doesn't work, obviously, because message-mailto expects the
%u in command-line-args-left, and that's not the case here.

So it's

emacsclient -e '(message-mailto-1 \"%u\")'

which has major problems with string interpolation and would be very
fragile.

Would it make sense to add something to emacsclient/emacs-server to help
in this use case?

So a new switch, like "-E", which means "emulate as far as possible
'emacs -f'":

emacsclient -E message-mailto %u

In emacs-server, this would bind command-line-args-left to the remaining
parameters, and then funcall the function.

I'm kinda surprised that emacsclient doesn't have something like this
already?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




This bug report was last modified 4 years and 284 days ago.

Previous Next


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