Gnus development mailing list
 help / color / mirror / Atom feed
* nnimap-expiry-target?
@ 2000-12-23  3:20 NAGY Andras
  2000-12-23 15:34 ` nnimap-expiry-target? Simon Josefsson
  0 siblings, 1 reply; 4+ messages in thread
From: NAGY Andras @ 2000-12-23  3:20 UTC (permalink / raw)



Shouldn't nnimap support nnmail-expiry-target (which allows expired
articles to be moved to a specific group instead of being deleted), or
provide some equivalent?

Andras



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

* Re: nnimap-expiry-target?
  2000-12-23  3:20 nnimap-expiry-target? NAGY Andras
@ 2000-12-23 15:34 ` Simon Josefsson
  2000-12-28  0:29   ` nnimap-expiry-target? NAGY Andras
  0 siblings, 1 reply; 4+ messages in thread
From: Simon Josefsson @ 2000-12-23 15:34 UTC (permalink / raw)
  Cc: ding

NAGY Andras <nagya@inf.elte.hu> writes:

> Shouldn't nnimap support nnmail-expiry-target (which allows expired
> articles to be moved to a specific group instead of being deleted)

Yup, I've added support for it in CVS.  Does it work?




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

* Re: nnimap-expiry-target?
  2000-12-23 15:34 ` nnimap-expiry-target? Simon Josefsson
@ 2000-12-28  0:29   ` NAGY Andras
  2000-12-28  9:50     ` nnimap-expiry-target? Kai Großjohann
  0 siblings, 1 reply; 4+ messages in thread
From: NAGY Andras @ 2000-12-28  0:29 UTC (permalink / raw)


Simon Josefsson <sj@extundo.com> writes:

> NAGY Andras <nagya@inf.elte.hu> writes:
> 
> > Shouldn't nnimap support nnmail-expiry-target (which allows expired
> > articles to be moved to a specific group instead of being deleted)
> 
> Yup, I've added support for it in CVS.  Does it work?

Depends.

Given a group, INBOX.test.foo, with parameters (total-expire . t) and
(expiry-wait . immediate), and nnmail-expiry-target set to
"INBOX.test.arch", where the latter group does not exist and the
default select method is something different from imap.  C-c C-x on
INBOX.test.foo results in:

Signaling: (void-function nnspool-request-accept-article)
  nnspool-request-accept-article("INBOX.test.arch" "" nil)
  gnus-request-accept-article("INBOX.test.arch" nil nil t)
  nnmail-expiry-target-group("INBOX.test.arch" "INBOX.test.foo")
  nnimap-expiry-target((4 . 6) "INBOX.test.foo" "mailbox")
  nnimap-request-expire-articles((4 5 6) "INBOX.test.foo" "mailbox" nil)
  gnus-request-expire-articles((4 5 6) "nnimap+mailbox:INBOX.test.foo")
  gnus-group-expire-articles-1("nnimap+mailbox:INBOX.test.foo")
  gnus-group-expire-articles(nil)
  call-interactively(gnus-group-expire-articles)
  #<compiled-function (topic) "...(37)" [topic call-interactively gnus-group-expire-articles gnus-message 5 "Expiring groups in %s..." mapcar #<compiled-function ... "...(5)" ... 2> gnus-topic-find-groups gnus-level-killed t gnus-group-marked nil "Expiring groups in %s...done"] 6 ("/home/nagya/gnus/gnus-build/lisp/gnus-topic.elc" . 23870) (list (gnus-group-topic-name))>(nil)
  call-interactively(gnus-topic-expire-articles)


It tries to use the default select method for storing the article,
instead of imap, therefore the fully qualified group name should be
given in expiry-target.  Not sure if this is a bug.  Anyway, it seems
to me that it downloads the article in question, then respools it in
the target group.  On imap targets, this should be optimized out, by
using server side copying.  (Like in the case of splitting.)


Fails to save if the archive group does not exist (autocreate?), but
deletes anyway.


Using imap target by default and autocreate would be nice, as they
allow constructs like this (store expired foo.bar aritcles in
archive.foo.bar):

(setq nnmail-expiry-target
      (lambda (group)
	(replace-in-string group
			   "\\`\\(INBOX\\.\\|\\)\\(.*\\)"
			   "INBOX.archive.\\2")))


Otherwise (with existsing, fully qualified target group) works fine.



Andras



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

* Re: nnimap-expiry-target?
  2000-12-28  0:29   ` nnimap-expiry-target? NAGY Andras
@ 2000-12-28  9:50     ` Kai Großjohann
  0 siblings, 0 replies; 4+ messages in thread
From: Kai Großjohann @ 2000-12-28  9:50 UTC (permalink / raw)
  Cc: ding

Automatic group creation would indeed be useful, but I don't think
that it is a good idea to move away from the fully qualified group
names.  Other than a few extra bytes in ~/.gnus, I can see no problem
with specifying "nnimap:foo" rather than "foo" as an expiry target.

Even the code that stores articles from nnimap:INBOX.foo into
nnimap:INBOX.archive.foo would almost work right out of the box; all
you have to do is to frob the regexp a little bit.

kai
-- 
~/.signature



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

end of thread, other threads:[~2000-12-28  9:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-12-23  3:20 nnimap-expiry-target? NAGY Andras
2000-12-23 15:34 ` nnimap-expiry-target? Simon Josefsson
2000-12-28  0:29   ` nnimap-expiry-target? NAGY Andras
2000-12-28  9:50     ` nnimap-expiry-target? Kai Großjohann

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