Gnus development mailing list
 help / color / mirror / Atom feed
From: Lars Magne Ingebrigtsen <larsi@ifi.uio.no>
Subject: Re: Strange nntp port number?
Date: 12 Apr 1996 05:16:02 +0200	[thread overview]
Message-ID: <w8sivf6f7yl.fsf@hler.ifi.uio.no> (raw)
In-Reply-To: <vafenpwc8rl.fsf@dusty.i-have-a-misconfigured-system-so-shoot-me>

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

> I have learned from inspecting nndir.el that I should write a function
> nndb-execute-nntp-command which calls the nntp-functions, then use
> this to redirect all nntp-* functions.
> 
> Right now, this is what nndb-execute-nntp-command looks like:
> 
>     (defun nndb-execute-nntp-command (command)
>       (let ((nntp-port-number nndb-port-number)
>             (nntp-address nndb-address))
>         (eval command)))

I think something like the following might do the trick:

     (defun nndb-execute-nntp-command (command)
       (unless (nntp-server-opened nndb-current-server)
	 (nntp-open-server nndb-current-server 
			   `((nntp-port-number ,nndb-port-number)
			     (nntp-address ,nndb-address))))
       (eval command))

The backend thing feels kinda kludgy.  Perhaps I should think more
OO-y thoughts and implement some kind of inheretance scheme.  It's
just loose thoughts at the moment, but perhaps one should be able to
say something like:

(nnheader-inherit 'nntp 'nndb)

This would define all nndb interface functions as the nntp functions,
but with a wrapper like the one above around each function call.  That
means that one should have a:

(nnheader-define-server 'nndb
  `((nntp-port-number ,nndb-port-number)
    (nntp-address ,nndb-address)))

That defines the mapping from nndb variables to nntp variables.

Hm.  But one should be able to inherit functions from several
backends.  (nndir uses both nnml and nnmh functions, for instance.)

(defun nndb-request-article (&rest args)
  (nnheader-call-function 'nntp 'nndb args))

Hm.  Then one neeps several mappings like the define-server call
above...   

These are all rather easy to implement.  Perhaps we should think some
more and come up with a totally new backend interface scheme.  Any
ideas? 

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


      reply	other threads:[~1996-04-12  3:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-04-10 17:02 Kai Grossjohann
1996-04-12  3:16 ` 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=w8sivf6f7yl.fsf@hler.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).