Gnus development mailing list
 help / color / mirror / Atom feed
From: prj@po.cwru.edu (Paul Jarc)
Subject: Re: Backend writing
Date: Fri, 03 Aug 2001 17:36:43 -0400	[thread overview]
Message-ID: <m3d76cakqm.fsf@multivac.cwru.edu> (raw)
In-Reply-To: <vafg0b8kgjm.fsf@INBOX.auto.gnus.tok.lucy.cs.uni-dortmund.de> (Kai.Grossjohann@CS.Uni-Dortmund.DE's message of "Fri, 03 Aug 2001 22:57:33 +0200")

Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann) writes:
>| Secondly, it is not allowed for later articles to `re-use' older
>| article numbers.

I would suggest "it is normally not possible [...] without confusing
Gnus", or something like that, to avoid giving the impression that
Gnus is capable of detecting and reporting this.

>| That is, if a group has ever contained a message numbered 42, then
>| no other message may get that number, or Gnus will get mightily
>| confused.@footnote{??? Is this still true with the
>| nnchoke-request-*-mark* functions?}

You can reassign article numbers, but it takes some extra work.  You
let Gnus notify your backend about article marks by implementing
nnchoke-request-set-mark.  That function must store marks somehow,
typically in a way similar to how articles themselves are stored.  The
stored marks must identify the articles they belong to by some other
identification that will never change during an article's lifetime.
Your backend must then hand the marks back to Gnus via
nnchoke-request-update-info, mapping the persistent article
identification to article numbers.  Your backend must maintain the
mapping between numbers and the persistent identification, so that
-request-set-mark will know which marks belong to which articles.  You
can reassign numbers at each call to -request-update-info, but
depending on the details of your backend, it may be easier to assign
them only when opening the server and scanning for new articles, and
to let that numbering remain in effect until the server is closed.

>| But it seems that it might be useful to assign @emph{consecutive}
>| article numbers, for Gnus gets quite confused if there are holes in
>| the article numbering sequence.

It's also useful to start from 1.  Otherwise, you'll run out of
article numbers earlier than you would have.

Another useful addition to the description of each function would be a
list of user actions that cause that function to be called.  A backend
author will probably know when to perform certain backend actions in
terms of user actions, but figuring out the mapping between user
actions and backend function calls takes some work.


paul


  reply	other threads:[~2001-08-03 21:36 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-08-03 18:04 Sean Rima
2001-08-03 19:24 ` Kai Großjohann
2001-08-03 19:39 ` Paul Jarc
2001-08-03 20:57   ` Kai Großjohann
2001-08-03 21:36     ` Paul Jarc [this message]
2001-08-03 22:16       ` Kai Großjohann
2001-08-03 21:44     ` Simon Josefsson
2001-08-03 22:07       ` Kai Großjohann
2001-08-03 23:35         ` Simon Josefsson
2001-08-03 23:46           ` Paul Jarc
2001-08-04  0:11             ` Simon Josefsson
2001-08-04  0:20               ` Paul Jarc
2001-08-04  0:41                 ` Simon Josefsson
2001-08-04  0:57                   ` Paul Jarc
2001-08-04 12:36                     ` Simon Josefsson
2001-08-05  8:27                       ` Paul Jarc
2001-08-03 23:57           ` Paul Jarc
2001-08-04  0:12             ` Simon Josefsson
2001-08-04  0:21               ` Paul Jarc
2001-08-04 11:46           ` 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=m3d76cakqm.fsf@multivac.cwru.edu \
    --to=prj@po.cwru.edu \
    /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).