Gnus development mailing list
 help / color / mirror / Atom feed
From: kai.grossjohann@uni-duisburg.de (Kai Großjohann)
Subject: Re: nnima-split-with-parent
Date: Sat, 07 Dec 2002 15:59:45 +0100	[thread overview]
Message-ID: <84ptsdri1q.fsf@lucy.cs.uni-dortmund.de> (raw)
In-Reply-To: <4n7kemaoaj.fsf@brainy.bwh.harvard.edu>

Ted Zlatanov <tzz@lifelogs.com> 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)



  parent reply	other threads:[~2002-12-07 14:59 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-12-06 20:24 nnima-split-with-parent Ted Zlatanov
     [not found] ` <m2k7imroo1.fsf@tnuctip.rychter.com>
2002-12-07 13:54   ` nnimap-split-with-parent Ted Zlatanov
2002-12-07 15:01   ` nnima-split-with-parent Kai Großjohann
2002-12-07 15:14     ` nnima-split-with-parent Ted Zlatanov
2002-12-07 15:28       ` nnima-split-with-parent Kai Großjohann
2002-12-07 18:20         ` nnima-split-with-parent Ted Zlatanov
2002-12-07 20:25           ` nnima-split-with-parent Kai Großjohann
2002-12-09 15:54             ` nnima-split-with-parent Ted Zlatanov
2002-12-09 16:21               ` nnima-split-with-parent Kai Großjohann
     [not found]     ` <m27kelycce.fsf@tnuctip.rychter.com>
2002-12-07 20:23       ` nnima-split-with-parent Kai Großjohann
2002-12-07 14:59 ` Kai Großjohann [this message]
2002-12-07 18:20   ` nnima-split-with-parent Ted Zlatanov
2002-12-07 20:22     ` nnima-split-with-parent Kai Großjohann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=84ptsdri1q.fsf@lucy.cs.uni-dortmund.de \
    --to=kai.grossjohann@uni-duisburg.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).