Gnus development mailing list
 help / color / mirror / Atom feed
From: "Davide G. M. Salvetti" <salve@debian.org>
Subject: nnimap, expiry-target, nnmail-fancy-expiry-targets
Date: Fri, 19 Jul 2002 16:02:42 +0200	[thread overview]
Message-ID: <87sn2fiznh.fsf@hal.Olympus.INVALID> (raw)

Hi all!

I've a problem with the stuff in the subject line.

I'd like to have all messages of a certain nnimap group (INBOX) auto
archived in a bunch of nnimap groups (on the same IMAP server) named
after year-month, the specific group being chosen based on the date of
the message to be archived.

After reading the docs I thought I could have what I wanted with the
following setup:

  * group parameters:
<======================================================================>
 (total-expire . t)
 (expiry-wait . immediate)
 (expiry-target . nnmail-fancy-expiry-target)
<======================================================================>

  * nnmail-fancy-expiry-targets:
<======================================================================>
(setq nnmail-fancy-expiry-targets
      '(("from" ".*" "nnimap+mail:Mail/Archive/%Y-%m")))
<======================================================================>

(note that here nnimap+mail is a well working backend).

However, it doesn't work as I expected: when I press "C-c C-x" on the
group from the *Group* buffer I get the following backtrace:

<======================================================================>
Debugger entered--Lisp error: (wrong-type-argument stringp nil)
  string-match(".*" nil)
  nnmail-fancy-expiry-target("INBOX")
  nnmail-expiry-target-group(nnmail-fancy-expiry-target "INBOX")
  nnimap-expiry-target((1 (3 . 6) (8 . 30) (33 . 75) (77 . 106) (108 . 139) (141 . 152) (155 . 159) (161 . 181) (183 . 235) (237 . 246) (248 . 267) (269 . 270) (272 . 330) (332 . 336) (338 . 339) (341 . 352) (354 . 356) (358 . 363) 365 (367 . 570) (572 . 585) (587 . 594) (596 . 625) (627 . 631) (633 . 639) (641 . 667) (669 . 676) (678 . 696) (698 . 725)) "INBOX" "mail")
  nnimap-request-expire-articles((1 3 4 5 6 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 ...) "INBOX" "mail" nil)
  gnus-request-expire-articles((1 3 4 5 6 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 ...) "nnimap+mail:INBOX")
  gnus-group-expire-articles-1("nnimap+mail:INBOX")
  gnus-group-expire-articles(nil)
  call-interactively(gnus-group-expire-articles)
  gnus-topic-expire-articles(nil)
  call-interactively(gnus-topic-expire-articles)
<======================================================================>

while after (setq imap-log t) *imap-log* shows

<======================================================================>
1730 SELECT "INBOX"
* 722 EXISTS
* 0 RECENT
* OK [UIDVALIDITY 1026993069] UID validity status
* OK [UIDNEXT 726] Predicted next UID
* FLAGS (gnus-forward \Answered \Flagged \Deleted \Draft \Seen)
* OK [PERMANENTFLAGS (gnus-forward \* \Answered \Flagged \Deleted \Draft \Seen)] Permanent flags
* OK [UNSEEN 2] first unseen message in /var/mail/salve
1730 OK [READ-WRITE] SELECT completed
1731 EXPUNGE
1731 OK No messages deleted, so no update needed
1732 UID FETCH 1 BODY.PEEK[]
* 1 FETCH (UID 1 BODY[] {4936}
Return-Path: <salve@master.debian.org>

[... an article of that INBOX group elided by yours truly ...]

)
1732 OK UID FETCH completed
1733 UID COPY 1 "Mail/Archive/2002-07"
1733 OK UID COPY completed
1734 EXAMINE "Mail/Archive/2002-07"
* 6 EXISTS
* 0 RECENT
* OK [UIDVALIDITY 1027005732] UID validity status
* OK [UIDNEXT 23] Predicted next UID
* FLAGS (\Answered \Flagged \Deleted \Draft \Seen)
* OK [PERMANENTFLAGS ()] Permanent flags
* OK [UNSEEN 1] first unseen message in /home/salve/Mail/Archive/2002-07
1734 OK [READ-ONLY] EXAMINE completed
1735 UID FETCH * UID
* 6 FETCH (UID 22)
1735 OK UID FETCH completed
1736 SELECT "INBOX"
* 722 EXISTS
* 0 RECENT
* OK [UIDVALIDITY 1026993069] UID validity status
* OK [UIDNEXT 726] Predicted next UID
* FLAGS (gnus-forward \Answered \Flagged \Deleted \Draft \Seen)
* OK [PERMANENTFLAGS (gnus-forward \* \Answered \Flagged \Deleted \Draft \Seen)] Permanent flags
* OK [UNSEEN 2] first unseen message in /var/mail/salve
1736 OK [READ-WRITE] SELECT completed
1737 UID FETCH 3 BODY.PEEK[]
1737 OK UID FETCH completed
<======================================================================>

(note 1737 here above).

I'm afraid I don't know enough of the IMAP protocol to understand it any
further. :-(

Am I doing this thing properly, or is there an other way to reach my
archiving goal?

P.S.  Well, perhaps I should say that I also have a

<======================================================================>
(setq gnus-message-archive-group '((concat "nnimap+mail:Mail/Archive/"
					   (format-time-string
					    "%Y-%m" (current-time)))))
<======================================================================>

which appears to semi-work; i.e., it apparently works as long as I'm not
subscribed to, say, nnimap+mail:Mail/Archive/2002-07, otherwise it fails
to append my outgoing messages there (without barfing: they simply
aren't appended, but I don't get any error message back).

-- 
Salve, | GNU PG (GPG) Key ID: 9396865D
Davide | <http://www.linux.it/~salve/>



             reply	other threads:[~2002-07-19 14:02 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-19 14:02 Davide G. M. Salvetti [this message]
2002-07-19 15:24 ` Nevin Kapur
2002-07-20  8:23   ` nnimap-request-expire-articles bug? (Was Re: nnimap, expiry-target, nnmail-fancy-expiry-targets) Davide G. M. Salvetti
2002-07-20 23:34     ` [PATCH] nnmail-fancy-expiry-target Nevin Kapur
2002-07-21  8:54       ` Kai Großjohann
2002-07-21 14:12         ` Nevin Kapur
2002-07-21 15:56           ` Kai Großjohann
2002-07-26 14:30       ` Davide G.M.Salvetti
2002-07-26 15:43         ` Nevin Kapur
2002-07-26 16:43         ` Simon Josefsson
2002-07-28 16:17           ` Nevin Kapur
2002-07-29 11:46             ` Simon Josefsson
2002-07-29 13:10               ` Nevin Kapur
2002-07-29 11:47     ` nnimap-request-expire-articles bug? (Was Re: nnimap, expiry-target, nnmail-fancy-expiry-targets) Simon Josefsson
2002-07-29 11:58       ` Simon Josefsson
2002-07-19 15:38 ` nnimap, expiry-target, nnmail-fancy-expiry-targets Nevin Kapur

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=87sn2fiznh.fsf@hal.Olympus.INVALID \
    --to=salve@debian.org \
    /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).