Gnus development mailing list
 help / color / mirror / Atom feed
* Re: Archiving Inbox
       [not found] ` <vafd7jpedcp.fsf@lucy.cs.uni-dortmund.de>
@ 2000-08-04 11:39   ` Harry Putnam
  2000-08-04 15:17     ` Kai Großjohann
  0 siblings, 1 reply; 7+ messages in thread
From: Harry Putnam @ 2000-08-04 11:39 UTC (permalink / raw)


The following message is a courtesy copy of an article
that has been posted to gnu.emacs.gnus as well.

[posted to both gnu.emacs.gnus and ding list]

Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann) writes:

> I think you can set the expiry-target group parameter to a string,
> which is a group name to move the messages to.
> 
> It's not clear to me how to frob the group parameter to be different
> every month, though.  Anyone?

Anyone have examples of even the first part?  Targeting a directory
to  expiry  old messages into.

A simple example of expiry targeting in gnus info would be a nice
addition.

An example  function to generate a different one every mnth  would be
a very nice addition to gnus info.  

No released gnus or current cvs ognus (this morning 5.8.8) contains an
example of any targeting whatever.  Seems there was a tradition of
having examples of things like that.  Lars and others included many
good examples throughout gnus info.  Can we have some examples for
`targeted expiry'?

These in group param do not work here:

   ((expiry-target . "nnml:target")
     (expiry-wait . 21 ))
   
   ((expiry-target . "nnml:target)
    (total-expire . t )
    (expiry-wait . 14 ))
   
Under the first no expiry happens as I decrease the wait period.

Under the second, expiry happens but no `nnml:target' is created.
Creating `nnml:target' manually doesn't help.

Is the global variable `nnmail-expiry-target' supposed to be set
first?
Or is it also set in Group Params?

Just not enough information at the entry about expiry-target in info.
 








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

* Re: Archiving Inbox
  2000-08-04 11:39   ` Archiving Inbox Harry Putnam
@ 2000-08-04 15:17     ` Kai Großjohann
  2000-08-04 17:55       ` Harry Putnam
  2000-08-06 23:23       ` Rod Whitby
  0 siblings, 2 replies; 7+ messages in thread
From: Kai Großjohann @ 2000-08-04 15:17 UTC (permalink / raw)
  Cc: ding

On Fri, 04 Aug 2000, Harry Putnam wrote:

>    ((expiry-target . "nnml:target")
>      (expiry-wait . 21 ))
>    
>    ((expiry-target . "nnml:target)
>     (total-expire . t )
>     (expiry-wait . 14 ))

I haven't tried this, but these settings look good.  (That is, that's
what I would have set if I wanted to try the feature.)  Is there a bug
in Gnus?

Has anybody tried this?

kai
-- 
I like BOTH kinds of music.



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

* Re: Archiving Inbox
  2000-08-04 15:17     ` Kai Großjohann
@ 2000-08-04 17:55       ` Harry Putnam
  2000-08-10 16:39         ` Kai Großjohann
  2000-08-06 23:23       ` Rod Whitby
  1 sibling, 1 reply; 7+ messages in thread
From: Harry Putnam @ 2000-08-04 17:55 UTC (permalink / raw)


Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann) writes:

> On Fri, 04 Aug 2000, Harry Putnam wrote:
> 
> >    ((expiry-target . "nnml:target")
> >      (expiry-wait . 21 ))
> >    
> >    ((expiry-target . "nnml:target)
> >     (total-expire . t )
> >     (expiry-wait . 14 ))
> 
> I haven't tried this, but these settings look good.  (That is, that's
> what I would have set if I wanted to try the feature.)  Is there a bug
> in Gnus?
> 
> Has anybody tried this?

It also wasn't clear to me from info, what role the variable
`nnmail-expiry-target' plays in all this.  It can be set to a string
or function, yes but does that then apply to all expiry globally or
what?

That is, if one sets nnmail-expiry-target to "nnml:target"  will all
expiry then send messages to nnml:target?

Or is that var set only in Group params.

Far as I can see, this is the sum total available in `info'

      The normal action taken when expiring articles is to delete them.
   However, in some circumstances it might make more sense to move them to
   other groups instead of deleting them.  The `nnmail-expiry-target' (and
   the `expiry-target' group parameter) controls this.  The default value
   is `delete', but this can also be a string (which should be the name of
   the group the message should be moved to), or a function (which will be
   called in a buffer narrowed to the message in question, and with the
   name of the group being moved from as its parameter) which should
   return a target - either a group name or `delete'.

Just too ambiguous to tell what is needed.  Do both
`nnmail-expiry-target' and group param  `expiry-target' need to be set?

Unless there is a consensus that gnus info is only meant for elisp
progammers, then I  will submit further that the section:

   . . . . . . . . . . . . . . . . . . . . . . . . The default value
   is `delete', but this can also be a string (which should be the name of
   the group the message should be moved to), or a function (which will be
   called in a buffer narrowed to the message in question, and with the
   name of the group being moved from as its parameter) which should
   return a target - either a group name or `delete'.

Can only make sense to someone conversant with elisp programming.  And
should be written in common parlance, or a simple example of what is
meant be included.  Those should be bare minimum requirements for gnus info.



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

* Re: Archiving Inbox
  2000-08-04 15:17     ` Kai Großjohann
  2000-08-04 17:55       ` Harry Putnam
@ 2000-08-06 23:23       ` Rod Whitby
  2000-08-07 20:50         ` Arcady Genkin
  1 sibling, 1 reply; 7+ messages in thread
From: Rod Whitby @ 2000-08-06 23:23 UTC (permalink / raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=us-ascii, Size: 5226 bytes --]

Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann) writes:
> On Fri, 04 Aug 2000, Harry Putnam wrote:
> 
> >    ((expiry-target . "nnml:target")
> >      (expiry-wait . 21 ))
> >    
> >    ((expiry-target . "nnml:target)
> >     (total-expire . t )
> >     (expiry-wait . 14 ))
> 
> I haven't tried this, but these settings look good.  (That is, that's
> what I would have set if I wanted to try the feature.)  Is there a bug
> in Gnus?

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] 7+ messages in thread

* Re: Archiving Inbox
  2000-08-06 23:23       ` Rod Whitby
@ 2000-08-07 20:50         ` Arcady Genkin
  0 siblings, 0 replies; 7+ messages in thread
From: Arcady Genkin @ 2000-08-07 20:50 UTC (permalink / raw)


Rod Whitby <list.ding@rwhitby.net> writes:

> > >    ((expiry-target . "nnml:target")
> > >      (expiry-wait . 21 ))
> > >    
> > >    ((expiry-target . "nnml:target)
> > >     (total-expire . t )
> > >     (expiry-wait . 14 ))
> 
> 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 :-)

This functionality was requested just before the last Larse's Gnus
programming frenzy.  He was nice enough to implement it, but he also
said that it was untested.  It's quite possible that you are the first
one to ever use it. ;^)

I keep all my mail on an IMAP server, and IIRC, this doesn't work for
nnimap yet.  The moment `expire by moving' will support nnimap, I'll
be *so* eager to test it.  I've been waiting for it for quite a
while... ;^)
-- 
Arcady Genkin
Don't read everything you believe.



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

* Re: Archiving Inbox
  2000-08-04 17:55       ` Harry Putnam
@ 2000-08-10 16:39         ` Kai Großjohann
  2000-08-10 23:50           ` Rod Whitby
  0 siblings, 1 reply; 7+ messages in thread
From: Kai Großjohann @ 2000-08-10 16:39 UTC (permalink / raw)
  Cc: ding

On 04 Aug 2000, Harry Putnam wrote:

> It also wasn't clear to me from info, what role the variable
> `nnmail-expiry-target' plays in all this.  It can be set to a string
> or function, yes but does that then apply to all expiry globally or
> what?

It's not clear to me, either.  I think that nnmail-expiry-target
provides a default which can be overridden from the group parameters.

I'll put a note in the Gnus info file to this effect, and then we'll
wait for complaints to come in if it doesn't actually work that way.

kai
-- 
I like BOTH kinds of music.



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

* Re: Archiving Inbox
  2000-08-10 16:39         ` Kai Großjohann
@ 2000-08-10 23:50           ` Rod Whitby
  0 siblings, 0 replies; 7+ messages in thread
From: Rod Whitby @ 2000-08-10 23:50 UTC (permalink / raw)


Kai.Grossjohann@CS.Uni-Dortmund.DE writes:
> > It also wasn't clear to me from info, what role the variable
> > `nnmail-expiry-target' plays in all this.  It can be set to a string
> > or function, yes but does that then apply to all expiry globally or
> > what?
> 
> It's not clear to me, either.  I think that nnmail-expiry-target
> provides a default which can be overridden from the group parameters.

That is my understanding of the intention of the code, and is the
behaviour that my patch supports.  BTW, did my patch make it to the
list ?  I have kad no response to it at all, so I don't know whether
it will be applied to the distribution.

> I'll put a note in the Gnus info file to this effect, and then we'll
> wait for complaints to come in if it doesn't actually work that way.

It won't work that way unless my patch is applied.

-- 
-- Rod Whitby, Snr Staff Engr, Electronic Design Automation --
-- Motorola Australia Software Centre - Adelaide, Australia --
-- Phone: +61 8 8168 3526, Fax: +61 8 8168 3501, <GMT+9:30> --
-- Baby Photos: <URL:http://www.rwhitby.net/pregnancy.html> --




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

end of thread, other threads:[~2000-08-10 23:50 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <g0omngfw.fsf@lieckfeldt.net>
     [not found] ` <vafd7jpedcp.fsf@lucy.cs.uni-dortmund.de>
2000-08-04 11:39   ` Archiving Inbox Harry Putnam
2000-08-04 15:17     ` Kai Großjohann
2000-08-04 17:55       ` Harry Putnam
2000-08-10 16:39         ` Kai Großjohann
2000-08-10 23:50           ` Rod Whitby
2000-08-06 23:23       ` Rod Whitby
2000-08-07 20:50         ` Arcady Genkin

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