From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/73892 Path: news.gmane.org!not-for-mail From: Katsumi Yamaoka Newsgroups: gmane.emacs.gnus.general Subject: shr-mailto (was Re: `W D D' in shr rendered article) Date: Mon, 08 Nov 2010 14:09:06 +0900 Organization: Emacsen advocacy group Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1289193065 19327 80.91.229.12 (8 Nov 2010 05:11:05 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 8 Nov 2010 05:11:05 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M22261@lists.math.uh.edu Mon Nov 08 06:11:01 2010 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PFK0Q-0001R3-NB for ding-account@gmane.org; Mon, 08 Nov 2010 06:10:59 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by util0.math.uh.edu with smtp (Exim 4.63) (envelope-from ) id 1PFJzP-0006a7-5Y; Sun, 07 Nov 2010 23:09:55 -0600 Original-Received: from mx1.math.uh.edu ([129.7.128.32]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1PFJzM-0006Zr-Bo for ding@lists.math.uh.edu; Sun, 07 Nov 2010 23:09:52 -0600 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx1.math.uh.edu with esmtp (Exim 4.72) (envelope-from ) id 1PFJzH-0007VV-8Z for ding@lists.math.uh.edu; Sun, 07 Nov 2010 23:09:51 -0600 Original-Received: from orlando.hostforweb.net ([216.246.45.90]) by quimby.gnus.org with esmtp (Exim 3.36 #1 (Debian)) id 1PFJzG-0007ym-00 for ; Mon, 08 Nov 2010 06:09:46 +0100 Original-Received: from localhost ([127.0.0.1]:59247) by orlando.hostforweb.net with esmtpa (Exim 4.69) (envelope-from ) id 1PFJyf-0004MZ-5z for ding@gnus.org; Sun, 07 Nov 2010 23:09:09 -0600 X-Hashcash: 1:20:101108:ding@gnus.org::LShJie1OFBvg74li:00005OAg X-Face: #kKnN,xUnmKia.'[pp`;Omh}odZK)?7wQSl"4o04=EixTF+V[""w~iNbM9ZL+.b*_CxUmFk B#Fu[*?MZZH@IkN:!"\w%I_zt>[$nm7nQosZ<3eu;B:$Q_:p!',P.c0-_Cy[dz4oIpw0ESA^D*1Lw= L&i*6&( User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/24.0.50 (gnu/linux) Cancel-Lock: sha1:+FIfEFKeTQ2QwNm6+pZxQVU2u4g= X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - orlando.hostforweb.net X-AntiAbuse: Original Domain - gnus.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - jpl.org X-Source: X-Source-Args: X-Source-Dir: X-Spam-Score: -1.9 (-) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:73892 Archived-At: Lars Magne Ingebrigtsen wrote: > Katsumi Yamaoka 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)