Mercurial > emacs
changeset 110333:c2883613e1b5
Fixed up nnrss group activation, and removed moreover stuff.
author | Katsumi Yamaoka <yamaoka@jpl.org> |
---|---|
date | Tue, 14 Sep 2010 13:44:44 +0000 |
parents | 3b63737368e5 |
children | 41bf9b6f3b91 |
files | lisp/gnus/ChangeLog lisp/gnus/gnus-start.el lisp/gnus/nnrss.el |
diffstat | 3 files changed, 26 insertions(+), 48 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/gnus/ChangeLog Tue Sep 14 13:50:15 2010 +0200 +++ b/lisp/gnus/ChangeLog Tue Sep 14 13:44:44 2010 +0000 @@ -1,3 +1,15 @@ +2010-09-14 Lars Magne Ingebrigtsen <larsi@gnus.org> + + * gnus-start.el (gnus-read-active-for-groups): Reverted the previous + change. + + * nnrss.el (nnrss-request-list): Removed this function and related + functions, including the moreover stuff. + +2010-09-14 Lars Magne Ingebrigtsen <larsi@gnus.org> + + * nnrss.el (nnrss-retrieve-groups): New function. + 2010-09-14 Juanma Barranquero <lekktu@gmail.com> * .dir-locals.el: Add no-byte-compile cookie.
--- a/lisp/gnus/gnus-start.el Tue Sep 14 13:50:15 2010 +0200 +++ b/lisp/gnus/gnus-start.el Tue Sep 14 13:44:44 2010 +0000 @@ -1808,11 +1808,11 @@ (dolist (info infos (nreverse groups)) (push (gnus-group-real-name (gnus-info-group info)) groups)) method))) - ((gnus-check-backend-function 'request-scan (car method)) + ((gnus-check-backend-function 'request-list (car method)) (gnus-read-active-file-1 method nil infos)) (t (dolist (info infos) - (gnus-activate-group (gnus-info-group info) nil nil method)))))) + (gnus-activate-group (gnus-info-group info) nil nil method t)))))) ;; Create a hash table out of the newsrc alist. The `car's of the ;; alist elements are used as keys.
--- a/lisp/gnus/nnrss.el Tue Sep 14 13:50:15 2010 +0200 +++ b/lisp/gnus/nnrss.el Tue Sep 14 13:44:44 2010 +0000 @@ -342,11 +342,6 @@ ;; we return the article number. (cons nnrss-group (car e)))))) -(deffoo nnrss-request-list (&optional server) - (nnrss-possibly-change-group nil server) - (nnrss-generate-active) - t) - (deffoo nnrss-open-server (server &optional defs connectionless) (nnrss-read-server-data server) (nnoo-change-server 'nnrss server defs) @@ -397,6 +392,18 @@ (insert (car elem) "\t" (third elem) "\n")))) t) +(deffoo nnrss-retrieve-groups (groups &optional server) + (nnrss-possibly-change-group nil server) + (dolist (group groups) + (nnrss-check-group group server)) + (save-excursion + (set-buffer nntp-server-buffer) + (erase-buffer) + (dolist (group groups) + (let ((elem (assoc group nnrss-server-data))) + (insert (format "%S %s 1 y\n" group (or (cadr elem) 0))))) + 'active)) + (nnoo-define-skeleton nnrss) ;;; Internal functions @@ -479,20 +486,6 @@ (nnrss-read-group-data group server) (setq nnrss-group group))) -(defvar nnrss-extra-categories '(nnrss-snarf-moreover-categories)) - -(defun nnrss-generate-active () - (when (y-or-n-p "Fetch extra categories? ") - (mapc 'funcall nnrss-extra-categories)) - (save-excursion - (set-buffer nntp-server-buffer) - (erase-buffer) - (dolist (elem nnrss-group-alist) - (insert (prin1-to-string (car elem)) " 0 1 y\n")) - (dolist (elem nnrss-server-data) - (unless (assoc (car elem) nnrss-group-alist) - (insert (prin1-to-string (car elem)) " 0 1 y\n"))))) - (autoload 'timezone-parse-date "timezone") (defun nnrss-normalize-date (date) @@ -868,33 +861,6 @@ (append nnheader-file-name-translation-alist '((?' . ?_))))) (nnheader-translate-file-chars name))) -(defvar nnrss-moreover-url - "http://w.moreover.com/categories/category_list_rss.html" - "The url of moreover.com categories.") - -(defun nnrss-snarf-moreover-categories () - "Snarf RSS links from moreover.com." - (interactive) - (let (category name url changed) - (with-temp-buffer - (nnrss-insert nnrss-moreover-url) - (goto-char (point-min)) - (while (re-search-forward - "<a name=\"\\([^\"]+\\)\">\\|<a href=\"\\(http://[^\"]*moreover\\.com[^\"]+page\\?c=\\([^\"&]+\\)&o=rss\\)" nil t) - (if (match-string 1) - (setq category (match-string 1)) - (setq url (match-string 2) - name (mm-url-decode-entities-string - (rfc2231-decode-encoded-string - (match-string 3)))) - (if category - (setq name (concat category "." name))) - (unless (assoc name nnrss-server-data) - (setq changed t) - (push (list name 0 url) nnrss-server-data))))) - (if changed - (nnrss-save-server-data "")))) - (defun nnrss-node-text (namespace local-name element) (let* ((node (assq (intern (concat namespace (symbol-name local-name))) element))