* `W D D' in shr rendered article
[not found] <E1PE6RB-0005wP-00@quimby.gnus.org>
@ 2010-11-05 7:54 ` Katsumi Yamaoka
2010-11-05 16:03 ` Lars Magne Ingebrigtsen
0 siblings, 1 reply; 9+ messages in thread
From: Katsumi Yamaoka @ 2010-11-05 7:54 UTC (permalink / raw)
To: ding
Lars Magne Ingebrigtsen wrote:
> + * shr.el (shr-browse-url): Implement mailto: URLs.
[...]
> + (gnus-url-mailto url))
Supposing the use of Gnus resources in shr.el is ok, how about
adding images to gnus-article-image-alist (using gnus-add-image)
to make `W D D' work as well as gnus-html.el? ;-)
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: `W D D' in shr rendered article
2010-11-05 7:54 ` `W D D' in shr rendered article Katsumi Yamaoka
@ 2010-11-05 16:03 ` Lars Magne Ingebrigtsen
2010-11-08 5:09 ` shr-mailto (was Re: `W D D' in shr rendered article) Katsumi Yamaoka
0 siblings, 1 reply; 9+ messages in thread
From: Lars Magne Ingebrigtsen @ 2010-11-05 16:03 UTC (permalink / raw)
To: ding
Katsumi Yamaoka <yamaoka@jpl.org> writes:
>> + (gnus-url-mailto url))
>
> Supposing the use of Gnus resources in shr.el is ok, how about
> adding images to gnus-article-image-alist (using gnus-add-image)
> to make `W D D' work as well as gnus-html.el? ;-)
Uhm. That was, I think, an error on my part. :-)
I think it should just call Message directly instead of using the Gnus
function... I think... or... er... Hm.
Perhaps shr should have an interface function that's, like:
(shr-init :mailto-function 'gnus-url-mailto
:display-images-function '... something)
Uhm, no, that's the wrong way around...
--
(domestic pets only, the antidote for overdose, milk.)
larsi@gnus.org * Lars Magne Ingebrigtsen
^ permalink raw reply [flat|nested] 9+ messages in thread
* shr-mailto (was Re: `W D D' in shr rendered article)
2010-11-05 16:03 ` Lars Magne Ingebrigtsen
@ 2010-11-08 5:09 ` Katsumi Yamaoka
2010-11-08 21:27 ` Lars Magne Ingebrigtsen
0 siblings, 1 reply; 9+ messages in thread
From: Katsumi Yamaoka @ 2010-11-08 5:09 UTC (permalink / raw)
To: ding
Lars Magne Ingebrigtsen wrote:
> Katsumi Yamaoka <yamaoka@jpl.org> writes:
>>> + (gnus-url-mailto url))
>>
>> Supposing the use of Gnus resources in shr.el is ok, how about
[...]
> Uhm. That was, I think, an error on my part. :-)
> I think it should just call Message directly instead of using the Gnus
> function... I think... or... er... Hm.
How about this generic one?
--8<---------------cut here---------------start------------->8---
(autoload 'rfc2368-parse-mailto-url "rfc2368")
(defun shr-mailto (url)
(let* ((info (rfc2368-parse-mailto-url url))
(to (assoc "To" info))
(subject (assoc "Subject" info))
(body (assoc "Body" info)))
(compose-mail (cdr to) (cdr subject)
(delq to (delq subject (delq body info))))
(when body
(insert (replace-regexp-in-string "\r\n" "\n" (cdr body)))
(unless (bolp) (insert "\n")))))
--8<---------------cut here---------------end--------------->8---
This allows a user to use her favorite mailer. Gnus users had
better have: (setq mail-user-agent 'gnus-user-agent)
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: shr-mailto (was Re: `W D D' in shr rendered article)
2010-11-08 5:09 ` shr-mailto (was Re: `W D D' in shr rendered article) Katsumi Yamaoka
@ 2010-11-08 21:27 ` Lars Magne Ingebrigtsen
2010-11-08 23:12 ` Katsumi Yamaoka
0 siblings, 1 reply; 9+ messages in thread
From: Lars Magne Ingebrigtsen @ 2010-11-08 21:27 UTC (permalink / raw)
To: ding
Katsumi Yamaoka <yamaoka@jpl.org> writes:
> How about this generic one?
I think calling `browse-url-mailto' would be the easiest thing to do.
(I just discovered the existence of that function after I wrote a new
function `message-mailto'. :-/)
--
(domestic pets only, the antidote for overdose, milk.)
larsi@gnus.org * Lars Magne Ingebrigtsen
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: shr-mailto (was Re: `W D D' in shr rendered article)
2010-11-08 21:27 ` Lars Magne Ingebrigtsen
@ 2010-11-08 23:12 ` Katsumi Yamaoka
2010-11-08 23:21 ` Lars Magne Ingebrigtsen
0 siblings, 1 reply; 9+ messages in thread
From: Katsumi Yamaoka @ 2010-11-08 23:12 UTC (permalink / raw)
To: ding
Lars Magne Ingebrigtsen <larsi@gnus.org> writes:
> Katsumi Yamaoka <yamaoka@jpl.org> writes:
>> How about this generic one?
> I think calling `browse-url-mailto' would be the easiest thing to do.
> (I just discovered the existence of that function after I wrote a new
> function `message-mailto'. :-/)
Oops, I've reinvented the wheel. But I tried `browse-url-mail'
and found there's no user agent that inserts `body' automatically.
Try this:
(browse-url-mail
"mailto:nobody@example.com?subject=test&body=Hello%20World%0d%0a")
As for `message-user-agent', `sendmail-user-agent' and
`gnus-user-agent', `C-c C-y' yanks the body. But shouldn't it
be there from the beginning? The body part of a mailto link is
not rendered normally, and maybe no one knows that `C-c C-y' is
the command to yank its body. WDYT?
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: shr-mailto (was Re: `W D D' in shr rendered article)
2010-11-08 23:12 ` Katsumi Yamaoka
@ 2010-11-08 23:21 ` Lars Magne Ingebrigtsen
2010-11-08 23:46 ` Katsumi Yamaoka
0 siblings, 1 reply; 9+ messages in thread
From: Lars Magne Ingebrigtsen @ 2010-11-08 23:21 UTC (permalink / raw)
To: ding
Katsumi Yamaoka <yamaoka@jpl.org> writes:
> Oops, I've reinvented the wheel. But I tried `browse-url-mail'
> and found there's no user agent that inserts `body' automatically.
> Try this:
>
> (browse-url-mail
> "mailto:nobody@example.com?subject=test&body=Hello%20World%0d%0a")
>
> As for `message-user-agent', `sendmail-user-agent' and
> `gnus-user-agent', `C-c C-y' yanks the body.
If I `C-y C-y' after evaling that, I get
----
nobody writes:
----
If I then `M-u' to undo, I get
----
Hello World
----
Er... what!? That not only seems not quite right, but rather weird,
too.
> But shouldn't it be there from the beginning? The body part of a
> mailto link is not rendered normally, and maybe no one knows that `C-c
> C-y' is the command to yank its body. WDYT?
Yes, I think the body part should be there by default. But I've never
actually seen a mailto link with a body part. :-)
--
(domestic pets only, the antidote for overdose, milk.)
larsi@gnus.org * Lars Magne Ingebrigtsen
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: shr-mailto (was Re: `W D D' in shr rendered article)
2010-11-08 23:21 ` Lars Magne Ingebrigtsen
@ 2010-11-08 23:46 ` Katsumi Yamaoka
2010-11-09 7:08 ` shr-mailto Reiner Steib
0 siblings, 1 reply; 9+ messages in thread
From: Katsumi Yamaoka @ 2010-11-08 23:46 UTC (permalink / raw)
To: ding
Lars Magne Ingebrigtsen <larsi@gnus.org> writes:
[...]
>> But shouldn't it be there from the beginning? The body part of a
>> mailto link is not rendered normally, and maybe no one knows that `C-c
>> C-y' is the command to yank its body. WDYT?
>
> Yes, I think the body part should be there by default. But I've never
> actually seen a mailto link with a body part. :-)
Some mailing lists use it:
List-Help: <mailto:emacs-w3m-ctl@namazu.org?body=help>
It's not an html part though. Anyway I'll raise it in emacs-devel.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: shr-mailto
2010-11-08 23:46 ` Katsumi Yamaoka
@ 2010-11-09 7:08 ` Reiner Steib
2010-11-09 7:59 ` shr-mailto Katsumi Yamaoka
0 siblings, 1 reply; 9+ messages in thread
From: Reiner Steib @ 2010-11-09 7:08 UTC (permalink / raw)
To: ding
On Tue, Nov 09 2010, Katsumi Yamaoka wrote:
> Lars Magne Ingebrigtsen <larsi@gnus.org> writes:
[ (browse-url-mail
"mailto:nobody@example.com?subject=test&body=Hello%20World%0d%0a") ]
>> Yes, I think the body part should be there by default. But I've never
>> actually seen a mailto link with a body part. :-)
>
> Some mailing lists use it:
> List-Help: <mailto:emacs-w3m-ctl@namazu.org?body=help>
When I click/RET these URLs, I get a message buffer with the text in
the body. The function handling the URL is `gnus-url-mailto'.
(My copy of Gnus is rather old - from CVS, IIRC - so things might have
changed.)
Bye, Reiner.
--
,,,
(o o)
---ooO-(_)-Ooo--- | PGP key available | http://rsteib.home.pages.de/
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: shr-mailto
2010-11-09 7:08 ` shr-mailto Reiner Steib
@ 2010-11-09 7:59 ` Katsumi Yamaoka
0 siblings, 0 replies; 9+ messages in thread
From: Katsumi Yamaoka @ 2010-11-09 7:59 UTC (permalink / raw)
To: ding
Reiner Steib wrote:
> On Tue, Nov 09 2010, Katsumi Yamaoka wrote:
> mailto:nobody@example.com?subject=test&body=Hello%20World%0d%0a
> mailto:emacs-w3m-ctl@namazu.org?body=help
> When I click/RET these URLs, I get a message buffer with the text in
> the body. The function handling the URL is `gnus-url-mailto'.
> (My copy of Gnus is rather old - from CVS, IIRC - so things might have
> changed.)
Nothing has changed up to now. I traced that code and felt it's
the best at present. :)
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2010-11-09 7:59 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <E1PE6RB-0005wP-00@quimby.gnus.org>
2010-11-05 7:54 ` `W D D' in shr rendered article Katsumi Yamaoka
2010-11-05 16:03 ` Lars Magne Ingebrigtsen
2010-11-08 5:09 ` shr-mailto (was Re: `W D D' in shr rendered article) Katsumi Yamaoka
2010-11-08 21:27 ` Lars Magne Ingebrigtsen
2010-11-08 23:12 ` Katsumi Yamaoka
2010-11-08 23:21 ` Lars Magne Ingebrigtsen
2010-11-08 23:46 ` Katsumi Yamaoka
2010-11-09 7:08 ` shr-mailto Reiner Steib
2010-11-09 7:59 ` shr-mailto Katsumi Yamaoka
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 NNTP newsgroup(s).