emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: url-mailto insert 'body' in the wrong place


From: David Kastrup
Subject: Re: url-mailto insert 'body' in the wrong place
Date: Mon, 28 May 2007 20:32:12 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1.50 (gnu/linux)

Leo <address@hidden> writes:

> Dear all,
>
> To see the issue:
>
>   (url-mailto (url-generic-parse-url "mailto:address@hidden should be 
> inserted before the signature"))
>
> If the mail buffer has a signature part, the 'body' text will be added
> after the signature, which is clearly wrong.
>
> I wonder if the following small patch is good:
>
> Index: url-mailto.el
> ===================================================================
> RCS file: /cvsroot/emacs/emacs/lisp/url/url-mailto.el,v
> retrieving revision 1.4.2.9
> diff -u -r1.4.2.9 url-mailto.el
> --- url-mailto.el     26 Jan 2007 06:15:30 -0000      1.4.2.9
> +++ url-mailto.el     28 May 2007 18:13:20 -0000
> @@ -60,6 +60,11 @@
>       (save-excursion
>         (insert "\n"))))))
>  
> +(defun url-mail-goto-body ()
> +  (goto-char (point-min))
> +  (or (search-forward (concat "\n" mail-header-separator "\n") nil t)
> +      (goto-char (point-max))))
> +

Can't you use message-goto-body here?

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum




reply via email to

[Prev in Thread] Current Thread [Next in Thread]