Gnus development mailing list
 help / color / mirror / Atom feed
* Patch for gnus-url-mailto
@ 2003-10-24 17:24 Mårten Svantesson
  0 siblings, 0 replies; only message in thread
From: Mårten Svantesson @ 2003-10-24 17:24 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 357 bytes --]

Hi!

I read rfc 2368 and found a couple an example that didn't work
correctly i gnus:

mailto:addr1?to=addr2

It's also stated that line breaks should be encoded as "%0D%0A". In
this case gnus show ^M.

A patch is attached to fix these things.

-- 
                - Mårten
 
mail: msv@kth.se *** ICQ: 4356928 *** mobile: +46 (0)707390385


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 1946 bytes --]

Index: gnus-art.el
===================================================================
RCS file: /usr/local/cvsroot/gnus/lisp/gnus-art.el,v
retrieving revision 6.376
diff -c -r6.376 gnus-art.el
*** gnus-art.el	22 Oct 2003 12:25:50 -0000	6.376
--- gnus-art.el	24 Oct 2003 17:22:10 -0000
***************
*** 6612,6632 ****
    ;; Send mail to someone
    (when (string-match "mailto:/*\\(.*\\)" url)
      (setq url (substring url (match-beginning 1) nil)))
!   (let (to args subject func)
!     (if (string-match (regexp-quote "?") url)
! 	(setq to (gnus-url-unhex-string (substring url 0 (match-beginning 0)))
! 	      args (gnus-url-parse-query-string
! 		    (substring url (match-end 0) nil) t))
!       (setq to (gnus-url-unhex-string url)))
!     (setq args (cons (list "to" to) args)
! 	  subject (cdr-safe (assoc "subject" args)))
      (gnus-msg-mail)
      (while args
        (setq func (intern-soft (concat "message-goto-" (downcase (caar args)))))
        (if (fboundp func)
  	  (funcall func)
  	(message-position-on-field (caar args)))
!       (insert (mapconcat 'identity (cdar args) ", "))
        (setq args (cdr args)))
      (if subject
  	(message-goto-body)
--- 6612,6632 ----
    ;; Send mail to someone
    (when (string-match "mailto:/*\\(.*\\)" url)
      (setq url (substring url (match-beginning 1) nil)))
!   (let (args subject func)
!     (setq args 
! 	  (gnus-url-parse-query-string 
! 	   (concat "to=" 
! 		   (replace-in-string url (regexp-quote "?") "&")) t))
!     (setq subject (cdr-safe (assoc "subject" args)))
      (gnus-msg-mail)
      (while args
        (setq func (intern-soft (concat "message-goto-" (downcase (caar args)))))
        (if (fboundp func)
  	  (funcall func)
  	(message-position-on-field (caar args)))
!       (insert (replace-in-string 
! 	       (mapconcat 'identity (cdar args) ", ")
! 	       "\r\n" "\n"))
        (setq args (cdr args)))
      (if subject
  	(message-goto-body)

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-10-24 17:24 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-10-24 17:24 Patch for gnus-url-mailto Mårten Svantesson

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).