Gnus development mailing list
 help / color / mirror / Atom feed
From: Katsumi Yamaoka <yamaoka@jpl.org>
To: ding@gnus.org
Subject: shr-mailto (was Re: `W D D' in shr rendered article)
Date: Mon, 08 Nov 2010 14:09:06 +0900	[thread overview]
Message-ID: <b4msjzc1jwt.fsf_-_@jpl.org> (raw)
In-Reply-To: <m3lj57sqoh.fsf@quimbies.gnus.org>

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)



  reply	other threads:[~2010-11-08  5:09 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [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     ` Katsumi Yamaoka [this message]
2010-11-08 21:27       ` shr-mailto (was Re: `W D D' in shr rendered article) 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

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

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

  git send-email \
    --in-reply-to=b4msjzc1jwt.fsf_-_@jpl.org \
    --to=yamaoka@jpl.org \
    --cc=ding@gnus.org \
    /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.
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).