From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/5811 Path: main.gmane.org!not-for-mail From: Lars Magne Ingebrigtsen Newsgroups: gmane.emacs.gnus.general Subject: Re: Q: Extending nntp (for nndb) Date: 29 Mar 1996 17:10:48 +0100 Message-ID: References: NNTP-Posting-Host: coloc-standby.netfonds.no X-Trace: main.gmane.org 1035146360 1473 80.91.224.250 (20 Oct 2002 20:39:20 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 20 Oct 2002 20:39:20 +0000 (UTC) Return-Path: ding-request@ifi.uio.no Original-Received: from ifi.uio.no (ifi.uio.no [129.240.64.2]) by deanna.miranova.com (8.7.5/8.6.9) with SMTP id JAA06807 for ; Fri, 29 Mar 1996 09:10:08 -0800 Original-Received: from aegir.ifi.uio.no (4867@aegir.ifi.uio.no [129.240.94.24]) by ifi.uio.no with ESMTP (8.6.11/ifi2.4) id for ; Fri, 29 Mar 1996 17:10:50 +0100 Original-Received: (from larsi@localhost) by aegir.ifi.uio.no ; Fri, 29 Mar 1996 17:10:49 +0100 Original-To: ding@ifi.uio.no Original-Lines: 49 Xref: main.gmane.org gmane.emacs.gnus.general:5811 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:5811 Kai Grossjohann 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."