* mailto body
@ 2010-11-09 1:32 Katsumi Yamaoka
2010-11-09 17:48 ` Lars Magne Ingebrigtsen
0 siblings, 1 reply; 3+ messages in thread
From: Katsumi Yamaoka @ 2010-11-09 1:32 UTC (permalink / raw)
To: emacs-devel; +Cc: ding
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---
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: mailto body
2010-11-09 1:32 mailto body Katsumi Yamaoka
@ 2010-11-09 17:48 ` Lars Magne Ingebrigtsen
2010-11-10 0:03 ` Katsumi Yamaoka
0 siblings, 1 reply; 3+ messages in thread
From: Lars Magne Ingebrigtsen @ 2010-11-09 17:48 UTC (permalink / raw)
To: emacs-devel; +Cc: ding
Katsumi Yamaoka <yamaoka@jpl.org> writes:
> 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.
Yes, I think that makes sense. A mailto url with body=subscribe means
that the body should have that string literally, and not quoted, so
this is the right thing to do.
--
(domestic pets only, the antidote for overdose, milk.)
larsi@gnus.org * Lars Magne Ingebrigtsen
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: mailto body
2010-11-09 17:48 ` Lars Magne Ingebrigtsen
@ 2010-11-10 0:03 ` Katsumi Yamaoka
0 siblings, 0 replies; 3+ messages in thread
From: Katsumi Yamaoka @ 2010-11-10 0:03 UTC (permalink / raw)
To: emacs-devel; +Cc: ding
Lars Magne Ingebrigtsen wrote:
> Katsumi Yamaoka <yamaoka@jpl.org> writes:
>> 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.
> Yes, I think that makes sense. A mailto url with body=subscribe means
> that the body should have that string literally, and not quoted, so
> this is the right thing to do.
Done. Thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-11-10 0:03 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-09 1:32 mailto body Katsumi Yamaoka
2010-11-09 17:48 ` Lars Magne Ingebrigtsen
2010-11-10 0:03 ` Katsumi Yamaoka
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).