Gnus development mailing list
 help / color / mirror / Atom feed
From: Lars Magne Ingebrigtsen <larsi@ifi.uio.no>
Subject: Re: Q: Extending nntp (for nndb)
Date: 29 Mar 1996 17:10:48 +0100	[thread overview]
Message-ID: <w8sn34zop6f.fsf@aegir.ifi.uio.no> (raw)
In-Reply-To: <vafloknugz9.fsf@dusty.informatik.uni-dortmund.de>

Kai Grossjohann <grossjoh@ls6.informatik.uni-dortmund.de> writes:

>   Lars> By "data", the manual means "data in the nntpd buffer".  I
>   Lars> forgot to mention the function return value.
> 
> I see.  By  reading a bit more, I found that there is in fact one
> function where the return value is mentioned: a list of article
> numbers.  Can I assume that this is the same for other functions?

Nope.  Most of the functions do not return any useful function values,
but the ones that do return useful things all return in different
formats.  For instance, `*-retrieve-headers' return `nov' or
`headers'.  This should be documented better.

> So if I were to add to the nntp.el file a new function, said function
> could just use the variable nntp-address to get the name of the nntp
> server?

Yes.  If you look over the code, most of the functions start with 
`(nntp-possibly-change-server group server)', which deal with all that
gruft.  After calling that function, all variables should be ok.

>   Lars> Yes, probably.  nndb and nntp are sufficiently different that
>   Lars> there probably should be a new nndb.el file.
> 
> Really?  Please note that nndb offers a superset of the nntp protocol.
> Therefore, the nntp subset would have to be maintained twice if the
> two were completely independent nndb.el and nntp.el files.  Well, I
> don't like this idea, but you're the guru, so I'll comply.

Well, I didn't mean that you should rewrite all functions.  Here's
a typical nndir function.  (nndir is a wrapper around nnmh in much the
same way nnbd would be a wrapper around nntp.)

(defun nndir-request-newgroups (date &optional server)
  (nndir-execute-nnmh-command
   `(nnmh-request-newgroups ,date ,server)))

`nndir-execute-nnmh-command' binds the relevant nntp variables and
evals that form.

The main reason that I'd rather not see functions like
`nntp-request-accept-article' is that nntp servers are read-only, and
the presence of such a function would make Gnus believe that Gnus
could delete articles from the nntp backend.  Which isn't really true.

-- 
  "Yes.  The journey through the human heart 
     would have to wait until some other time."


      parent reply	other threads:[~1996-03-29 16:10 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-03-26 10:37 Kai Grossjohann
1996-03-27  4:49 ` Lars Magne Ingebrigtsen
1996-03-27  7:34   ` Kai Grossjohann
1996-03-27  8:11     ` Per Abrahamsen
1996-03-29 16:10     ` Lars Magne Ingebrigtsen [this message]

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=w8sn34zop6f.fsf@aegir.ifi.uio.no \
    --to=larsi@ifi.uio.no \
    /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).