From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/57419 Path: main.gmane.org!not-for-mail From: "Ted Zlatanov" Newsgroups: gmane.emacs.gnus.general Subject: Re: Wizards! I mean, Assistants! Date: 17 May 2004 10:51:49 -0400 Organization: =?koi8-r?q?=F4=C5=CF=C4=CF=D2=20=FA=CC=C1=D4=C1=CE=CF=D7?= @ Cienfuegos Sender: ding-owner@lists.math.uh.edu Message-ID: <4nd653nm2i.fsf@lifelogs.com> References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1084806549 27348 80.91.224.253 (17 May 2004 15:09:09 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 17 May 2004 15:09:09 +0000 (UTC) Original-X-From: ding-owner+M5959@lists.math.uh.edu Mon May 17 17:08:59 2004 Return-path: Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1BPjje-0001QI-00 for ; Mon, 17 May 2004 17:08:58 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by malifon.math.uh.edu with smtp (Exim 3.20 #1) id 1BPjjI-0004Hn-00; Mon, 17 May 2004 10:08:36 -0500 Original-Received: from util2.math.uh.edu ([129.7.128.23]) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 1BPjjA-0004Hh-00 for ding@lists.math.uh.edu; Mon, 17 May 2004 10:08:28 -0500 Original-Received: from justine.libertine.org ([66.139.78.221] ident=postfix) by util2.math.uh.edu with esmtp (Exim 4.30) id 1BPjj9-0007ii-GL for ding@lists.math.uh.edu; Mon, 17 May 2004 10:08:27 -0500 Original-Received: from mail.bwh.harvard.edu (sysblade0.bwh.harvard.edu [134.174.9.44]) by justine.libertine.org (Postfix) with ESMTP id B4B0C3A01F6 for ; Mon, 17 May 2004 10:08:26 -0500 (CDT) Original-Received: (qmail 25702 invoked from network); 17 May 2004 15:02:56 -0000 Envelope-Sender: tzz@lifelogs.com Envelope-Recipients: ding@gnus.org, Original-Received: from asimov.bwh.harvard.edu (HELO asimov) ([134.174.9.63]) (envelope-sender ) by mail.bwh.harvard.edu (qmail-ldap-1.03) with SMTP for ; 17 May 2004 15:02:40 -0000 Mail-Followup-To: ding@gnus.org Original-To: ding@gnus.org X-Face: bd.DQ~'29fIs`T_%O%C\g%6jW)yi[zuz6;d4V0`@y-~$#3P_Ng{@m+e4o<4P'#(_GJQ%TT= D}[Ep*b!\e,fBZ'j_+#"Ps?s2!4H2-Y"sx" In-Reply-To: (Lars Magne Ingebrigtsen's message of "Sun, 16 May 2004 15:48:04 +0200") User-Agent: Gnus/5.110003 (No Gnus v0.3) Emacs/21.3.50 (gnu/linux) Precedence: bulk Xref: main.gmane.org gmane.emacs.gnus.general:57419 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:57419 On Sun, 16 May 2004, larsi@gnus.org wrote: > There are two areas of difficulty here: > > 1) Specifying these Assistants. If it's boring to write them, and > they're difficult to maintain, that'd suck. And they'd not get > written. I think this is the important part right now. > 2) Rendering the Assistants. If they aren't pleasant to use, then > that'd suck. I agree, but I think this should come once (1) is done. Perhaps a very simple q&a renderer (nothing but minibuffer queries) should be the first step for testing. > > (!valid > (let ((stream > (condition-case err > (open-network-stream "nntpd" nil server port) > (error (setq error err))))) > (if (memq (process-status stream) '(open run)) > (progn > (delete-process stream) > t) > nil))) > (!result (gnus-select-method (list server port))) > So you want to read news. The news server to use > is (?server (gnus-getenv-nntpserver)); > port number (?port 119). > There should be distinct sections for expected variables, initialization, validation, resetting, and undo (going back). They won't always be used, but the ability should be there. This is how I would do it (to be parsed by ELisp): (assistant-pages (assistant 'nntp-server "NNTP server setup" 1 ; assistant name, title, page# '((produces '(server string) '(port integer)) (initialize server (gnus-getenv-nntpserver) port 119) (reset 'redo-initialize) (undo 'redo-initialize) (validate (server port) 'user-override [open-network-stream code goes here]) So you want to read news. The news server to use is `server'; port number `port'. ))) The (produces) section is crucial. It lets us specify the exact thing this assistant will create, and further assistant pages can use these variables also. For validation, there should be a way to specify that the user can override the validation or not; for instance the NNTP server may be down but still it needs to be made active. Just some ideas... Ted