bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#38314: No /usr/share/applications mailto presence


From: Gijs Hillenius
Subject: bug#38314: No /usr/share/applications mailto presence
Date: Tue, 11 Aug 2020 15:18:17 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

On 11 August 2020 15:05 Lars Ingebrigtsen, wrote:

> Gijs Hillenius <gijs@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?

I currently use this as my emacs-mailto-handler:

/usr/bin/emacsclient.emacs-snapshot -c --eval "(browse-url-mail \"$@\")"








reply via email to

[Prev in Thread] Current Thread [Next in Thread]