Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
* nnmail-fancy-expiry-target problems
@ 2007-10-17 17:36 Austin Frank
  2007-10-17 18:52 ` Reiner Steib
  0 siblings, 1 reply; 6+ messages in thread
From: Austin Frank @ 2007-10-17 17:36 UTC (permalink / raw)
  To: info-gnus-english


[-- Attachment #1.1: Type: text/plain, Size: 2978 bytes --]

Hello!

I'm trying to set up an archiving system for my mail.  I'm having some
problems with expiry, and am hoping you all can help.

I have a number of mailboxes on a local imap server that I connect to
with nnimap.  The manual suggests using nnfolder for archives, so I'd
like to set up mail from my nnimap server to expire to an nnfolder
server at ~/Mail_Archive.

Even though all read mails are marked as expired as soon as I finish
them, I've never seen any mail moved to ~/Mail_Archive.  Trying to
explicitly expire articles in a group with C-c C-x seems to apply the
expiry flag to every appropriate mail in the group, but nothing gets
moved anywhere.  The output in the message buffer is the following:

    Expiring articles in nnimap:mail.misc...
    Expiring articles in nnimap:mail.misc
    gnus-agent-expire: Loading overview... Done
    gnus-agent-expire: Sorting entries... Done
    gnus-agent-expire: Merging entries... Done
    Expiry recovered 7 NOV entries, deleted 0 files, and freed 2.184570 KB.

Finally, sometimes when I quit a group I get the following message:

    Expiring articles...
    nnmail-fancy-expiry-target: Wrong type argument: stringp, nil

I'm using GNU Emacs 22.1.1 and No Gnus v0.7.  I've included a sanitized
version of the relevant (I think) configuration options below.  Please
let me know if there is more information I can provide.

Thanks in advance for any help.

/au

    ;; keep a copy of all outgoing mail.  Send it through the INBOX
    ;; since I've got filters set up to get it to the right places
    (setq gnus-message-archive-method
          '(nnimap ""
    	       (nnimap-server-address "localhost")))
    (setq
     gnus-message-archive-group "INBOX"
     gnus-gcc-mark-as-read t )

    ;; expiry settings
    (remove-hook 'gnus-mark-article-hook
                 'gnus-summary-mark-read-and-unread-as-read)
    (add-hook 'gnus-mark-article-hook
              'gnus-summary-mark-unread-as-read)
    
    (setq nnmail-expiry-wait-function          
          (lambda (group)
            (cond ((string= group "mail.personal")
                   90)
                  ((string= group "mail.academic")
                   90)
                  (t
                   6))))
    
    (setq nnfolder-directory "~/Mail_Archive"
          nnfolder-get-new-mail nil)
    
    (setq nnmail-expiry-target 'nnmail-fancy-expiry-target
          nnmail-fancy-expiry-targets
          '((to-from "group1" "nnfolder:group1")
            (to-from "boss1" "nnfolder:boss1")
            (to-from "boss2" "nnfolder:boss2")
            (to-from "my-private-address" "nnfolder:personal.%Y")
            (to-from ".*\\.edu" "nnfolder:academic.%Y.%b")
            ("from"  "my-other-addresses" "nnfolder:sent.%Y.%b")
            ("from" ".*" "nnfolder:archive-%Y.%b")))

-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc

[-- Attachment #1.2: Type: application/pgp-signature, Size: 185 bytes --]

[-- Attachment #2: Type: text/plain, Size: 161 bytes --]

_______________________________________________
info-gnus-english mailing list
info-gnus-english@gnu.org
http://lists.gnu.org/mailman/listinfo/info-gnus-english

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

* Re: nnmail-fancy-expiry-target problems
  2007-10-17 17:36 nnmail-fancy-expiry-target problems Austin Frank
@ 2007-10-17 18:52 ` Reiner Steib
  2007-10-17 19:52   ` Austin Frank
       [not found]   ` <mailman.2213.1192650770.18990.info-gnus-english@gnu.org>
  0 siblings, 2 replies; 6+ messages in thread
From: Reiner Steib @ 2007-10-17 18:52 UTC (permalink / raw)
  To: info-gnus-english

On Wed, Oct 17 2007, Austin Frank wrote:

>     Expiring articles...
>     nnmail-fancy-expiry-target: Wrong type argument: stringp, nil
[...]
>     (setq nnmail-expiry-target 'nnmail-fancy-expiry-target
>           nnmail-fancy-expiry-targets
>           '((to-from "group1" "nnfolder:group1")
[...]

Please do `M-x set-variable RET debug-on-error RET t RET', reproduce
the bug and send the backtrace.

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

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

* Re: nnmail-fancy-expiry-target problems
  2007-10-17 18:52 ` Reiner Steib
@ 2007-10-17 19:52   ` Austin Frank
       [not found]   ` <mailman.2213.1192650770.18990.info-gnus-english@gnu.org>
  1 sibling, 0 replies; 6+ messages in thread
From: Austin Frank @ 2007-10-17 19:52 UTC (permalink / raw)
  To: info-gnus-english


[-- Attachment #1.1: Type: text/plain, Size: 1740 bytes --]

On Wed, Oct 17 2007, Reiner Steib wrote:

> Please do `M-x set-variable RET debug-on-error RET t RET', reproduce
> the bug and send the backtrace.

Reiner--

Thanks for the prompt reply.

I changed the name and email address that threw the error, but I
preserved case and formatting of the address.  If the letter-for-letter
original address is important, I'd rather send it to you personally than
post it to the list.

Thanks,
/au

Debugger entered--Lisp error: (wrong-type-argument stringp nil)
  string-match(nil "\"John Q. Public\" <jqpublic@MIT.EDU>")
  nnmail-fancy-expiry-target("mail.academic")
  nnmail-expiry-target-group(nnmail-fancy-expiry-target "mail.academic")
  nnimap-expiry-target((9733 9734 9737 9738) "mail.academic" "")
  nnimap-request-expire-articles((9733 9734 9737 9738 9740 9741 9742 9743 9745 9746 9747 9749 9750 9751 9752 9753 9754 9756 9757 9758 9759 9760 9761 9764 9765 9766 9767 9770 9771 9773 9774 9776 9777 9781 9782 9786 9787 9788 9790 9792 9793 9794 9795 9796 9797 9798 9799 9800 9801 9802 ...) "mail.academic" "" nil)
  gnus-request-expire-articles((9733 9734 9737 9738 9740 9741 9742 9743 9745 9746 9747 9749 9750 9751 9752 9753 9754 9756 9757 9758 9759 9760 9761 9764 9765 9766 9767 9770 9771 9773 9774 9776 9777 9781 9782 9786 9787 9788 9790 9792 9793 9794 9795 9796 9797 9798 9799 9800 9801 9802 ...) "nnimap:mail.academic")
  gnus-summary-expire-articles()
  run-hooks(gnus-summary-prepare-exit-hook)
  apply(run-hooks gnus-summary-prepare-exit-hook)
  gnus-run-hooks(gnus-summary-prepare-exit-hook)
  gnus-summary-exit()
  call-interactively(gnus-summary-exit)
  
  
-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc

[-- Attachment #1.2: Type: application/pgp-signature, Size: 185 bytes --]

[-- Attachment #2: Type: text/plain, Size: 161 bytes --]

_______________________________________________
info-gnus-english mailing list
info-gnus-english@gnu.org
http://lists.gnu.org/mailman/listinfo/info-gnus-english

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

* Re: nnmail-fancy-expiry-target problems
       [not found]   ` <mailman.2213.1192650770.18990.info-gnus-english@gnu.org>
@ 2007-10-18  5:51     ` Katsumi Yamaoka
  2007-10-18 22:30       ` Austin Frank
       [not found]       ` <mailman.2270.1192746661.18990.info-gnus-english@gnu.org>
  0 siblings, 2 replies; 6+ messages in thread
From: Katsumi Yamaoka @ 2007-10-18  5:51 UTC (permalink / raw)
  To: info-gnus-english

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

>>>>> Austin Frank wrote:

> Debugger entered--Lisp error: (wrong-type-argument stringp nil)
>   string-match(nil "\"John Q. Public\" <jqpublic@MIT.EDU>")
>   nnmail-fancy-expiry-target("mail.academic")

You may possibly be the first person who tried using `to-from'
and `nnmail-fancy-expiry-target' ever since it was introduced in
December, 2001.  IIUC, this is a bug that arises in the case
where `message-dont-reply-to-names' is nil, though it is likely
to default to nil in most Gnus users.  Could you try this patch?


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

--- nnmail.el~	2007-10-04 21:53:35 +0000
+++ nnmail.el	2007-10-18 05:49:39 +0000
@@ -1910,8 +1910,10 @@
        ;; To or From header
        ((and (equal header 'to-from)
 	     (or (string-match (cadr regexp-target-pair) from)
-		 (and (string-match (message-dont-reply-to-names) from)
-		      (string-match (cadr regexp-target-pair) to))))
+		 (and (string-match (cadr regexp-target-pair) to)
+		      (let ((rmail-dont-reply-to-names
+			     (message-dont-reply-to-names)))
+			(equal (rmail-dont-reply-to from) "")))))
 	(setq target (format-time-string (caddr regexp-target-pair) date)))
        ((and (not (equal header 'to-from))
 	     (string-match (cadr regexp-target-pair)

[-- Attachment #3: Type: text/plain, Size: 161 bytes --]

_______________________________________________
info-gnus-english mailing list
info-gnus-english@gnu.org
http://lists.gnu.org/mailman/listinfo/info-gnus-english

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

* Re: nnmail-fancy-expiry-target problems
  2007-10-18  5:51     ` Katsumi Yamaoka
@ 2007-10-18 22:30       ` Austin Frank
       [not found]       ` <mailman.2270.1192746661.18990.info-gnus-english@gnu.org>
  1 sibling, 0 replies; 6+ messages in thread
From: Austin Frank @ 2007-10-18 22:30 UTC (permalink / raw)
  To: info-gnus-english


[-- Attachment #1.1: Type: text/plain, Size: 987 bytes --]

On Thu, Oct 18 2007, Katsumi Yamaoka wrote:

>>>>>> Austin Frank wrote:
>
>> Debugger entered--Lisp error: (wrong-type-argument stringp nil)
>>   string-match(nil "\"John Q. Public\" <jqpublic@MIT.EDU>")
>>   nnmail-fancy-expiry-target("mail.academic")
>
> You may possibly be the first person who tried using `to-from'
> and `nnmail-fancy-expiry-target' ever since it was introduced in
> December, 2001.  IIUC, this is a bug that arises in the case
> where `message-dont-reply-to-names' is nil, though it is likely
> to default to nil in most Gnus users.  Could you try this patch?

Katsumi--

Thanks for the patch.  I no longer get the error when trying to exit a
group.  This is a great improvement over the previous situation.

I'm still having problems with expiry, but will detail those in a new
thread now that this bug seems to be resolved.

Thanks,
/au

-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc

[-- Attachment #1.2: Type: application/pgp-signature, Size: 185 bytes --]

[-- Attachment #2: Type: text/plain, Size: 161 bytes --]

_______________________________________________
info-gnus-english mailing list
info-gnus-english@gnu.org
http://lists.gnu.org/mailman/listinfo/info-gnus-english

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

* Re: nnmail-fancy-expiry-target problems
       [not found]       ` <mailman.2270.1192746661.18990.info-gnus-english@gnu.org>
@ 2007-10-18 23:16         ` Katsumi Yamaoka
  0 siblings, 0 replies; 6+ messages in thread
From: Katsumi Yamaoka @ 2007-10-18 23:16 UTC (permalink / raw)
  To: info-gnus-english

>>>>> Austin Frank wrote:
> On Thu, Oct 18 2007, Katsumi Yamaoka wrote:

>> Could you try this patch?

> Thanks for the patch.  I no longer get the error when trying to exit a
> group.  This is a great improvement over the previous situation.

Thanks for verifying the patch.  I've installed it in the Gnus
CVS repository (trunk + v5-10 branch).

> I'm still having problems with expiry, but will detail those in a new
> thread now that this bug seems to be resolved.

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

end of thread, other threads:[~2007-10-18 23:16 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-10-17 17:36 nnmail-fancy-expiry-target problems Austin Frank
2007-10-17 18:52 ` Reiner Steib
2007-10-17 19:52   ` Austin Frank
     [not found]   ` <mailman.2213.1192650770.18990.info-gnus-english@gnu.org>
2007-10-18  5:51     ` Katsumi Yamaoka
2007-10-18 22:30       ` Austin Frank
     [not found]       ` <mailman.2270.1192746661.18990.info-gnus-english@gnu.org>
2007-10-18 23:16         ` Katsumi Yamaoka

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