From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/45742 Path: main.gmane.org!not-for-mail From: "Davide G. M. Salvetti" Newsgroups: gmane.emacs.gnus.general Subject: nnimap-request-expire-articles bug? (Was Re: nnimap, expiry-target, nnmail-fancy-expiry-targets) Date: Sat, 20 Jul 2002 10:23:21 +0200 Organization: Quis ut Deus? Sender: owner-ding@hpc.uh.edu Message-ID: <87eldyajuu.fsf@hal.Olympus.INVALID> References: <87sn2fiznh.fsf@hal.Olympus.INVALID> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1027153300 14275 127.0.0.1 (20 Jul 2002 08:21:40 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sat, 20 Jul 2002 08:21:40 +0000 (UTC) Return-path: Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 17VpUg-0003i8-00 for ; Sat, 20 Jul 2002 10:21:39 +0200 Original-Received: from sina.hpc.uh.edu ([129.7.128.10] ident=lists) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 17VpSy-0006dm-00; Sat, 20 Jul 2002 03:19:52 -0500 Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Sat, 20 Jul 2002 03:20:16 -0500 (CDT) Original-Received: from sclp3.sclp.com (qmailr@sclp3.sclp.com [209.196.61.66]) by sina.hpc.uh.edu (8.9.3/8.9.3) with SMTP id DAA15142 for ; Sat, 20 Jul 2002 03:20:02 -0500 (CDT) Original-Received: (qmail 3719 invoked by alias); 20 Jul 2002 08:19:26 -0000 Original-Received: (qmail 3711 invoked from network); 20 Jul 2002 08:19:25 -0000 Original-Received: from quimby.gnus.org (80.91.224.244) by gnus.org with SMTP; 20 Jul 2002 08:19:25 -0000 Original-Received: from news by quimby.gnus.org with local (Exim 3.12 #1 (Debian)) id 17Vpf8-00069U-00 for ; Sat, 20 Jul 2002 10:32:26 +0200 Original-To: ding@gnus.org Original-Path: not-for-mail Original-Newsgroups: gnus.ding Original-Lines: 93 Original-NNTP-Posting-Host: ppp-111-29.27-151.libero.it Original-X-Trace: quimby.gnus.org 1027153946 23521 151.27.29.111 (20 Jul 2002 08:32:26 GMT) Original-X-Complaints-To: usenet@quimby.gnus.org Original-NNTP-Posting-Date: 20 Jul 2002 08:32:26 GMT X-Attribution: DGMS X-GPG-Fingerprint: D3B2 A3F5 E9EB BDE6 A245 AA4A 212B 306C 9396 865D X-Face: &6g,d%3hP0[qul^Z;FuwvIxNxPy2:}9K`7D?&sDX@xTwx7Z\S\AK\jI)J$yL:J>70*[c!k* [qo4Zx')Q_zPtl]25VG[X#6xMVp_1K!t- U{izN"hVM!$1`P\v~sRS:)^t_{py+"YcZ|2^z=AUz4"ZJNrtP@;'8dyarKA7)OPjihAGsMb User-Agent: Gnus/5.090007 (Oort Gnus v0.07) Emacs/21.2 (i386-debian-linux-gnu) Cancel-Lock: sha1:f/l20UksgvxvUZgbxVYsP0329U8= Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:45742 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:45742 [NB: it seems that messages sent to ding@gnus.org disappear (it happened thrice to me). Posting through news.gnus.org appears to work, though. I've changed the Subject line, due to the fact that I suspect nnimap-request-expire-articles being the cause of this problem. More about it near the end of this message.] >>>>> "NK" == Nevin Kapur writes: NK> "Davide G. M. Salvetti" writes: >> Debugger entered--Lisp error: (wrong-type-argument stringp nil) >> string-match(".*" nil) NK> ^^^ NK> Bizarre. This implies that one of the articles that you were trying to NK> expire did not have a From header. Is that true? No, at least AFAIK. NK> [...] >> 1737 UID FETCH 3 BODY.PEEK[] >> 1737 OK UID FETCH completed >> <======================================================================> >> >> (note 1737 here above). NK> Unfortunately, me neither. When I wrote the fancy expiry stuff, I NK> relied on message-fetch-field to find the header to match against. What I think is happening here is that the IMAP request #1737 doesn't get the reply Gnus is expecting. Gnus expect an article (cfr. IMAP request #1732 in my <87sn2fiznh.fsf@hal.Olympus.INVALID>), but it gets nothing at all (I guess if an article was to be sent there, it should have been sandwiched in the middle of the #1737 request and the #1737 answer). NK> If it's true that the message in question does not have a From NK> header, I think this condition shouldn't happen, as a From field in the header is necessary indeed (AFAIK, I've not re-checked any RFC). NK> then I guess we should decide on the right behavior. Certainly an NK> error is not the right behavior! NK> If the message does have a from header, could you run NK> M-: (message-fetch-field "from") NK> on it and see if you get something non-nil? While trying to follow your suggestion, I think I've tracked down the bug, at least a bit. Since I needed to know what message corresponded to UID 3, I browsed the INBOX folder literally, and found that the UID is recorded in a special X-UID field (on the IMAP server). Well, the fact is that no message corresponds to UID 3. I don't know enough of the IMAP protocol to say if giving a completely empty message in response to a request for an not existing message is correct. Regardless of it, the real question turns out to be: why is Gnus requesting a non existing message? So I found that gnus-request-expire-articles is passed a list of expirable articles which possibly contains no longer existent articles: since this is a totally-expirable group, it is passed (gnus-list-of-read-articles group), by gnus-group-expire-articles-1: according to the source this means active articles minus unread articles minus dormant articles minus tick marked; the thesis follow since active articles include deleted articles in between. When nnimap-request-expire-articles receives this list, it doesn't subtract non existing articles (contrary to what, say, nnml-request-expire-articles do), and does the whole list. Since we have an expiry-target in this group, nnmail-expiry-target-group gets called in the (possibly empty because no such article exists) buffer which results from nnimap-request-article, for each (possibly non existent) article in the list. In our situation nnmail-expiry-target-group calls nnmail-fancy-expiry-target, which barfs because it can't find any "From", "To", "Date", ... in the sadly empty buffer which resulted from the non existent article request. I think that nnimap-request-expire-articles should be fixed to subtract non existing articles before doing the list. I'd fix it, but at this moment I don't know how to open the right holes (corresponding to deleted articles) in the list. -- Salve, | GNU PG (GPG) Key ID: 9396865D Davide |