Gnus development mailing list
 help / color / mirror / Atom feed
From: Andreas Seltenreich <andreas+ding@gate450.dyndns.org>
Subject: Re: nnweb fix
Date: Tue, 31 Jan 2006 06:48:02 +0100	[thread overview]
Message-ID: <87acdduewd.fsf@gate450.dyndns.org> (raw)
In-Reply-To: <v9hd7l21o7.fsf@marauder.physik.uni-ulm.de>

[-- Attachment #1: Type: text/plain, Size: 1182 bytes --]

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:
>> <http://quimby.gnus.org/cgi-bin/cvsweb.cgi/gnus/lisp/gnus-group.el.diff?r1=6.95&r2=6.96>
>>
>> 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 <uwi7@stud.uni-karlsruhe.de>

	* 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.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: nnweb.patch --]
[-- Type: text/x-patch, Size: 5947 bytes --]

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 <larsi@gnus.org>
  ;; 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 <larsi@gnus.org>
  ;; 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))

  reply	other threads:[~2006-01-31  5:48 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-12-31  9:42 Andreas Seltenreich
2005-12-31 10:48 ` Andreas Seltenreich
2006-01-04  0:18   ` Reiner Steib
2006-01-04 12:25     ` Andreas Seltenreich
2006-01-27  8:35     ` Andreas Seltenreich
2006-01-30 15:08       ` Reiner Steib
2006-01-31  5:48         ` Andreas Seltenreich [this message]
2006-01-31 16:03           ` Reiner Steib
2006-01-31 17:06             ` Andreas Seltenreich
2006-02-03 13:20               ` Reiner Steib
2006-02-12  6:34                 ` Andreas Seltenreich
2006-02-13 13:35                   ` Reiner Steib
2006-02-08  5:56             ` nnweb + Gmane search (was: nnweb fix) Andreas Seltenreich
2006-02-08  7:56               ` Olly Betts
2006-02-09  4:47                 ` nnweb + Gmane search Andreas Seltenreich
2006-02-09 10:41                   ` Olly Betts
2006-02-09 12:28                     ` Olly Betts
2006-02-11  9:23                       ` Andreas Seltenreich
2006-02-13 10:23                         ` Olly Betts
2006-02-14 19:55                           ` Andreas Seltenreich
2006-02-23 17:53                             ` Reiner Steib
2006-02-23 23:04                               ` Olly Betts
2006-02-24  0:49                                 ` Andreas Seltenreich
2006-02-24 12:07                                 ` Olly Betts
2006-02-24 14:31                                   ` Reiner Steib
2006-02-24 15:34                                     ` Olly Betts
2006-02-24 21:58                                     ` Andreas Seltenreich
2006-02-24 23:24                                       ` Reiner Steib
2006-04-22 10:42 nnweb fix Andreas Seltenreich
2006-04-23 14:12 ` Lars Magne Ingebrigtsen
2006-04-23 19:02 ` Tassilo Horn
2006-04-30  9:24   ` Lars Magne Ingebrigtsen
2006-04-30 11:10     ` Tassilo Horn
2006-04-30 11:31       ` Lars Magne Ingebrigtsen
2006-04-30 12:10         ` Tassilo Horn
2006-04-30 15:14           ` Tassilo Horn
2006-04-30 15:56             ` Andreas Seltenreich
2006-04-30 16:34               ` Tassilo Horn
2006-04-30 16:58                 ` Andreas Seltenreich
2006-05-01 12:06               ` Lars Magne Ingebrigtsen
2006-05-01 12:09           ` Lars Magne Ingebrigtsen
2006-05-01 14:40             ` Tassilo Horn
2006-05-01 15:02               ` Lars Magne Ingebrigtsen
2006-05-01 16:38                 ` Tassilo Horn
2006-05-01 16:52                   ` Lars Magne Ingebrigtsen

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=87acdduewd.fsf@gate450.dyndns.org \
    --to=andreas+ding@gate450.dyndns.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).