From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/48082 Path: main.gmane.org!not-for-mail From: Ted Zlatanov Newsgroups: gmane.emacs.gnus.general Subject: Re: Possible bug in nnml code Date: Fri, 06 Dec 2002 16:23:19 -0500 Organization: =?koi8-r?q?=F4=C5=CF=C4=CF=D2=20=FA=CC=C1=D4=C1=CE=CF=D7?= @ Cienfuegos Sender: owner-ding@hpc.uh.edu Message-ID: <4nvg269708.fsf@brainy.bwh.harvard.edu> References: <84bs3zb787.fsf@lucy.cs.uni-dortmund.de> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1039209970 21171 80.91.224.249 (6 Dec 2002 21:26:10 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Fri, 6 Dec 2002 21:26:10 +0000 (UTC) Cc: ding@gnus.org Return-path: Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18KPz3-0005Uu-00 for ; Fri, 06 Dec 2002 22:26:05 +0100 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 18KPxO-0007cp-00; Fri, 06 Dec 2002 15:24:22 -0600 Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Fri, 06 Dec 2002 15:25:11 -0600 (CST) 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 PAA23237 for ; Fri, 6 Dec 2002 15:24:56 -0600 (CST) Original-Received: (qmail 23781 invoked by alias); 6 Dec 2002 21:23:47 -0000 Original-Received: (qmail 23776 invoked from network); 6 Dec 2002 21:23:47 -0000 Original-Received: from clifford.bwh.harvard.edu (134.174.9.41) by gnus.org with SMTP; 6 Dec 2002 21:23:47 -0000 Original-Received: from brainy.bwh.harvard.edu (brainy [134.174.9.237]) by clifford.bwh.harvard.edu (8.10.2+Sun/8.11.0) with ESMTP id gB6LNJR19199; Fri, 6 Dec 2002 16:23:19 -0500 (EST) Original-Received: (from tzz@localhost) by brainy.bwh.harvard.edu (8.10.2+Sun/8.11.0) id gB6LNJ919914; Fri, 6 Dec 2002 16:23:19 -0500 (EST) Original-To: Jan Rychter X-Face: bd.DQ~'29fIs`T_%O%C\g%6jW)yi[zuz6;d4V0`@y-~$#3P_Ng{@m+e4o<4P'#(_GJQ%TT= D}[Ep*b!\e,fBZ'j_+#"Ps?s2!4H2-Y"sx" Mail-Followup-To: Jan Rychter , ding@gnus.org In-Reply-To: (Jan Rychter's message of "Fri, 06 Dec 2002 21:49:49 +0100") User-Agent: Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.2 (sparc-sun-solaris2.8) Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:48082 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:48082 On Fri, 06 Dec 2002, jan@rychter.com wrote: > The general idea is to: > > 1. Rewrite the nnmail-cache-* functions somewhat: > > -- they should be able to operate on multiple groups per article > (to support crossposts), > > -- one should be able to implement nnmail-cache differently (in my > case, I am working on an SQL-based implementation and it seems > to work pretty well so far). > > I am not sure if that calls for taking them out of nnmail.el and > calling them something else. The name 'cache' is misleading. That sort of goes along with the gnus-article-cache.el idea I was talking about, except you don't like the name 'cache.' I don't care about the name one way or the other, as long as the code does what I want :) I think for crossposts you have to pick just one group out of the bunch (the first one?) and stick with it. Otherwise things will get complicated very quickly. The SQL implementation is OK if it's modular, but I think 99% of the Gnus users will prefer a plaintext-file-based solution. It's much easier to maintain and debug, and will probably run faster once the cache is loaded in memory. So maybe we should just do a plaintext cache file for now, and add SQL later. > 2. Provide callback functions like nnmail-cache-notify-article-moved > and nnmail-cache-notify-group-renamed. The latter is redundant in > case of nnml, as nnml seems to know exactly which articles from > which group to which group it wants to move -- but it might be > necessary for other backends and it might allow for some > interesting optimizations. > > The backends would be required to call those functions when > moving articles between groups or when renaming groups. > > Currently when you move articles between nnml groups, > nnmail-cache gets updated by calling nnmail-cache-insert from > nnml-request-accept-article, so the > nnmail-cache-notify-article-moved function seems redundant. But > if we want to support multiple groups per message it becomes > important -- you need to know exactly from which group to which > group a message is moved to update the database. I think there are appropriate hooks we can use, so iff users load gnus-article-cache.el will those callback functions will be invoked. Otherwise, no extra work should be done. For nnmail.el those callbacks are needed so it will load gnus-article-cache.el, but for nntp.el for instance they don't make sense because you can't move an article into nntp or rename an nntp group. Ted