unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: "Gijs Hillenius" <gijs@hillenius.net>
Cc: 38314@debbugs.gnu.org
Subject: bug#38314: No /usr/share/applications mailto presence
Date: Tue, 11 Aug 2020 15:05:30 +0200	[thread overview]
Message-ID: <87h7t9wcx1.fsf@gnus.org> (raw)
In-Reply-To: <87sgct5oko.fsf@hillenius.net> ("Gijs Hillenius"'s message of "Tue, 11 Aug 2020 14:55:51 +0200")

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?

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





  reply	other threads:[~2020-08-11 13:05 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-21 17:35 bug#38314: No /usr/share/applications mailto presence 積丹尼 Dan Jacobson
2019-11-22 13:26 ` Lars Ingebrigtsen
2019-11-23  0:26   ` 積丹尼 Dan Jacobson
2019-11-23 12:06     ` Lars Ingebrigtsen
2019-11-25 11:06       ` 積丹尼 Dan Jacobson
2019-11-27 12:08         ` Lars Ingebrigtsen
2019-12-07 23:56           ` 積丹尼 Dan Jacobson
2020-08-06 12:52           ` Lars Ingebrigtsen
2020-08-06 12:54             ` Lars Ingebrigtsen
2020-08-11 12:55               ` Gijs Hillenius
2020-08-11 13:05                 ` Lars Ingebrigtsen [this message]
2020-08-11 13:18                   ` Gijs Hillenius
2020-08-11 13:28                     ` Lars Ingebrigtsen
2020-08-11 13:11                 ` Robert Pluim

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87h7t9wcx1.fsf@gnus.org \
    --to=larsi@gnus.org \
    --cc=38314@debbugs.gnu.org \
    --cc=gijs@hillenius.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).