X-Git-Url: http://cgit.sxemacs.org/?p=gnus;a=blobdiff_plain;f=lisp%2Fnnweb.el;h=f472aeacb14a2ea4ddb2e1ba5885bffc197f0151;hp=e93373e8a8f5c01834e677cad7fc9ae965b673ea;hb=c358f44b1670d12d5eff5fe5a447a19afd34a252;hpb=09397c64b29d8d18c18206d8adc27a8424fe76ee diff --git a/lisp/nnweb.el b/lisp/nnweb.el index e93373e8a..f472aeacb 100644 --- a/lisp/nnweb.el +++ b/lisp/nnweb.el @@ -1,7 +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. +;; 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen ;; Keywords: news @@ -10,7 +10,7 @@ ;; GNU Emacs is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation; either version 2, or (at your option) +;; the Free Software Foundation; either version 3, or (at your option) ;; any later version. ;; GNU Emacs is distributed in the hope that it will be useful, @@ -360,22 +360,24 @@ Valid types include `google', `dejanews', and `gmane'.") (goto-char (point-max)) (widen) (narrow-to-region (point) - (search-forward "\" \n\t]+\\)[^<]*]+next" + "]+href=\"\n?\\([^>\" \n\t]+\\)[^<]*]+src=[^>]+next" nil t)) (>= i nnweb-max-hits)) (setq more nil) @@ -438,7 +440,8 @@ Valid types include `google', `dejanews', and `gmane'.") "?" (mm-url-encode-www-form-urlencoded `(("q" . ,search) - ("num" . "100") + ("num" . ,(number-to-string + (min 100 nnweb-max-hits))) ("hq" . "") ("hl" . "en") ("lr" . "") @@ -478,7 +481,7 @@ Valid types include `google', `dejanews', and `gmane'.") (from (mail-header-from header)) (subject (mail-header-subject header)) (rfc2047-encoding-type 'mime)) - (when (string-match " \\([^:]+\\):\\([0-9]+\\)" xref) + (when (string-match " \\([^:]+\\)[:/]\\([0-9]+\\)" xref) (mail-header-set-xref header (format "http://article.gmane.org/%s/%s/raw" @@ -494,11 +497,8 @@ Valid types include `google', `dejanews', and `gmane'.") (rfc2047-encode-string subject)) (unless (nnweb-get-hashtb (mail-header-xref header)) - (push - (list - (incf (cdr active)) - header) - map) + (mail-header-set-number header (incf (cdr active))) + (push (list (mail-header-number header) header) map) (nnweb-set-hashtb (cadar map) (car map)))))) (forward-line 1))) (nnheader-message 7 "Searching Gmane...done") @@ -523,7 +523,9 @@ Valid types include `google', `dejanews', and `gmane'.") "?" (mm-url-encode-www-form-urlencoded `(("query" . ,search) - ("HITSPERPAGE" . ,(number-to-string nnweb-max-hits)))))) + ("HITSPERPAGE" . ,(number-to-string nnweb-max-hits)) + ;;("TOPDOC" . "1000") + )))) (setq buffer-file-name nil) (set-buffer-multibyte t) (mm-decode-coding-region (point-min) (point-max) 'utf-8)