From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/61552 Path: news.gmane.org!not-for-mail From: Gregory Novak Newsgroups: gmane.emacs.gnus.general Subject: Re: Resent message Date: Wed, 14 Dec 2005 13:37:57 -0800 Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1134596571 17644 80.91.229.2 (14 Dec 2005 21:42:51 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 14 Dec 2005 21:42:51 +0000 (UTC) Original-X-From: ding-owner+m10084@lists.math.uh.edu Wed Dec 14 22:42:43 2005 Return-path: Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EmeN2-0000G2-He for ding-account@gmane.org; Wed, 14 Dec 2005 22:41:08 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu ident=lists) by malifon.math.uh.edu with smtp (Exim 3.20 #1) id 1EmeMt-00078Y-00; Wed, 14 Dec 2005 15:40:59 -0600 Original-Received: from nas02.math.uh.edu ([129.7.128.40]) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 1EmeK7-00078T-00 for ding@lists.math.uh.edu; Wed, 14 Dec 2005 15:38:07 -0600 Original-Received: from quimby.gnus.org ([80.91.224.244]) by nas02.math.uh.edu with esmtp (Exim 4.52) id 1EmeK0-0004FA-TS for ding@lists.math.uh.edu; Wed, 14 Dec 2005 15:38:07 -0600 Original-Received: from santo.ucolick.org ([128.114.23.204] helo=smtp.ucolick.org) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1EmeJz-00057O-00 for ; Wed, 14 Dec 2005 22:38:00 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by smtp.ucolick.org (Postfix) with ESMTP id E7D475D714 for ; Wed, 14 Dec 2005 13:37:58 -0800 (PST) Original-Received: from euterpe.local (69-12-135-116.dsl.static.sonic.net [69.12.135.116]) by smtp.ucolick.org (Postfix) with ESMTP id 3C05B11406 for ; Wed, 14 Dec 2005 13:37:58 -0800 (PST) Original-To: gnus-devel In-Reply-To: (Gregory Novak's message of "Wed, 14 Dec 2005 13:20:39 -0800") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (darwin) X-Spam-Score: -2.6 (--) Precedence: bulk Original-Sender: ding-owner@lists.math.uh.edu Xref: news.gmane.org gmane.emacs.gnus.general:61552 Archived-At: >> I am using Gnus to read e-mail via the nnimap backend. When I mark an >> email as expirable in my INBOX and then quit the group, it gets filed >> into a folder with the name recd-mail-2005-12 (for example; code >> attached below). > > There were no code attached. How do you expire it into > recd-mail-2005-12? Ah, yes, sorry. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; Recd mail archiving (setq gnus-auto-expirable-newsgroups "LIST" nnmail-expiry-target 'gsn/gnus-expiry-target nnmail-expiry-wait-function 'gsn/nnmail-expiry-wait-function) (defun gsn/gnus-archive-p (group) "Given an unadorned string group name, decide if the group should be archived into recd-mail" (let ((case-fold-search nil)) (string-match "\\(^INBOX$\\|^INBOX.IN\\)" group))) (defun gsn/nnmail-expiry-wait-function (group) "Expire recd-mail archived groups immediately; Delete auto-expirable groups (list mail) after 14 days; Never delete anything else." (cond ((gsn/gnus-archive-p group) 'immediate) ((let ((case-fold-search nil)) ; Might try gnus-auto-expirable-group-p (string-match gnus-auto-expirable-newsgroups group)) 14) (t 'never))) (defun gsn/gnus-expiry-target (group) "if the mail is to be archived into recd-mail, return a folder in which to archive the message by calling gsn/gnus-article-get-expiry-target. If not, delete the message. Lifted from http://www.emacswiki.org/cgi-bin/wiki/ArchivingMail" (if (gsn/gnus-archive-p group) (gsn/gnus-article-get-expiry-target) 'delete)) (defun gsn/gnus-article-get-expiry-target () "Extracts the date from the current article and converts it to a folder name to which to archive the message of the form nnimap+lick:INBOX.recd-mail-YYYY-MM. Lifted from http://www.emacswiki.org/cgi-bin/wiki/ArchivingMail" (save-window-excursion (when (string= major-mode "gnus-summary-mode") (gnus-summary-select-article-buffer)) (goto-char (point-min)) (concat "nnimap+lick:INBOX.recd-mail-" (format-time-string "%Y-%m" (gnus-date-get-time (message-fetch-field "date")))))) > Perhaps (setq imap-log t) will help. Then you should be able to see > if Gnus is asking the server to remove the "gnus-expire" flag on the > article in question, and whether it later somehow end up adding that > flag again to the article when it has moved to recd-mail-2005-12. Ok, this helps a lot. I see that the server is doing something with the gnus-expire flag, so evidently the flags are stored on the imap server. When I have a moment I'll look in detail at exactly what's going on. The problem was ameliorated for me when I figured out how to prevent Gnus from deleting stuff from my "archive" groups where recd mail and other stuff is stored. But maybe this weekend I'll have a look at what's going on and try to report back. Thanks, Greg