[comp.emacs] problems with gnews-1.3

mike@pyrdc.UUCP (Mike Whitman) (04/03/88)

I have installed the fixed from weemba for the spool version of gnews-1.3 and am getting the following error message when I try to use the '=' to get a index
of all article headers: "symbol's value as variable is void: nntp-index"  

All the varibles are set to the desired values as shown in the .el files. 
Any help would be appreciated as the rest of the gnews stuff seems to work
fine. 

If you have any ideas they would be appreciated. Please post them and mail me a
copy as I will br TDY for the next two weeks and don't want to miss an expired
answer. Thanks,

Mike Whitman
-- 
      -m-------  Mike Whitman		Phone : (703)848-2050
    ---mmm-----  Pyramid Technology     Fax   : (703)848-4995
  -----mmmmm---  8320 Old Courthouse Rd ARPA  : mike@gmu90x.gmu.edu
-------mmmmmmm-  Vienna, VA 22170	UUCP  : ...uunet!pyrdc!mike

hrp@hall.cray.com@uc (Hal Peterson) (04/13/88)

There are two problems.  The first is in the setup instructions:
where they say to do
	(setq nntp-index-fast nil)
you should instead do
	(setq news-index-fast nil)

The second problem is the function gnews-spool-exec-motion, for which
a replacement appears below.

(defun gnews-spool-exec-motion (pfx)
  "Fake an NNTP next/last command."
  (let ((art-no (cadr (memq article-current
			    (if pfx
				gnews-spool-group-list
			      gnews-spool-group-tsil)))))
    (if art-no
	(gnews-spool-exec-art art-no 'stat)
      (gnews-spool-info "421 No" (if pfx "next" "previous")
			"article to retrieve")
      nil)))
--
--

jr@PEBBLES.BBN.COM (John Robinson) (04/21/88)

I couldn't reach Hal Peterson at the return address, so I'm bothering
the group.  Here's all it appears to take to get index mode working
under gnewspool (I'm using gnews-1.4, by the way).  These are the
definitions needed in gnewspool.el:

In the heading (really, what you put into gnewsinit.el; change it
accordingly):

;;; (defun gnews:start:hook ()
;;;   (fset 'nntp-start 'gnews-spool-start)
;;;   (fset 'nntp-exec 'gnews-spool-exec)
;;;   (fset 'nntp-index-exec 'gnews-spool-index-exec)
;;;   (fset 'nntp-run-p '(lambda () t))
;;;   (setq news-index-fast nil) 
;;;   (load-library "gnewspool.el"))

And the one needed function:

(defun gnews-spool-index-exec (comm &rest args)
  "NNTP commands for indexing interpreted directly off a news spool."
  (interactive (list (not current-prefix-arg)
		     (read-from-minibuffer "NNTP command: ")
		     nil))
  (if (interactive-p)
      (setq args (progn
		   (string-match "\\<[^ ]*\\>" comm)
		   (if (/= (length comm) (match-end 0))
		       (list (substring comm (1+ (match-end 0))))))
	    comm (substring comm (match-beginning 0) (match-end 0))))
  (let* ((b (current-buffer))
	 (a1 (car args))
	 (a2 (cadr args))
	 (art (or a1 article-current)))
    )
    (prog2
	(set-buffer nntp-buffer)
	(cond ((string= comm "group")
	       (gnews-spool-exec-group a1))
	      ((string= comm "head")
	       (gnews-spool-exec-art art 'head)))
      (set-buffer b)))

It just uses functions already in gnewspool.el.  I assume there is no
interference in swapping around the current group.

/jr
jr@bbn.com or jr@bbn.uucp