Gnus development mailing list
 help / color / mirror / Atom feed
* mailto URLs vs. gnus-ml.el
@ 2006-05-06 20:23 Andreas Seltenreich
  2006-05-29 21:28 ` Reiner Steib
  0 siblings, 1 reply; 2+ messages in thread
From: Andreas Seltenreich @ 2006-05-06 20:23 UTC (permalink / raw)


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

Hi,

I just tried to subscribe to a list I was reading through gmane using
gnus-mailing-list-subscribe, but the message body that was generated
didn't look very promising:

    sub%20pgsql-committers

The attached patch fixes it by calling gnus-url-mailto instead of
ad-hoc parsing the url and manually setting up a message buffer.

Thanks,
andreas

2006-05-06  Andreas Seltenreich  <uwi7@rz.uni-karlsruhe.de>

	* gnus-ml.el (gnus-mailing-list-message): Use gnus-url-mailto
	instead of doing it manually.


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

Index: gnus-ml.el
===================================================================
RCS file: /usr/local/cvsroot/gnus/lisp/gnus-ml.el,v
retrieving revision 7.7
diff -c -r7.7 gnus-ml.el
*** gnus-ml.el	8 Feb 2006 04:17:15 -0000	7.7
--- gnus-ml.el	6 May 2006 20:23:03 -0000
***************
*** 170,201 ****
  
  (defun gnus-mailing-list-message (address)
    ""
!   (let ((mailto  "")
! 	(to ())
! 	(subject "None")
! 	(body "")
! 	)
!     (cond
!      ((string-match "<mailto:\\([^>]*\\)>" address)
!       (let ((args (match-string 1 address)))
! 	(cond				; with param
! 	 ((string-match "\\(.*\\)\\?\\(.*\\)" args)
! 	  (setq mailto (match-string 1 args))
! 	  (let ((param (match-string 2 args)))
! 	    (if (string-match "subject=\\([^&]*\\)" param)
! 		(setq subject (match-string 1 param)))
! 	    (if (string-match "body=\\([^&]*\\)" param)
! 		(setq body (match-string 1 param)))
! 	    (if (string-match "to=\\([^&]*\\)" param)
! 		(push (match-string 1 param) to))
! 	    ))
! 	 (t (setq mailto args)))))	; without param
! 
       ; other case <http://... to be done.
!      (t nil))
!     (gnus-setup-message 'message (message-mail mailto subject))
!     (insert body)
!     ))
  
  (provide 'gnus-ml)
  
--- 170,181 ----
  
  (defun gnus-mailing-list-message (address)
    ""
!   (cond
!    ((string-match "<\\(mailto:[^>]*\\)>" address)
!     (require 'gnus-art)
!     (gnus-url-mailto (match-string 1 address)))
       ; other case <http://... to be done.
!    (t nil)))
  
  (provide 'gnus-ml)
  

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: mailto URLs vs. gnus-ml.el
  2006-05-06 20:23 mailto URLs vs. gnus-ml.el Andreas Seltenreich
@ 2006-05-29 21:28 ` Reiner Steib
  0 siblings, 0 replies; 2+ messages in thread
From: Reiner Steib @ 2006-05-29 21:28 UTC (permalink / raw)


On Sat, May 06 2006, Andreas Seltenreich wrote:

> 2006-05-06  Andreas Seltenreich  <uwi7@rz.uni-karlsruhe.de>
>
> 	* gnus-ml.el (gnus-mailing-list-message): Use gnus-url-mailto
> 	instead of doing it manually.

Applied.  Thanks.

Bye, Reiner.
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo---  |  PGP key available  |  http://rsteib.home.pages.de/




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-05-29 21:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-05-06 20:23 mailto URLs vs. gnus-ml.el Andreas Seltenreich
2006-05-29 21:28 ` Reiner Steib

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