From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/37429 Path: main.gmane.org!not-for-mail From: prj@po.cwru.edu (Paul Jarc) Newsgroups: gmane.emacs.gnus.general Subject: Re: Backend writing Date: Fri, 03 Aug 2001 17:36:43 -0400 Message-ID: References: NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: main.gmane.org 1035172846 13837 80.91.224.250 (21 Oct 2002 04:00:46 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 04:00:46 +0000 (UTC) Return-Path: Return-Path: Original-Received: (qmail 26146 invoked from network); 3 Aug 2001 21:36:46 -0000 Original-Received: from multivac.student.cwru.edu (HELO multivac.cwru.edu) (261@129.22.96.25) by gnus.org with SMTP; 3 Aug 2001 21:36:46 -0000 Original-Received: (qmail 18946 invoked by uid 500); 3 Aug 2001 21:37:05 -0000 Mail-Followup-To: ding@gnus.org Original-To: ding@gnus.org In-Reply-To: (Kai.Grossjohann@CS.Uni-Dortmund.DE's message of "Fri, 03 Aug 2001 22:57:33 +0200") User-Agent: Gnus/5.090004 (Oort Gnus v0.04) Emacs/20.7 Original-Lines: 44 Xref: main.gmane.org gmane.emacs.gnus.general:37429 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:37429 Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Gro=DFjohann) 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