From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/61805 Path: news.gmane.org!not-for-mail From: Andreas Seltenreich Newsgroups: gmane.emacs.gnus.general Subject: Re: nnweb fix Date: Tue, 31 Jan 2006 06:48:02 +0100 Message-ID: <87acdduewd.fsf@gate450.dyndns.org> References: <877j9lob4v.fsf@gate450.dyndns.org> <87hd8pmtjf.fsf@gate450.dyndns.org> <87u0bqf4pn.fsf@gate450.dyndns.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: sea.gmane.org 1138686749 13376 80.91.229.2 (31 Jan 2006 05:52:29 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 31 Jan 2006 05:52:29 +0000 (UTC) Original-X-From: ding-owner+m10335@lists.math.uh.edu Tue Jan 31 06:52:24 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 1F3oR6-0008Ax-6z for ding-account@gmane.org; Tue, 31 Jan 2006 06:52:16 +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 1F3oQz-00033J-00; Mon, 30 Jan 2006 23:52:09 -0600 Original-Received: from nas02.math.uh.edu ([129.7.128.40]) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 1F3oNC-00033E-00 for ding@lists.math.uh.edu; Mon, 30 Jan 2006 23:48:14 -0600 Original-Received: from quimby.gnus.org ([80.91.224.244]) by nas02.math.uh.edu with esmtp (Exim 4.52) id 1F3oN6-0002rU-IK for ding@lists.math.uh.edu; Mon, 30 Jan 2006 23:48:13 -0600 Original-Received: from smtp1.rz.uni-karlsruhe.de ([129.13.185.217]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1F3oN5-0006NO-00 for ; Tue, 31 Jan 2006 06:48:07 +0100 Original-Received: from rzstud1.stud.uni-karlsruhe.de (rzstud1.stud.uni-karlsruhe.de [193.196.41.33]) by smtp1.rz.uni-karlsruhe.de with esmtp (Exim 4.50 #1) id 1F3oN3-0002N8-4m; Tue, 31 Jan 2006 06:48:07 +0100 Original-Received: from uwi7 by rzstud1.stud.uni-karlsruhe.de with local (Exim 3.36 #1) id 1F3oN3-00020O-00 for ding@gnus.org; Tue, 31 Jan 2006 06:48:06 +0100 Original-To: ding@gnus.org X-PGP-Key: 0x2C006B340F8C8C1B X-Now-Playing: Sunn / Black 1 X-Face: $:F<87a[gD1?#R6S3j21cr1&C&7bd63GHC.tSdskUb}hhwG(ci*=D5kJ<_N+p9q(7-,PnG. Et.Yh --=-=-= Reiner Steib writes: > On Fri, Jan 27 2006, Andreas Seltenreich wrote: >> While it works for ephemeral groups, solid ones seem still broken. >> >> ISTM this broke solid groups back in 2003: >> >> >> I guess the solution is to adapt nnweb to use the server variables >> instead of those custom args to nnweb-request-create-group for solid >> groups? > > Could you suggest a patch, please? How about the one attached? 2006-01-31 Andreas Seltenreich * nnweb.el (nnweb-group-alist): Use defvar instead of defvoo, there's only one active file for all servers. (nnweb-request-scan): Make sure nnweb-articles is initialized on solid groups -- Gnus might have used a FAST request to select the group. (nnweb-request-group, nnweb-google-parse-1): nnweb-type and nnweb-search are no longer redundantly kept in the active file. (nnweb-request-list): Don't list bogus groups. There can only be one. (nnweb-request-create-group): ARGS is no longer used. (nnweb-possibly-change-server, nnweb-request-group): Some initialisation removed -- let nnoo do the work. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=nnweb.patch Index: lisp/nnweb.el =================================================================== RCS file: /usr/local/cvsroot/gnus/lisp/nnweb.el,v retrieving revision 7.12 diff -c -r7.12 nnweb.el *** lisp/nnweb.el 30 Jan 2006 14:55:15 -0000 7.12 --- lisp/nnweb.el 31 Jan 2006 05:43:57 -0000 *************** *** 1,7 **** ;;; nnweb.el --- retrieving articles via web search engines ;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, ! ;; 2004, 2005 Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen ;; Keywords: news --- 1,7 ---- ;;; nnweb.el --- retrieving articles via web search engines ;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, ! ;; 2004, 2005, 2006 Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen ;; Keywords: news *************** *** 30,39 **** ;; FIXME: Due to changes in the HTML output of Gmane, stuff related to Gmane ;; web groups (`gnus-group-make-web-group') doesn't work anymore. - ;; FIXME: Solid web groups are currently broken because ARGS are no longer - ;; passed from `gnus-group-make-web-group' to `nnweb-request-create-group'. - ;; See revision 6.96 of `gnus-group.el' (2003-01-06). - ;;; Code: (eval-when-compile (require 'cl)) --- 30,35 ---- *************** *** 103,109 **** (defvoo nnweb-articles nil) (defvoo nnweb-buffer nil) ! (defvoo nnweb-group-alist nil) (defvoo nnweb-group nil) (defvoo nnweb-hashtb nil) --- 99,105 ---- (defvoo nnweb-articles nil) (defvoo nnweb-buffer nil) ! (defvar nnweb-group-alist nil) (defvoo nnweb-group nil) (defvoo nnweb-hashtb nil) *************** *** 126,150 **** (deffoo nnweb-request-scan (&optional group server) (nnweb-possibly-change-server group server) (if nnweb-ephemeral-p ! (setq nnweb-hashtb (gnus-make-hashtable 4095))) (funcall (nnweb-definition 'map)) (unless nnweb-ephemeral-p (nnweb-write-active) (nnweb-write-overview group))) (deffoo nnweb-request-group (group &optional server dont-check) ! (nnweb-possibly-change-server nil server) ! (when (and group ! (not (equal group nnweb-group)) ! (not nnweb-ephemeral-p)) ! (setq nnweb-group group ! nnweb-articles nil) ! (let ((info (assoc group nnweb-group-alist))) ! (when info ! (setq nnweb-type (nth 2 info)) ! (setq nnweb-search (nth 3 info)) ! (unless dont-check ! (nnweb-read-overview group))))) (cond ((not nnweb-articles) (nnheader-report 'nnweb "No matching articles")) --- 122,140 ---- (deffoo nnweb-request-scan (&optional group server) (nnweb-possibly-change-server group server) (if nnweb-ephemeral-p ! (setq nnweb-hashtb (gnus-make-hashtable 4095)) ! (unless nnweb-articles ! (nnweb-read-overview group))) (funcall (nnweb-definition 'map)) (unless nnweb-ephemeral-p (nnweb-write-active) (nnweb-write-overview group))) (deffoo nnweb-request-group (group &optional server dont-check) ! (nnweb-possibly-change-server group server) ! (unless (or nnweb-ephemeral-p ! dont-check) ! (nnweb-read-overview group)) (cond ((not nnweb-articles) (nnheader-report 'nnweb "No matching articles")) *************** *** 208,214 **** (nnweb-possibly-change-server nil server) (save-excursion (set-buffer nntp-server-buffer) ! (nnmail-generate-active nnweb-group-alist) t)) (deffoo nnweb-request-update-info (group info &optional server) --- 198,204 ---- (nnweb-possibly-change-server nil server) (save-excursion (set-buffer nntp-server-buffer) ! (nnmail-generate-active (list (assoc server nnweb-group-alist))) t)) (deffoo nnweb-request-update-info (group info &optional server) *************** *** 220,226 **** (deffoo nnweb-request-create-group (group &optional server args) (nnweb-possibly-change-server nil server) (nnweb-request-delete-group group) ! (push `(,group ,(cons 1 0) ,@args) nnweb-group-alist) (nnweb-write-active) t) --- 210,216 ---- (deffoo nnweb-request-create-group (group &optional server args) (nnweb-possibly-change-server nil server) (nnweb-request-delete-group group) ! (push `(,group ,(cons 1 0)) nnweb-group-alist) (nnweb-write-active) t) *************** *** 290,307 **** def)) (defun nnweb-possibly-change-server (&optional group server) - (nnweb-init server) (when server (unless (nnweb-server-opened server) ! (nnweb-open-server server))) (unless nnweb-group-alist (nnweb-read-active)) (unless nnweb-hashtb (setq nnweb-hashtb (gnus-make-hashtable 4095))) (when group ! (when (and (not nnweb-ephemeral-p) ! (equal group nnweb-group)) ! (nnweb-request-group group nil t)))) (defun nnweb-init (server) "Initialize buffers and such." --- 280,295 ---- def)) (defun nnweb-possibly-change-server (&optional group server) (when server (unless (nnweb-server-opened server) ! (nnweb-open-server server)) ! (nnweb-init server)) (unless nnweb-group-alist (nnweb-read-active)) (unless nnweb-hashtb (setq nnweb-hashtb (gnus-make-hashtable 4095))) (when group ! (setq nnweb-group group))) (defun nnweb-init (server) "Initialize buffers and such." *************** *** 347,354 **** Subject Score Date Newsgroups From map url mid) (unless active ! (push (list nnweb-group (setq active (cons 1 0)) ! nnweb-type nnweb-search) nnweb-group-alist)) ;; Go through all the article hits on this page. (goto-char (point-min)) --- 335,341 ---- Subject Score Date Newsgroups From map url mid) (unless active ! (push (list nnweb-group (setq active (cons 1 0))) nnweb-group-alist)) ;; Go through all the article hits on this page. (goto-char (point-min)) --=-=-=--