From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/44813 Path: main.gmane.org!not-for-mail From: Rory Molinari Newsgroups: gmane.emacs.gnus.general Subject: Re: nnmail-cache-insert fixes Date: Mon, 13 May 2002 13:47:19 -0700 Sender: owner-ding@hpc.uh.edu Message-ID: References: <1526678368.1021321742728.JavaMail.root@monkey> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1021323165 18382 127.0.0.1 (13 May 2002 20:52:45 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 13 May 2002 20:52:45 +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 177MoH-0004mN-00 for ; Mon, 13 May 2002 22:52:45 +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 177Mmb-0003vQ-00; Mon, 13 May 2002 15:51:01 -0500 Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Mon, 13 May 2002 15:51:20 -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 PAA02854 for ; Mon, 13 May 2002 15:51:07 -0500 (CDT) Original-Received: (qmail 24660 invoked by alias); 13 May 2002 20:50:45 -0000 Original-Received: (qmail 24655 invoked from network); 13 May 2002 20:50:44 -0000 Original-Received: from unknown (HELO corp-relay) (fwuser@209.76.153.218) by gnus.org with SMTP; 13 May 2002 20:50:44 -0000 Original-To: ding@gnus.org In-Reply-To: <1526678368.1021321742728.JavaMail.root@monkey> ("Josh Huber huber@alum.wpi.edu [quokka/ding gnus mailing list]"'s message of "Mon, 13 May 2002 16:29:12 -0400") Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:44813 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:44813 "Josh Huber huber@alum.wpi.edu [quokka/ding gnus mailing list]" writes: q> This is with regards to the nnmail-cache-insert cleanup Kai and I > talked about a few days ago. > > This is a first attempt, and since I'm touching a bunch of backends > (or was that back ends? ;) I'd like to make sure everyone gets to see > what's going on. > > Everywhere nnmail-cache-insert was called it seems as though the group > is available (I previously has thought otherwise): > > $> grep nnmail-cache-insert *.el | grep -v defun > nnbabyl.el: (nnmail-cache-insert (nnmail-fetch-field "message-id") group)) > nnbabyl.el: (nnmail-cache-insert (nnmail-fetch-field "message-id") group)) > nndiary.el: (nnmail-cache-insert (nnmail-fetch-field "message-id") group)) > nnfolder.el: (nnmail-cache-insert (nnmail-fetch-field "message-id") group)) > nnimap.el: (nnmail-cache-insert (nnmail-fetch-field > nnimap.el: (nnmail-cache-insert (nnmail-fetch-field "message-id") > nnmail.el: (nnmail-cache-insert message-id (caar group-art))) > nnmbox.el: (nnmail-cache-insert (nnmail-fetch-field "message-id") group)) > nnmh.el: (nnmail-cache-insert (nnmail-fetch-field "message-id") group)) > nnml.el: (nnmail-cache-insert (nnmail-fetch-field "message-id") group)) > > How does the following diff look? > > Index: lisp/nnbabyl.el > =================================================================== > RCS file: /usr/local/cvsroot/gnus/lisp/nnbabyl.el,v > retrieving revision 6.8 > diff -u -b -r6.8 nnbabyl.el > --- lisp/nnbabyl.el 2002/02/20 00:15:32 6.8 > +++ lisp/nnbabyl.el 2002/05/13 20:36:01 > @@ -349,7 +349,7 @@ > (while (re-search-backward "^X-Gnus-Newsgroup: " beg t) > (delete-region (point) (progn (forward-line 1) (point))))) > (when nnmail-cache-accepted-message-ids > - (nnmail-cache-insert (nnmail-fetch-field "message-id"))) > + (nnmail-cache-insert (nnmail-fetch-field "message-id") group)) > (setq result > (if (stringp group) > (list (cons group (nnbabyl-active-number group))) > @@ -365,7 +365,7 @@ > (insert-buffer-substring buf) > (when last > (when nnmail-cache-accepted-message-ids > - (nnmail-cache-insert (nnmail-fetch-field "message-id"))) > + (nnmail-cache-insert (nnmail-fetch-field "message-id") group)) > (save-buffer) > (nnmail-save-active nnbabyl-group-alist nnbabyl-active-file)) > result)))) > Index: lisp/nndiary.el > =================================================================== > RCS file: /usr/local/cvsroot/gnus/lisp/nndiary.el,v > retrieving revision 1.5 > diff -u -b -r1.5 nndiary.el > --- lisp/nndiary.el 2001/11/06 15:06:21 1.5 > +++ lisp/nndiary.el 2002/05/13 20:36:01 > @@ -759,7 +759,7 @@ > (when (nndiary-schedule) > (let (result) > (when nnmail-cache-accepted-message-ids > - (nnmail-cache-insert (nnmail-fetch-field "message-id"))) > + (nnmail-cache-insert (nnmail-fetch-field "message-id") group)) > (if (stringp group) > (and > (nnmail-activate 'nndiary) > Index: lisp/nnfolder.el > =================================================================== > RCS file: /usr/local/cvsroot/gnus/lisp/nnfolder.el,v > retrieving revision 6.40 > diff -u -b -r6.40 nnfolder.el > --- lisp/nnfolder.el 2002/05/01 00:26:33 6.40 > +++ lisp/nnfolder.el 2002/05/13 20:36:01 > @@ -489,7 +489,7 @@ > (while (re-search-backward (concat "^" nnfolder-article-marker) nil t) > (delete-region (point) (progn (forward-line 1) (point)))) > (when nnmail-cache-accepted-message-ids > - (nnmail-cache-insert (nnmail-fetch-field "message-id"))) > + (nnmail-cache-insert (nnmail-fetch-field "message-id") group)) > (setq result (if (stringp group) > (list (cons group (nnfolder-active-number group))) > (setq art-group > Index: lisp/nnimap.el > =================================================================== > RCS file: /usr/local/cvsroot/gnus/lisp/nnimap.el,v > retrieving revision 6.32 > diff -u -b -r6.32 nnimap.el > --- lisp/nnimap.el 2002/05/01 20:25:59 6.32 > +++ lisp/nnimap.el 2002/05/13 20:36:02 > @@ -1381,7 +1381,8 @@ > (while (search-forward "\n" nil t) > (replace-match "\r\n")) > (when nnmail-cache-accepted-message-ids > - (nnmail-cache-insert (nnmail-fetch-field "message-id")))) > + (nnmail-cache-insert (nnmail-fetch-field "message-id") > + group))) > (when (and last nnmail-cache-accepted-message-ids) > (nnmail-cache-close)) > ;; this 'or' is for Cyrus server bug > Index: lisp/nnmail.el > =================================================================== > RCS file: /usr/local/cvsroot/gnus/lisp/nnmail.el,v > retrieving revision 6.40 > diff -u -b -r6.40 nnmail.el > --- lisp/nnmail.el 2002/05/07 15:32:17 6.40 > +++ lisp/nnmail.el 2002/05/13 20:36:02 > @@ -1466,27 +1466,28 @@ > ;; which has an argument GROUP-ART which is a list of pairs, and > ;; the car of a pair is a group name. Should we check that the > ;; length of the list is equal to 1? -- kai > - (let ((g nil)) > - (cond (grp > - (setq g grp)) > - ((and (boundp 'group-art) group-art (listp group-art)) > - (setq g (caar group-art))) > - ((and (boundp 'group) group) > - (setq g group)) > - ((and (boundp 'group-art-list) group-art-list > - (listp group-art-list)) > - (setq g (caar group-art-list))) > - (t (setq g ""))) > +; (let ((g nil)) > +; (cond (grp > +; (setq g grp)) > +; ((and (boundp 'group-art) group-art (listp group-art)) > +; (setq g (caar group-art))) > +; ((and (boundp 'group) group) > +; (setq g group)) > +; ((and (boundp 'group-art-list) group-art-list > +; (listp group-art-list)) > +; (setq g (caar group-art-list))) > +; (t (setq g ""))) > (unless (gnus-buffer-live-p nnmail-cache-buffer) > (nnmail-cache-open)) > (save-excursion > (set-buffer nnmail-cache-buffer) > (goto-char (point-max)) > - (if (and g (not (string= "" g)) > + (if (and grp (not (string= "" grp)) > (gnus-methods-equal-p gnus-command-method > (nnmail-cache-primary-mail-backend))) > - (insert id "\t" g "\n") > - (insert id "\n")))))) > + (insert id "\t" grp "\n") > + (insert id "\n"))))) > +; ) > > (defun nnmail-cache-primary-mail-backend () > (let ((be-list (cons gnus-select-method gnus-secondary-select-methods)) > @@ -1588,7 +1589,7 @@ > ((not duplication) > (funcall func (setq group-art > (nreverse (nnmail-article-group artnum-func)))) > - (nnmail-cache-insert message-id)) > + (nnmail-cache-insert message-id (caar group-art))) > ((eq action 'delete) > (setq group-art nil)) > ((eq action 'warn) > Index: lisp/nnmbox.el > =================================================================== > RCS file: /usr/local/cvsroot/gnus/lisp/nnmbox.el,v > retrieving revision 6.13 > diff -u -b -r6.13 nnmbox.el > --- lisp/nnmbox.el 2002/04/12 11:51:01 6.13 > +++ lisp/nnmbox.el 2002/05/13 20:36:02 > @@ -332,7 +332,7 @@ > (while (re-search-backward "^X-Gnus-Newsgroup: " nil t) > (delete-region (point) (progn (forward-line 1) (point)))) > (when nnmail-cache-accepted-message-ids > - (nnmail-cache-insert (nnmail-fetch-field "message-id"))) > + (nnmail-cache-insert (nnmail-fetch-field "message-id") group)) > (setq result (if (stringp group) > (list (cons group (nnmbox-active-number group))) > (nnmail-article-group 'nnmbox-active-number))) > Index: lisp/nnmh.el > =================================================================== > RCS file: /usr/local/cvsroot/gnus/lisp/nnmh.el,v > retrieving revision 6.8 > diff -u -b -r6.8 nnmh.el > --- lisp/nnmh.el 2002/02/20 00:15:32 6.8 > +++ lisp/nnmh.el 2002/05/13 20:36:02 > @@ -316,7 +316,7 @@ > (nnmh-possibly-change-directory group server) > (nnmail-check-syntax) > (when nnmail-cache-accepted-message-ids > - (nnmail-cache-insert (nnmail-fetch-field "message-id"))) > + (nnmail-cache-insert (nnmail-fetch-field "message-id") group)) > (nnheader-init-server-buffer) > (prog1 > (if (stringp group) > > -- > Josh Huber