From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/73918 Path: news.gmane.org!not-for-mail From: Katsumi Yamaoka Newsgroups: gmane.emacs.devel,gmane.emacs.gnus.general Subject: mailto body Date: Tue, 09 Nov 2010 10:32:14 +0900 Organization: Emacsen advocacy group Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1289266408 28745 80.91.229.12 (9 Nov 2010 01:33:28 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 9 Nov 2010 01:33:28 +0000 (UTC) Cc: ding@gnus.org To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Nov 09 02:33:24 2010 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PFd5O-0008Ba-GS for ged-emacs-devel@m.gmane.org; Tue, 09 Nov 2010 02:33:22 +0100 Original-Received: from localhost ([127.0.0.1]:52012 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PFd5N-0001pu-Od for ged-emacs-devel@m.gmane.org; Mon, 08 Nov 2010 20:33:21 -0500 Original-Received: from [140.186.70.92] (port=50132 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PFd5I-0001pZ-H0 for emacs-devel@gnu.org; Mon, 08 Nov 2010 20:33:17 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PFd5H-0004pV-Eo for emacs-devel@gnu.org; Mon, 08 Nov 2010 20:33:16 -0500 Original-Received: from orlando.hostforweb.net ([216.246.45.90]:42019) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PFd5H-0004pN-BB for emacs-devel@gnu.org; Mon, 08 Nov 2010 20:33:15 -0500 Original-Received: from localhost ([127.0.0.1]:35479) by orlando.hostforweb.net with esmtpa (Exim 4.69) (envelope-from ) id 1PFd5D-0001rS-UO; Mon, 08 Nov 2010 19:33:12 -0600 X-Hashcash: 1:20:101109:emacs-devel@gnu.org::vlEyURyLfRtS8AJZ:0000000000000000000000000000000000000000001vOj X-Hashcash: 1:20:101109:ding@gnus.org::vb0vYqPvKFWGiTdF:00001jSm 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:Mw+fQjucHCohjlmmaMQ+CqT49KQ= 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 - gnu.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-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:132465 gmane.emacs.gnus.general:73918 Archived-At: Hi, `browse-url-mail' looks as though it disregards the body part of a mailto url. Try this: (browse-url-mail "mailto:nobody@example.com?subject=test&body=Hello%20World%0d%0a") In reality, you can yank the body part by `C-c C-y'. However, a user will not know the body part is there since a raw mailto url is not displayed in an html article[1] generally. No one likely knows that `C-c C-y' is the command to yank it. Moreover, citing it with `>'s will probably not be what the OP intended. I think a body text should be in a mail buffer as is from the beginning, and `C-c C-y' should be always the command to yank the original article with `>'s. Could you approve of? A patch is below. [1] Gnus now displays html articles using shr.el by default. We plan to use `browse-url-mail' in it. --8<---------------cut here---------------start------------->8--- --- browse-url.el~ 2010-10-11 22:17:42 +0000 +++ browse-url.el 2010-11-09 01:30:14 +0000 @@ -1486,13 +1486,18 @@ (mail-citation-hook (unless body mail-citation-hook))) (if (browse-url-maybe-new-window new-window) (compose-mail-other-window to subject rest nil - (if body - (list 'insert body) - (list 'insert-buffer (current-buffer)))) + (list 'insert-buffer (current-buffer))) (compose-mail to subject rest nil nil - (if body - (list 'insert body) - (list 'insert-buffer (current-buffer)))))))) + (list 'insert-buffer (current-buffer)))) + (when body + (goto-char (point-min)) + (unless (or (search-forward (concat "\n" mail-header-separator "\n") + nil 'move) + (bolp)) + (insert "\n")) + (insert (replace-regexp-in-string "\r\n" "\n" body)) + (unless (bolp) + (insert "\n")))))) ;; --- Random browser --- --8<---------------cut here---------------end--------------->8---