From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/61951 Path: news.gmane.org!not-for-mail From: Andreas Seltenreich Newsgroups: gmane.emacs.gnus.general Subject: Re: nnweb fix Date: Sun, 12 Feb 2006 07:34:18 +0100 Message-ID: <87wtg1qe51.fsf@gate450.dyndns.org> References: <877j9lob4v.fsf@gate450.dyndns.org> <87hd8pmtjf.fsf@gate450.dyndns.org> <87u0bqf4pn.fsf@gate450.dyndns.org> <87acdduewd.fsf@gate450.dyndns.org> <87oe1se383.fsf@gate450.dyndns.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: sea.gmane.org 1139727091 7261 80.91.229.2 (12 Feb 2006 06:51:31 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 12 Feb 2006 06:51:31 +0000 (UTC) Original-X-From: ding-owner+m10478=ding+2daccount=gmane.org@lists.math.uh.edu Sun Feb 12 07:51:30 2006 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by ciao.gmane.org with esmtp (Exim 4.43) id 1F8B4t-00085f-Di for ding-account@gmane.org; Sun, 12 Feb 2006 07:51:24 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu ident=lists) by malifon.math.uh.edu with smtp (Exim 3.20 #1) id 1F8B4s-00047e-01 for ding-account@gmane.org; Sun, 12 Feb 2006 00:51:22 -0600 Original-Received: from nas01.math.uh.edu ([129.7.128.39]) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 1F8Awm-00047U-00 for ding@lists.math.uh.edu; Sun, 12 Feb 2006 00:43:00 -0600 Original-Received: from quimby.gnus.org ([80.91.224.244]) by nas01.math.uh.edu with esmtp (Exim 4.52) id 1F8Awj-0003uZ-VL for ding@lists.math.uh.edu; Sun, 12 Feb 2006 00:43:00 -0600 Original-Received: from smtp2.rz.uni-karlsruhe.de ([129.13.185.218]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1F8Awj-0005tf-00 for ; Sun, 12 Feb 2006 07:42:57 +0100 Original-Received: from rzstud1.stud.uni-karlsruhe.de (rzstud1.stud.uni-karlsruhe.de [193.196.41.33]) by smtp2.rz.uni-karlsruhe.de with esmtp (Exim 4.50 #1) id 1F8Awg-0006xg-Vg; Sun, 12 Feb 2006 07:42:56 +0100 Original-Received: from uwi7 by rzstud1.stud.uni-karlsruhe.de with local (Exim 3.36 #1) id 1F8Awo-0005R4-00 for ding@gnus.org; Sun, 12 Feb 2006 07:43:02 +0100 Original-To: ding@gnus.org User-Agent: Gnus/5.110004 (No Gnus v0.4) Emacs/21.4 (gnu/linux) X-PGP-Key: 0x2C006B340F8C8C1B X-Now-Playing: Kreator / Coma Of Souls X-Face: $:F<87a[gD1?#R6S3j21cr1&C&7bd63GHC.tSdskUb}hhwG(ci*=D5kJ<_N+p9q(7-,PnG. Et.Yh --=-=-= Hi, it looks like the regexps in nnweb-google-wash-article broke in the meantime. Attached is an update. I also reverted the change to declare nnweb-group-alist with defvar instead of defvoo. I didn't realise that it is held on disk /multiplexed/ with the defvoo'd nnweb-directory, which would result in bogus active file entries if one would use more than one directory for nnweb. Also, nnlistserv seems to inherit from nnweb via nnoo, and I'm not sure what the implications are, if it wasn't declared with defvoo (anyone)? regards, Andreas 2006-02-12 Andreas Seltenreich * nnweb.el (nnweb-google-wash-article): Update regexps. (nnweb-group-alist): Use defvoo instead of defvar, --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=nnweb.patch Index: nnweb.el =================================================================== RCS file: /usr/local/cvsroot/gnus/lisp/nnweb.el,v retrieving revision 7.14 diff -u -r7.14 nnweb.el --- nnweb.el 3 Feb 2006 13:15:13 -0000 7.14 +++ nnweb.el 12 Feb 2006 05:55:27 -0000 @@ -99,7 +99,7 @@ (defvoo nnweb-articles nil) (defvoo nnweb-buffer nil) -(defvar nnweb-group-alist nil) +(defvoo nnweb-group-alist nil) (defvoo nnweb-group nil) (defvoo nnweb-hashtb nil) @@ -309,22 +309,26 @@ (defun nnweb-google-wash-article () ;; We have Google's masked e-mail addresses here. :-/ - (let ((case-fold-search t)) + (let ((case-fold-search t) + (start-re "
\n *")
+	(end-re "\n *
")) (goto-char (point-min)) (if (save-excursion (or (re-search-forward "The requested message.*could not be found." nil t) - (not (and (re-search-forward "^
" nil t)
-			(re-search-forward "^
" nil t))))) + (not (and (re-search-forward start-re nil t) + (re-search-forward end-re nil t))))) ;; FIXME: Don't know how to indicate "not found". ;; Should this function throw an error? --rsteib (progn (gnus-message 3 "Requested article not found") (erase-buffer)) (delete-region (point-min) - (1+ (re-search-forward "^
" nil t)))
+		     (re-search-forward start-re))
       (goto-char (point-min))
-      (delete-region (- (re-search-forward "^
" nil t) (length "")) + (delete-region (progn + (re-search-forward end-re) + (match-beginning 0)) (point-max)) (mm-url-decode-entities)))) --=-=-=--