Gnus development mailing list
 help / color / mirror / Atom feed
From: Ted Zlatanov <tzz@lifelogs.com>
Cc: ding <ding@gnus.org>
Subject: Re: nnimap-split-with-parent
Date: Sat, 07 Dec 2002 08:54:17 -0500	[thread overview]
Message-ID: <m3of7yexyu.fsf@heechee.beld.net> (raw)
In-Reply-To: <m2k7imroo1.fsf@tnuctip.rychter.com>

On Sat, 07 Dec 2002, jan@rychter.com wrote:
>>>>>> "Ted" == Ted Zlatanov <tzz@lifelogs.com>:
> [...]
>  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




  parent reply	other threads:[~2002-12-07 13:54 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   ` Ted Zlatanov [this message]
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 ` nnima-split-with-parent Kai Großjohann
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=m3of7yexyu.fsf@heechee.beld.net \
    --to=tzz@lifelogs.com \
    --cc=ding@gnus.org \
    /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).