*** empty log message ***
authorLars Magne Ingebrigtsen <larsi@gnus.org>
Sun, 7 Nov 1999 23:31:44 +0000 (23:31 +0000)
committerLars Magne Ingebrigtsen <larsi@gnus.org>
Sun, 7 Nov 1999 23:31:44 +0000 (23:31 +0000)
lisp/ChangeLog
lisp/gnus-start.el
lisp/gnus-topic.el
lisp/nnslashdot.el
texi/gnus.texi

index bad71c8..b13a906 100644 (file)
@@ -1,3 +1,14 @@
+1999-11-08 00:06:02  Lars Magne Ingebrigtsen  <larsi@gnus.org>
+
+       * nnslashdot.el (nnslashdot-retrieve-headers): Don't fetch too
+       many articles.
+
+       * gnus-start.el (gnus-active-to-gnus-format): Intern strings group 
+       names.
+
+       * nnslashdot.el (nnslashdot-request-newgroups): New function.
+       (nnslashdot-request-list): Not moderated.
+
 1999-11-07  Simon Josefsson  <jas@pdc.kth.se>
 
        * nnimap.el (nnimap-open-server): Remove error signal if
@@ -8,6 +19,10 @@
 
 1999-11-07 01:17:53  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
+       * gnus-start.el (gnus-subscribe-newsgroup-method): Doc fix. 
+
+       * gnus-topic.el (gnus-subscribe-topic): New function.
+
        * nnslashdot.el (nnslashdot-request-list): Give out extended group 
        names.
 
index 7b63a8d..95a31db 100644 (file)
@@ -253,7 +253,9 @@ inserts new groups at the beginning of the list of groups;
 alphabetic order; `gnus-subscribe-hierarchically' inserts new groups
 in hierarchical newsgroup order; `gnus-subscribe-interactively' asks
 for your decision; `gnus-subscribe-killed' kills all new groups;
-`gnus-subscribe-zombies' will make all new groups into zombies."
+`gnus-subscribe-zombies' will make all new groups into zombies;
+`gnus-subscribe-topics' will enter groups into the topics that
+claim them."
   :group 'gnus-group-new
   :type '(radio (function-item gnus-subscribe-randomly)
                (function-item gnus-subscribe-alphabetically)
@@ -261,6 +263,7 @@ for your decision; `gnus-subscribe-killed' kills all new groups;
                (function-item gnus-subscribe-interactively)
                (function-item gnus-subscribe-killed)
                (function-item gnus-subscribe-zombies)
+               (function-item gnus-subscribe-topics)
                function))
 
 (defcustom gnus-subscribe-options-newsgroup-method
@@ -1775,18 +1778,25 @@ newsgroup."
       (let ((prefix (gnus-group-prefixed-name "" method)))
        (goto-char (point-min))
        (while (and (not (eobp))
-                   (progn (insert prefix)
-                          (zerop (forward-line 1)))))))
+                   (progn
+                     (when (= (following-char) ?\")
+                       (forward-char 1))
+                     (insert prefix)
+                     (zerop (forward-line 1)))))))
     ;; Store the active file in a hash table.
     (goto-char (point-min))
     (let (group max min)
       (while (not (eobp))
-       (condition-case ()
+       (condition-case err
            (progn
              (narrow-to-region (point) (gnus-point-at-eol))
              ;; group gets set to a symbol interned in the hash table
              ;; (what a hack!!) - jwz
              (setq group (let ((obarray hashtb)) (read cur)))
+             ;; ### The extended group name scheme makes
+             ;; the previous optimization strategy sort of pointless...
+             (when (stringp group)
+               (setq group (intern group hashtb)))
              (if (and (numberp (setq max (read cur)))
                       (numberp (setq min (read cur)))
                       (progn
@@ -1804,7 +1814,7 @@ newsgroup."
                      (gnus-sethash (symbol-name group) t
                                    gnus-moderated-hashtb)))
                (set group nil)))
-         (error
+         (quit
           (and group
                (symbolp group)
                (set group nil))
index 57452c7..68ef130 100644 (file)
@@ -1531,6 +1531,19 @@ If REVERSE, reverse the sorting order."
     (gnus-group-list-groups)
     (gnus-topic-goto-topic current)))
 
+(defun gnus-subscribe-topics (newsgroup)
+  (catch 'end
+    (let (match gnus-group-change-level-function)
+      (dolist (topic (gnus-topic-list))
+       (when (and (setq match (cdr (assq 'subscribe
+                                         (gnus-topic-parameters topic))))
+                  (string-match match newsgroup))
+         ;; Just subscribe the group.
+         (gnus-subscribe-alphabetically newsgroup)
+         ;; Add the group to the topic.
+         (nconc (assoc topic gnus-topic-alist) (list newsgroup))
+         (throw 'end t))))))
+         
 (provide 'gnus-topic)
 
 ;;; gnus-topic.el ends here
index 8d2c2e3..433e1ea 100644 (file)
            (push s startats)))
        (unless startats
          (push 1 startats)))
-      (dolist (start (sort startats '<))
+      (setq startats (sort startats '<))
+      (while (and (setq start (pop startats))
+                 (< start last))
        (setq point (goto-char (point-max)))
        (url-insert-file-contents
         (format nnslashdot-comments-url sid nnslashdot-threshold start))
       (erase-buffer)
       (dolist (elem nnslashdot-groups)
        (insert (prin1-to-string (car elem))
-               " " (number-to-string (cadr elem)) " 1 m\n")))
+               " " (number-to-string (cadr elem)) " 1 y\n")))
     t))
 
+(deffoo nnslashdot-request-newgroups (date &optional server)
+  (nnslashdot-request-list server))
+
 (deffoo nnslashdot-asynchronous-p ()
   nil)
 
index f0cefbc..ffece7e 100644 (file)
@@ -722,6 +722,19 @@ to will be subscribed hierarchically.
 @vindex gnus-subscribe-killed
 Kill all new groups.
 
+@item gnus-subscribe-topics
+@vindex gnus-subscribe-topics
+Put the groups into the topic that has a matching @code{subscribe} topic 
+parameter (@pxref{Topic Parameters}).  For instance, a @code{subscribe}
+topic parameter that looks like
+
+@example
+"nntp\\+somewhere"
+@end example
+
+will mean that all groups that match that regex will be subscribed under 
+that topic.
+
 @end table
 
 @vindex gnus-subscribe-hierarchical-interactive