Gnus development mailing list
 help / color / mirror / Atom feed
* Patches to fix expiring when expiry-target is a string
@ 2000-07-24 20:46 Rod Whitby
  0 siblings, 0 replies; only message in thread
From: Rod Whitby @ 2000-07-24 20:46 UTC (permalink / raw)


The functionality of setting nnmail-expiry-target to a string (i.e. a
group to which the expired articles should be moved, instead of being
deleted) just plain does not work.  Therefore, there must be no-one
but me using it :-)

Anyway, here's some patches (against a pretty recent snapshot, and I
don't think anything around them has changed since) that do the
following:

1/ [gnus-sum.el, gnus-summary-expire-articles]

   Fix the handling of expiry-target group parameters.

2/ [nnml.el, nnml-request-expire-articles]

   Fix the calls to nnml-request-article (the filename was being
   passed instead of the article number) and
   nnmail-expiry-target-group (nnml-current-directory is changed by
   nnml-request-accept-article, causing it to be incorrect for the
   next article to be expired).

3/ [nnmail.el, nnmail-expiry-target-group]

   Fix the call to gnus-request-accept-article so that body encoding
   is *not* done.  Encoding is not done on incoming mail, so why
   should it be done on expired mail?

This is my first patch submission to the ding mailing list, so please
let me know if I should have submitted these in another format (in
particular, how do you get the nice ChangeLog entries?), and also how
I should proceed in getting these checked into CVS.

For those interested, the reason why I found these problems is because
I have just set up my nnml:INBOX to expire to a nnml:DELETED folder
immediately, and then the nnml:DELETED folder really deletes the
messages after a long time.  Sort of like the Trash folder in
Netscape, only better :-) Now I can set display to 'all in my
nnml:INBOX group parameters and use the tick marks properly, while
still seeing my other unfiled mail when I enter the folder normally.

diff -c /gnu/XEmacs/site-packages/gnus/lisp/gnus-sum.el~ /gnu/XEmacs/site-packages/gnus/lisp/gnus-sum.el
*** /gnu/XEmacs/site-packages/gnus/lisp/gnus-sum.el~	Tue Jul 25 05:56:17 2000
--- /gnu/XEmacs/site-packages/gnus/lisp/gnus-sum.el	Tue Jul 25 05:56:17 2000
***************
*** 7682,7687 ****
--- 7682,7690 ----
  	   (expiry-wait (if now 'immediate
  			  (gnus-group-find-parameter
  			   gnus-newsgroup-name 'expiry-wait)))
+ 	   (nnmail-expiry-target
+ 	    (or (gnus-group-find-parameter gnus-newsgroup-name 'expiry-target)
+ 		nnmail-expiry-target))
  	   es)
        (when expirable
  	;; There are expirable articles in this group, so we run them


diff -c /gnu/XEmacs/site-packages/gnus/lisp/nnml.el~ /gnu/XEmacs/site-packages/gnus/lisp/nnml.el
*** /gnu/XEmacs/site-packages/gnus/lisp/nnml.el~	Tue Jul 25 05:07:35 2000
--- /gnu/XEmacs/site-packages/gnus/lisp/nnml.el	Tue Jul 25 05:07:35 2000
***************
*** 289,300 ****
  		;; Allow a special target group.
  		(unless (eq nnmail-expiry-target 'delete)
  		  (with-temp-buffer
! 		    (nnml-request-article article group server
  					  (current-buffer))
! 		    (nnmail-expiry-target-group
! 		     nnmail-expiry-target group)))
  		(nnheader-message 5 "Deleting article %s in %s"
! 				  article group)
  		(condition-case ()
  		    (funcall nnmail-delete-file-function article)
  		  (file-error
--- 289,301 ----
  		;; Allow a special target group.
  		(unless (eq nnmail-expiry-target 'delete)
  		  (with-temp-buffer
! 		    (nnml-request-article number group server
  					  (current-buffer))
! 		    (let ((nnml-current-directory nil))
! 		      (nnmail-expiry-target-group
! 		       nnmail-expiry-target group))))
  		(nnheader-message 5 "Deleting article %s in %s"
! 				  number group)
  		(condition-case ()
  		    (funcall nnmail-delete-file-function article)
  		  (file-error


diff -c /gnu/XEmacs/site-packages/gnus/lisp/nnmail.el~ /gnu/XEmacs/site-packages/gnus/lisp/nnmail.el
*** /gnu/XEmacs/site-packages/gnus/lisp/nnmail.el~	Tue Jul 25 05:08:51 2000
--- /gnu/XEmacs/site-packages/gnus/lisp/nnmail.el	Tue Jul 25 05:08:51 2000
***************
*** 1610,1616 ****
    (when (nnheader-functionp target)
      (setq target (funcall target group)))
    (unless (eq target 'delete)
!     (gnus-request-accept-article target)))
  
  (defun nnmail-check-syntax ()
    "Check (and modify) the syntax of the message in the current buffer."
--- 1610,1616 ----
    (when (nnheader-functionp target)
      (setq target (funcall target group)))
    (unless (eq target 'delete)
!     (gnus-request-accept-article target nil nil t)))
  
  (defun nnmail-check-syntax ()
    "Check (and modify) the syntax of the message in the current buffer."

-- 
-- Rod Whitby, Snr Staff Engr, Electronic Design Automation --
-- Motorola Australia Software Centre - Adelaide, Australia --
-- Phone: +61 8 8203 3526, Fax: +61 8 8203 3501, <GMT+9:30> --




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

only message in thread, other threads:[~2000-07-24 20:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-07-24 20:46 Patches to fix expiring when expiry-target is a string Rod Whitby

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