Gnus development mailing list
 help / color / mirror / Atom feed
From: Barry Fishman <barry_fishman@acm.org>
To: ding@gnus.org
Subject: Problems with Easynews active file (with patch)
Date: Sat, 16 Feb 2008 13:08:59 -0500	[thread overview]
Message-ID: <m3ejbcwz7o.fsf@barry_fishman.acm.org> (raw)

A question about this was posted by Hynek Schlawack on Oct 7 but
did not receive a response.

> 1) Server-Browsing (^) of Easynews fails after some groups with the error:
>
> Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p
> Wellfleet)
>   gnus-browse-foreign-server("nntp:news.easynews.com" #<buffer *Server*≥)
>   gnus-server-read-server("nntp:news.easynews.com")
>   call-interactively(gnus-server-read-server)

This is due to easynews containing several bogus lines in its
"list active" response, such as:

comp.dcom.sys.wellfleet Wellfleet bridge router

I set a message about the problem to EasyNews support.

One can patch around this by changing gnus-ignored-newsgroups to:

(setq gnus-ignored-newsgroups
      (mapconcat 'identity
                 '("^to\\."                 ; not "real" groups
                   "^[0-9. \t]+\\( \\|$\\)" ; all digits in name
                   "^[\"][]\"[#'()]"        ; bogus characters
                   "^[^ ]+ [^0-9]+$"        ; No digits fields (for easynews)
                   )
                 "\\|"))

But shouldn't gnus-browse-foreign-server validate the numeric fields
before using them, as is done in gnus-active-to-gnus-format?

The following patch seems to work:

Index: gnus-srvr.el
===================================================================
RCS file: /usr/local/cvsroot/gnus/lisp/gnus-srvr.el,v
retrieving revision 7.33
diff -c -r7.33 gnus-srvr.el
*** gnus-srvr.el	20 Jan 2008 05:23:57 -0000	7.33
--- gnus-srvr.el	16 Feb 2008 18:03:02 -0000
***************
*** 726,741 ****
  	  (if (eq (car method) 'nntp)
  	      (while (not (eobp))
  		(ignore-errors
! 		  (push (cons
! 			 (mm-string-as-unibyte
! 			  (buffer-substring
! 			   (point)
! 			   (progn
! 			     (skip-chars-forward "^ \t")
! 			     (point))))
! 			 (let ((last (read cur)))
! 			   (cons (read cur) last)))
! 			groups))
  		(forward-line))
  	    (while (not (eobp))
  	      (ignore-errors
--- 726,743 ----
  	  (if (eq (car method) 'nntp)
  	      (while (not (eobp))
  		(ignore-errors
! 		  (let ((group (cons
! 				(mm-string-as-unibyte
! 				 (buffer-substring
! 				  (point)
! 				  (progn
! 				    (skip-chars-forward "^ \t")
! 				    (point))))
! 				(let ((last (read cur)))
! 				  (cons (read cur) last)))))
! 		    (if (and (numberp (cadr group))
! 			     (numberp (cddr group)))
! 			(push group groups))))
  		(forward-line))
  	    (while (not (eobp))
  	      (ignore-errors


-- 
Barry Fishman




                 reply	other threads:[~2008-02-16 18:08 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=m3ejbcwz7o.fsf@barry_fishman.acm.org \
    --to=barry_fishman@acm.org \
    --cc=ding@gnus.org \
    /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).