From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/48091 Path: main.gmane.org!not-for-mail From: kai.grossjohann@uni-duisburg.de (Kai =?iso-8859-1?q?Gro=DFjohann?=) Newsgroups: gmane.emacs.gnus.general Subject: Re: nnima-split-with-parent Date: Sat, 07 Dec 2002 15:59:45 +0100 Organization: University of Dortmund, Germany Sender: owner-ding@hpc.uh.edu Message-ID: <84ptsdri1q.fsf@lucy.cs.uni-dortmund.de> References: <4n7kemaoaj.fsf@brainy.bwh.harvard.edu> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1039273256 21235 80.91.224.249 (7 Dec 2002 15:00:56 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sat, 7 Dec 2002 15:00:56 +0000 (UTC) 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 18KgRq-0005WE-00 for ; Sat, 07 Dec 2002 16:00:54 +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 18KgR7-0001d4-00; Sat, 07 Dec 2002 09:00:09 -0600 Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Sat, 07 Dec 2002 09:00:57 -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 JAA24664 for ; Sat, 7 Dec 2002 09:00:41 -0600 (CST) Original-Received: (qmail 3135 invoked by alias); 7 Dec 2002 14:59:47 -0000 Original-Received: (qmail 3130 invoked from network); 7 Dec 2002 14:59:47 -0000 Original-Received: from quimby.gnus.org (80.91.224.244) by gnus.org with SMTP; 7 Dec 2002 14:59:47 -0000 Original-Received: from news by quimby.gnus.org with local (Exim 3.12 #1 (Debian)) id 18KgZp-0003vb-00 for ; Sat, 07 Dec 2002 16:09:09 +0100 Original-To: ding@gnus.org Original-Path: not-for-mail Original-Newsgroups: gnus.ding Original-Lines: 74 Original-NNTP-Posting-Host: p50876bb5.dip.t-dialin.net Original-X-Trace: quimby.gnus.org 1039273749 14364 80.135.107.181 (7 Dec 2002 15:09:09 GMT) Original-X-Complaints-To: usenet@quimby.gnus.org Original-NNTP-Posting-Date: 7 Dec 2002 15:09:09 GMT User-Agent: Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.3.50 (i686-pc-linux-gnu) Cancel-Lock: sha1:GYG5IHpTWj4PjhspYDyvi8EiEQo= Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:48091 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:48091 Ted Zlatanov writes: > I want nnimap-split-with-parent! :) Me, too. A simple way to get it is to frob nnmail-cache-primary-mail-backend so that it returns your nnimap backend. But this invalidates previous lines in .nnmail-cache. > I was looking at the nnmail-split-with-parent code, and I see that the > nnmail cache is used for duplicate detection *and* for splitting with > the parent. So it's not easy to abstract the nnmail cache as it is to > arbitrary newsgroup names, we might get erroneous warnings about > duplicates. I think the format for the "new" article-ID cache should > be > > backend-name\tarticle-ID\tgroup-name > > We can keep the current nnmail cache as well, but this format can > replace the old cache format with very little work. Maybe we can copy > and fix up the new-cache from the old nnmail-cache if we're upgrading, > and otherwise always use the new-cache file? This is a very good plan. I've been thinking hard to change the .nnmail-cache format in an upwards-compatible way, but I think your suggestion is better: replace the nnmail-cache implementation with a new one that just reads and converts the old file, if necessary. Just for reference, the upwards-compatible format change would be as follows. Right now, there are some lines with just msg-id in it. Some have msg-id, then tab, then group name. The change would be to add lines with msg-id, then tab, then group name, then server name. If the group name is given but the server is missing, then assume it's the server returned by nnmail-cache-primary-mail-backend. For new lines, we might want to always write the server name. Write "native" for the native server. But this is just for reference, I think your solution is better. > We should separate the functionality into gnus-article-cache.el if > it's going to be generalized (or whatever the file is called). > > Functions affected (new names are not necessarily final): > > nnmail-cache-insert: needs to be generalized to > gnus-article-cache-insert, maybe figuring out the backend name instead > of having it passed in for minimum code changes? nnmail-cache-insert already knows the group I think. It can intuit the server from there. (It currently does I believe.) Oh, it uses gnus-command-method instead. > nnmail-cache-fetch-group: needs to be generalized to > gnus-article-cache-fetch-group, and the logic altered a little to > allow for the backend name at beggining of line. Like the insert > function, maybe it should figure out the current backend name instead > of having it passed in for minimum code changes? Yes. gnus-command-method. > nnmail-cache-id-exists-p: generalize to > gnus-article-cache-id-exists-p, unchanged otherwise > > the other nnmail-cache-* functions should be easily migrated to > gnus-article-cache-* > > I hope someone is interested in doing this or at least giving me some > feedback... I'm afraid I don't have time, but I'm happy that *you're* interested :-) -- ~/.signature is: umop ap!sdn (Frank Nobis)