Gnus development mailing list
 help / color / mirror / Atom feed
From: f95-msv@f.kth.se (Mårten Svantesson)
Subject: Patch for gnus-url-mailto
Date: Fri, 24 Oct 2003 19:24:40 +0200	[thread overview]
Message-ID: <h6b7k2ur1k7.fsf@fnatte.nada.kth.se> (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)

                 reply	other threads:[~2003-10-24 17:24 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=h6b7k2ur1k7.fsf@fnatte.nada.kth.se \
    --to=f95-msv@f.kth.se \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).