From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/48088 Path: main.gmane.org!not-for-mail From: Ted Zlatanov Newsgroups: gmane.emacs.gnus.general Subject: Re: nnimap-split-with-parent Date: Sat, 07 Dec 2002 08:54:17 -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: 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 1039269221 8691 80.91.224.249 (7 Dec 2002 13:53:41 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sat, 7 Dec 2002 13:53:41 +0000 (UTC) Cc: ding 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 18KfOm-0002G2-00 for ; Sat, 07 Dec 2002 14:53:40 +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 18KfNO-00018A-00; Sat, 07 Dec 2002 07:52:14 -0600 Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Sat, 07 Dec 2002 07:53:02 -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 HAA24544 for ; Sat, 7 Dec 2002 07:52:47 -0600 (CST) Original-Received: (qmail 1889 invoked by alias); 7 Dec 2002 13:51:48 -0000 Original-Received: (qmail 1884 invoked from network); 7 Dec 2002 13:51:48 -0000 Original-Received: from ns2.beld.net (208.229.215.82) by gnus.org with SMTP; 7 Dec 2002 13:51:48 -0000 Original-Received: from heechee.beld.net (dhcp-0-30-bd-1-93-b2.cpe.beld.net [24.233.65.6]) by ns2.beld.net (Postfix) with ESMTP id A0B4E3B95A; Sat, 7 Dec 2002 08:51:45 -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 User-Agent: Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.2 (i686-pc-linux-gnu) Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:48088 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:48088 On Sat, 07 Dec 2002, jan@rychter.com wrote: >>>>>> "Ted" == Ted Zlatanov : > [...] > Ted> I think the format for the "new" article-ID cache should be > Ted> backend-name\tarticle-ID\tgroup-name > > Do I understand correctly that when you write backend-name you mean > backend+server (to support multiple IMAP servers, for instance)? Yes. The fully qualified group name. This can be a problem if the user sets up a backend as secondary, then makes it the primary backend. It should be documented that the user can't expect the cache to work in that case unless they edit it themselves. > Ted> We can keep the current nnmail cache as well, but this format > Ted> can replace the old cache format with very little work. Maybe > Ted> we can copy and fix up the new-cache from the old nnmail-cache > Ted> if we're upgrading, and otherwise always use the new-cache > Ted> file? > > *sigh* I thought this would be easier :-) > > Unless I'm missing something, there is no immediately obvious way to > do that. The current nnmail-cache functions store the "short" group > name plus the message id, and I know of no generally correct way to > get from there to the full backend+server:group description. We can > either make assumptions, or just start a new cache. I think we have to start a "version 2" cache. > Assumptions *could* be fairly easy, as it seems that > nnmail-cache-insert works for the "primary mail backend" only, > "primary" being defined by the nnmail-cache-primary-mail-backend > function which I'm not sure I understand. It seems it was supposed > to find the first mail backend that supports respooling and has a > nnsomething-get-new-mail function. Strange. So I guess we could just > convert the current .nnmail-cache and use > (gnus-method-to-full-server-name > (nnmail-cache-primary-mail-backend)) for the backend description. That sounds good. It will work. Given: gnus-select-method (quote (nnml "private" (nnml-marks-is-evil t))) You can move an article to "group" and it's understood that this means "nnml+private:group" currently, but you can also explicitly move it to "nnml+private:group" and it will work correctly (as expected). So all backends can be full qualified, whether they are primary or secondary. (any Gnus gurus, feel free to chime in if this is incorrect) Since we're creating a new cache without overwriting the old one, it will be a pretty safe operation. > [...] > Ted> nnmail-cache-insert: needs to be generalized to > Ted> gnus-article-cache-insert, maybe figuring out the backend name > Ted> instead of having it passed in for minimum code changes? > [...] > > Is there a canonical way of figuring out what the current backend > is? > > Can I just do (gnus-method-to-full-server-name > (gnus-command-method)) and hope to get the right thing? I don't know. I can go source-diving if no Gnus expert jumps into the discussion. Ted