Gnus development mailing list
 help / color / mirror / Atom feed
From: Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann)
Cc: ding@gnus.org
Subject: Re: (provide 'nnmaildir)
Date: Sat, 15 Jul 2000 13:43:06 +0200	[thread overview]
Message-ID: <vafem4vbovp.fsf@lucy.cs.uni-dortmund.de> (raw)
In-Reply-To: Paul Jarc's message of "14 Jul 2000 19:10:18 -0400"

On 14 Jul 2000, Paul Jarc wrote:

> - Message files will never be rewritten.  The data in the files and
>   the last-modified times are to be treated as precious.  I've
>   thought about encoding NOV lines in the filenames for easy access,
>   but that might get a bit unwieldy.  (I do add Lines: when writing
>   the full headers to nntp-server-buffer, but I don't write it back
>   to the message file.)  I could just write the NOV lines to a
>   separate per-maildir file, but that's so boring.  It'd complicate
>   message deletion, too.

I think doing the NOV thing is important to gain speed.  The Gnus
backend interface heavily relies on the data contained in NOV lines,
and there are quite highly optimized functions for dealing with NOV
lines.

nnimap has code for retrieving header data from the IMAP server and
then caching this data in NOV format on the local disk.  Maybe that
kind of approach would work for you, too?  The first time you enter a
group, you gather NOV lines for all messages, and on subsequent visits
you just read that cache file.

> - I've been using the message files' inode numbers as article
>   numbers.  It seems this won't be viable, though, since messages
>   are sorted by article number in the summary buffer.

Yes, article numbers must be monotonically increasing.  I you use a
NOV cache as described above, you could put the article numbers into
that file.  You could also store the maildir file name in the NOV
cache, and then you could get a list of files in the directory and a
list of file names from the NOV cache, and compare.  This would help
you find NOV lines for the new messages, and it would help you delete
stale lines from the NOV cache.

> So... what conditions are article numbers supposed to satisfy?  What
> do NNTP servers do when they run out (I'm assuming they don't use
> bignums), and how does Gnus react?

Gnus gets real mad when the article numbers are reset.  This is a weak
spot.  Gnus has not been designed for this.

You can use M-x gnus-group-clear-data RET and/or
gnus-group-clear-data-on-native-groups to make Gnus forget all article
numbers.  This means that all messages will be considered new, unread.

> The server argument to the backend functions is the second element
> of the select method, right?

I don't think so.  It just identifies a server.  There are two ways to
identify a server.  One way is to use a string, which is treated like
a name and then looked up in the list of all servers.  The other
possibility is to have a complete server definition, along the lines
of (nnml "frumple" (nnml-get-new-mail nil)), ie with server parameters
and all.

Luckily, it appears that you don't have to think about all this stuff
-- you can just use nnoo-change-server and then access local
variables, or stuff like this.

Hm.

Hmmm...  I have written a backend which seems to work, and I still
don't know what that server argument really means.  It appears that
nnoo is your friend, because it means you don't have to know all the
gory details.

> A string, typically?  And as the author of the backend, I decide
> what it means?  (Right now, I'm using it to specify the path to the
> maildir, but I think I'll create a backend variable for that purpose
> instead.)

Well, you could assign to it some meaning.  But I think it would be
better to just treat it as a name.  This way, users can decide what
their group names look like.

You see, if you specify (nnmaildir "frumple" ...) as a server
definition, then you will have group names like
nnmaildir+frumple:foo.bar.  If you specity (nnmaildir "" ...), ie an
empty server name, then the groups are named nnmaildir:foo.bar.

By `name' I mean that what you enter after a `B m' prompt, for
example.

> I'm unclear about the usage of nnoo-change-server and
> nnoo-push-server.  I've just been working from (un/sparsely
> commented) examples in the various nn*.el to guess where to use
> each.

I wish I knew...

> Can I see a concrete example of what a real-life NOV line would look
> like, as written to nntp-server-buffer?

Lessee:

1	Username/password for submission of ECDL paper	Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai =?iso-8859-1?q?Gro=DFjohann?=)	28 Apr 2000 16:17:50 +0200	<vafzoqewbqp.fsf@lucy.cs.uni-dortmund.de>		160	7	Xref: lucy.cs.uni-dortmund.de conf.y2000.ecdl:1	To: ecdl2000@bn.pt	

These are tab-separated fields.  The first field is the article
number, the second field is the Subject header, then comes the From
header, then the date, then the message id, and I'm not sure about the two
numbers 160 and 7.  Then comes the Xref header (I'm not sure what that
means), and the remaining fields can be any headers from the message.
(See gnus-extra-headers and nnmail-extra-headers for the remaining
fields.)

But this format is surely described somewhere in the Gnus info file?

> Can I get away with using article numbers for references there?

Gnus identifies messages by their numbers.

> Why does gnus-nov-is-evil exist?  Obeying it might be mildly
> troublesome/expensive.

Yes.  But if the user wishes to do that...

> Does the `chars' field include the whole message, or just the body?
> `lines' is just the body, right?

Err...

> How does Gnus know whether a backend supports article identification
> by article number ranges or Message-IDs?  I guess backends must fail
> sensibly if they don't support these, hm?

I think Gnus will barf if the backend doesn't support article numbers.
Maybe it's sufficient to just signal an error for message ids.

kai
-- 
I like BOTH kinds of music.



  parent reply	other threads:[~2000-07-15 11:43 UTC|newest]

Thread overview: 56+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-07-14 23:10 Paul Jarc
2000-07-14 23:47 ` Steve Harris
2000-07-15  0:56   ` Paul Jarc
2000-07-16  1:14     ` Steve Harris
2000-07-16 12:44       ` Simon Josefsson
2000-07-17  2:43         ` Steve Harris
2000-07-17 18:28           ` Paul Jarc
2000-07-18  9:04             ` Kai Großjohann
2000-07-18 10:16             ` Simon Josefsson
2000-07-18 15:34               ` Steve Harris
2000-07-18 16:34                 ` Simon Josefsson
2000-07-18 16:48                   ` Kai Großjohann
2000-07-19 15:36                   ` Steve Harris
2000-07-20 14:19                     ` Paul Jarc
2000-07-24 20:10                       ` Paul Jarc
     [not found]                         ` <vafittodfig.fsf@lucy.cs.uni-dortmund.de>
2000-07-31 16:42                           ` Paul Jarc
2000-08-01 16:03                             ` Paul Jarc
2000-08-02 14:51                               ` Paul Jarc
2000-08-03 14:58                                 ` Paul Jarc
2000-08-04 15:44                                   ` Paul Jarc
2000-08-07 22:35                                     ` Paul Jarc
2000-08-11 15:01                                     ` Paul Jarc
2000-08-11 21:07                                       ` Kai Großjohann
2000-08-11 21:34                                         ` Paul Jarc
2000-08-13 16:08                                           ` Kai Großjohann
2000-09-04  3:51                                       ` Paul Jarc
2000-09-04  4:20                                         ` Paul Jarc
2000-09-04  8:26                                         ` Simon Josefsson
2000-09-05 18:49                                           ` Paul Jarc
2000-09-21 17:30                                         ` Paul Jarc
2000-09-21 21:30                                           ` Kai Großjohann
2000-09-21 22:43                                             ` Paul Jarc
2000-07-15  0:15 ` Simon Josefsson
2000-07-15  0:51   ` Paul Jarc
2000-07-15  1:21     ` Simon Josefsson
2000-07-15  1:24     ` Russ Allbery
2000-07-15 11:45     ` Kai Großjohann
2000-07-15 13:12       ` Simon Josefsson
2000-07-15 11:43 ` Kai Großjohann [this message]
2000-07-16 21:34   ` Paul Jarc
2000-07-16 21:47     ` Kai Großjohann
2000-07-17 18:17       ` Paul Jarc
2000-09-28 16:05 ` Paul Jarc
2000-09-28 18:46   ` Paul Jarc
2000-10-04 18:06 ` Paul Jarc
2000-10-04 18:21   ` Paul Jarc
2000-10-04 19:31     ` Simon Josefsson
2000-10-04 19:34       ` Paul Jarc
2000-10-04 19:52         ` Simon Josefsson
2000-10-04 20:32           ` Paul Jarc
2000-10-05  8:57             ` Simon Josefsson
2001-04-11 16:10 ` Paul Jarc
2001-04-15  3:57 ` Paul Jarc
2001-04-17  0:55 ` Paul Jarc
2001-04-24 15:11 ` Paul Jarc
2001-04-25 13:42   ` Paul Jarc

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=vafem4vbovp.fsf@lucy.cs.uni-dortmund.de \
    --to=kai.grossjohann@cs.uni-dortmund.de \
    --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).