* bug#38314: No /usr/share/applications mailto presence
@ 2019-11-21 17:35 積丹尼 Dan Jacobson
2019-11-22 13:26 ` Lars Ingebrigtsen
0 siblings, 1 reply; 14+ messages in thread
From: 積丹尼 Dan Jacobson @ 2019-11-21 17:35 UTC (permalink / raw)
To: 38314
All I know is these guys
$ grep -lr mailto /usr/share/applications|xargs dlocate
mutt: /usr/share/applications/mutt.desktop
have a mailto presence in /usr/share/applications here on Debian,
but even in (info "(emacs) Browse-URL")'s mailto discussion,
there is no mention of a workaroud for users who don't want to use mutt.
$ grep -c mailto /usr/share/applications/*ema*
/usr/share/applications/emacs-term.desktop:0
/usr/share/applications/emacs.desktop:0
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#38314: No /usr/share/applications mailto presence
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
0 siblings, 1 reply; 14+ messages in thread
From: Lars Ingebrigtsen @ 2019-11-22 13:26 UTC (permalink / raw)
To: 積丹尼 Dan Jacobson; +Cc: 38314
積丹尼 Dan Jacobson <jidanni@jidanni.org> writes:
> All I know is these guys
>
> $ grep -lr mailto /usr/share/applications|xargs dlocate
> mutt: /usr/share/applications/mutt.desktop
larsi@marnie:~/src/emacs/trunk$ grep -lr mailto /usr/share/applications | xargs dlocate
xargs: dlocate: No such file or directory
> have a mailto presence in /usr/share/applications here on Debian,
> but even in (info "(emacs) Browse-URL")'s mailto discussion,
> there is no mention of a workaroud for users who don't want to use mutt.
>
> $ grep -c mailto /usr/share/applications/*ema*
> /usr/share/applications/emacs-term.desktop:0
> /usr/share/applications/emacs.desktop:0
I'm not sure what you're asking. What is the problem you're seeing, and
what would you have Emacs do instead?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#38314: No /usr/share/applications mailto presence
2019-11-22 13:26 ` Lars Ingebrigtsen
@ 2019-11-23 0:26 ` 積丹尼 Dan Jacobson
2019-11-23 12:06 ` Lars Ingebrigtsen
0 siblings, 1 reply; 14+ messages in thread
From: 積丹尼 Dan Jacobson @ 2019-11-23 0:26 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: 38314, yamaoka
>>>>> "LI" == Lars Ingebrigtsen <larsi@gnus.org> writes:
LI> I'm not sure what you're asking. What is the problem you're seeing, and
LI> what would you have Emacs do instead?
OK, let's take
http://ccs.land.moi.gov.tw/jsp/ExpenseController
On the bottom there are two mailto links.
Let's talk about this one,
<a href="mailto:michael@land.moi.gov.tw;lee@land.moi.gov.tw?subject=地政電子資料流服務網意見信箱"><img src="../images/mail1.gif" alt="意見信箱" border="0">意見信箱</a>
Well, you could say "Just browse it with M-x w3m, and click the link
there. That will launch a message buffer with everything filled in
fine."
That is true. However in w3m this is just
<a href="mailto:moiland@land.moi.gov.tw?subject=地政電子資料流服務網意見信箱"><img src="../images/mail1.gif" alt="意見信箱" border="0">意見信箱</a>
That is because some javascript perhaps changed it.
Therefore we need to use the chromium browser.
OK, but in chromium, clicking the mailto link won't notify emacs,
because emacs'
/usr/share/applications/* files, although there, don't have a mailto
line in them.
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#38314: No /usr/share/applications mailto presence
2019-11-23 0:26 ` 積丹尼 Dan Jacobson
@ 2019-11-23 12:06 ` Lars Ingebrigtsen
2019-11-25 11:06 ` 積丹尼 Dan Jacobson
0 siblings, 1 reply; 14+ messages in thread
From: Lars Ingebrigtsen @ 2019-11-23 12:06 UTC (permalink / raw)
To: 積丹尼 Dan Jacobson; +Cc: 38314, yamaoka
積丹尼 Dan Jacobson <jidanni@jidanni.org> writes:
> OK, but in chromium, clicking the mailto link won't notify emacs,
> because emacs'
> /usr/share/applications/* files, although there, don't have a mailto
> line in them.
OK, your complaint is that there's no mailto handler specified in
/usr/share/applications/emacs*.desktop?
Would adding a line like
MimeType=x-scheme-handler/mailto;
to the file do the trick, or is there something else that has to be done?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#38314: No /usr/share/applications mailto presence
2019-11-23 12:06 ` Lars Ingebrigtsen
@ 2019-11-25 11:06 ` 積丹尼 Dan Jacobson
2019-11-27 12:08 ` Lars Ingebrigtsen
0 siblings, 1 reply; 14+ messages in thread
From: 積丹尼 Dan Jacobson @ 2019-11-25 11:06 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: 38314, yamaoka
>>>>> "LI" == Lars Ingebrigtsen <larsi@gnus.org> writes:
LI> 積丹尼 Dan Jacobson <jidanni@jidanni.org> writes:
>> OK, but in chromium, clicking the mailto link won't notify emacs,
>> because emacs'
>> /usr/share/applications/* files, although there, don't have a mailto
>> line in them.
LI> OK, your complaint is that there's no mailto handler specified in
LI> /usr/share/applications/emacs*.desktop?
I guess so.
LI> Would adding a line like
LI> MimeType=x-scheme-handler/mailto;
LI> to the file do the trick, or is there something else that has to be done?
I don't know.
Just make sure it mails those two addresses with the ; in between them,
using gnus, when you click the link in chromium.
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#38314: No /usr/share/applications mailto presence
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
0 siblings, 2 replies; 14+ messages in thread
From: Lars Ingebrigtsen @ 2019-11-27 12:08 UTC (permalink / raw)
To: 積丹尼 Dan Jacobson; +Cc: 38314, yamaoka
積丹尼 Dan Jacobson <jidanni@jidanni.org> writes:
> LI> Would adding a line like
>
> LI> MimeType=x-scheme-handler/mailto;
>
> LI> to the file do the trick, or is there something else that has to be done?
>
> I don't know.
> Just make sure it mails those two addresses with the ; in between them,
> using gnus, when you click the link in chromium.
What two addresses? And why should there be a semicolon between the
addresses?
Anyway, it seems %u is the URL received by the program, but the
documentation of the format seems to be ... scarce. Anybody know how to
specify (in the .desktop file) how one should start a program when
there's a mailto handler?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#38314: No /usr/share/applications mailto presence
2019-11-27 12:08 ` Lars Ingebrigtsen
@ 2019-12-07 23:56 ` 積丹尼 Dan Jacobson
2020-08-06 12:52 ` Lars Ingebrigtsen
1 sibling, 0 replies; 14+ messages in thread
From: 積丹尼 Dan Jacobson @ 2019-12-07 23:56 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: 38314
Well let's just start with the simplest example.
Let's say in chromium you are browsing
https://www.myfearlesskitchen.com/refrigerator-freezer-temperature/
and you click on the envelope icon.
This should launch emacs, sending a mail to
marybeth@myfearlesskitchen.com .
That's all I know.
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#38314: No /usr/share/applications mailto presence
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
1 sibling, 1 reply; 14+ messages in thread
From: Lars Ingebrigtsen @ 2020-08-06 12:52 UTC (permalink / raw)
To: 積丹尼 Dan Jacobson; +Cc: 38314, yamaoka
Lars Ingebrigtsen <larsi@gnus.org> writes:
> Anyway, it seems %u is the URL received by the program, but the
> documentation of the format seems to be ... scarce. Anybody know how to
> specify (in the .desktop file) how one should start a program when
> there's a mailto handler?
Well, that was ... simple enough, really, other than it seems really
difficult to make this laptop reload the data, which made testing
difficult.
Anyway, with Emacs 28 (and if the distributors include the .desktop file
in the correct place), you should be able to choose Emacs as the system
mailer and clicking on mailto: links should open Emacs in a Message buffer.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#38314: No /usr/share/applications mailto presence
2020-08-06 12:52 ` Lars Ingebrigtsen
@ 2020-08-06 12:54 ` Lars Ingebrigtsen
2020-08-11 12:55 ` Gijs Hillenius
0 siblings, 1 reply; 14+ messages in thread
From: Lars Ingebrigtsen @ 2020-08-06 12:54 UTC (permalink / raw)
To: 積丹尼 Dan Jacobson; +Cc: 38314, yamaoka
Lars Ingebrigtsen <larsi@gnus.org> writes:
> Anyway, with Emacs 28 (and if the distributors include the .desktop file
> in the correct place), you should be able to choose Emacs as the system
> mailer and clicking on mailto: links should open Emacs in a Message buffer.
(I really thought that this already existed, but I grepped for mailto
and couldn't find any handlers for it. Weird.)
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#38314: No /usr/share/applications mailto presence
2020-08-06 12:54 ` Lars Ingebrigtsen
@ 2020-08-11 12:55 ` Gijs Hillenius
2020-08-11 13:05 ` Lars Ingebrigtsen
2020-08-11 13:11 ` Robert Pluim
0 siblings, 2 replies; 14+ messages in thread
From: Gijs Hillenius @ 2020-08-11 12:55 UTC (permalink / raw)
To: 38314
On 6 August 2020 14:54 Lars Ingebrigtsen, wrote:
> Lars Ingebrigtsen <larsi@gnus.org> writes:
>
>> Anyway, with Emacs 28 (and if the distributors include the .desktop file
>> in the correct place), you should be able to choose Emacs as the system
>> mailer and clicking on mailto: links should open Emacs in a Message buffer.
>
> (I really thought that this already existed, but I grepped for mailto
> and couldn't find any handlers for it.
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.
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#38314: No /usr/share/applications mailto presence
2020-08-11 12:55 ` Gijs Hillenius
@ 2020-08-11 13:05 ` Lars Ingebrigtsen
2020-08-11 13:18 ` Gijs Hillenius
2020-08-11 13:11 ` Robert Pluim
1 sibling, 1 reply; 14+ messages in thread
From: Lars Ingebrigtsen @ 2020-08-11 13:05 UTC (permalink / raw)
To: Gijs Hillenius; +Cc: 38314
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
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#38314: No /usr/share/applications mailto presence
2020-08-11 13:05 ` Lars Ingebrigtsen
@ 2020-08-11 13:18 ` Gijs Hillenius
2020-08-11 13:28 ` Lars Ingebrigtsen
0 siblings, 1 reply; 14+ messages in thread
From: Gijs Hillenius @ 2020-08-11 13:18 UTC (permalink / raw)
To: 38314
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 \"$@\")"
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#38314: No /usr/share/applications mailto presence
2020-08-11 12:55 ` Gijs Hillenius
2020-08-11 13:05 ` Lars Ingebrigtsen
@ 2020-08-11 13:11 ` Robert Pluim
1 sibling, 0 replies; 14+ messages in thread
From: Robert Pluim @ 2020-08-11 13:11 UTC (permalink / raw)
To: Gijs Hillenius; +Cc: 38314
>>>>> On Tue, 11 Aug 2020 14:55:51 +0200, Gijs Hillenius <gijs@hillenius.net> said:
Gijs> On 6 August 2020 14:54 Lars Ingebrigtsen, wrote:
>> Lars Ingebrigtsen <larsi@gnus.org> writes:
>>
>>> Anyway, with Emacs 28 (and if the distributors include the .desktop file
>>> in the correct place), you should be able to choose Emacs as the system
>>> mailer and clicking on mailto: links should open Emacs in a Message buffer.
>>
>> (I really thought that this already existed, but I grepped for mailto
>> and couldn't find any handlers for it.
Gijs> The sample file uses:
Gijs> Exec=emacs -f message-mailto %u
Gijs> Would this work as well?
Gijs> Exec=/usr/bin/emacsclient.emacs-snapshot -f message-mailto
You might want to add '-a=""' to that (and in fact we should probably
consider it for the default as well)
Robert
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2020-08-11 13:28 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2020-08-11 13:18 ` Gijs Hillenius
2020-08-11 13:28 ` Lars Ingebrigtsen
2020-08-11 13:11 ` Robert Pluim
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).