*** empty log message ***
authorLars Magne Ingebrigtsen <larsi@gnus.org>
Tue, 4 Mar 1997 08:15:38 +0000 (08:15 +0000)
committerLars Magne Ingebrigtsen <larsi@gnus.org>
Tue, 4 Mar 1997 08:15:38 +0000 (08:15 +0000)
16 files changed:
lisp/ChangeLog
lisp/gnus-cache.el
lisp/gnus-gl.el
lisp/gnus-msg.el
lisp/gnus-nocem.el
lisp/gnus-score.el
lisp/gnus-topic.el
lisp/gnus-vis.el
lisp/gnus.el
lisp/nnmail.el
lisp/nnmbox.el
lisp/nnsoup.el
lisp/nnspool.el
lisp/nntp.el
lisp/nnvirtual.el
texi/gnus.texi

index 0ed0b0f..f5ea5f1 100644 (file)
@@ -1,5 +1,78 @@
+Sat Mar 16 14:46:29 1996  Brad Miller  <bmiller@cs.umn.edu>
+
+       * gnus-gl.el: New version.
+
+Sat Mar 16 13:28:57 1996  Lars Magne Ingebrigtsen  <larsi@eistla.ifi.uio.no>
+
+       * gnus-score.el (gnus-score-body): Would break on nil
+       `gnus-scores-articles'? 
+
+       * gnus.el: All the backend interface functions should take virtual
+       server names.
+
+       * gnus-msg.el (gnus-post-method): Find the real method.
+
+       * gnus.el (gnus-summary-go-to-next-thread): New definition.
+       (gnus-summary-next-thread): Use it.
+       (gnus-prefix-to-server): New function.
+
+       * gnus-vis.el (gnus-signature-toggle): Use new substs.
+       (gnus-article-highlight-signature): Would make check point wrong.
+
+       * gnus.el (gnus-hide-text): New subst.
+       (gnus-hide-text-type): New function.
+       (gnus-unhide-text): New subst.
+       (gnus-article-show-all-headers, gnus-article-hide-headers,
+       gnus-article-hide-pgp, gnus-article-hide-header,
+       gnus-article-hide-boring-headers): Use them.
+
+Fri Mar 15 07:39:10 1996  Lars Magne Ingebrigtsen  <lars@eyesore.no>
+
+       * nntp.el (nntp-send-xover-command): Would bug out on
+       single-article groups.
+
+       * gnus.el (gnus-group-prepare-flat): Deal with unactivated groups.
+       * gnus-topic.el (gnus-topic-find-groups): Ditto.
+
+Thu Mar 14 05:24:42 1996  Lars Magne Ingebrigtsen  <lars@eyesore.no>
+
+       * nnspool.el (nnspool-retrieve-headers): Use default-directory to
+       avoid creating so many garbage strings.
+
+       * nnmail.el (nnmail-split-incoming): Make sure the buffer isn't
+       empty before starting treatment.
+       (nnmail-get-new-mail): Open/close cache here.
+
+       * gnus-msg.el (gnus-news-followup): Use markers for positions.
+
+       * gnus.el (gnus-setup-news): Read NoCeM.
+
+Wed Mar 13 03:26:44 1996  Lars Magne Ingebrigtsen  <lars@eyesore.no>
+
+       * gnus.el (gnus-functionp): Made into a subst.
+       (gnus-all-windows-visible-p): Non-recursive implementation.
+
+       * nnsoup.el (nnsoup-request-list): Don't use `format'.
+
+       * gnus.el (gnus-update-format-specifications): Would recompute all
+       specs every time.
+       (gnus-gnus-to-newsrc-format): Don't call `gnus-server-equal' for
+       each group.
+
+       * nnspool.el (nnspool-retrieve-headers): Don't call so many
+       functions. 
+
+       * gnus-cache.el (gnus-cache-retrieve-headers): Would do too much
+       work. 
+
+       * gnus-topic.el (gnus-topic-goto-topic): Faster.
+
+       * gnus.el: Don't downcase Message-IDs before threading.
+
 Tue Mar 12 01:42:11 1996  Lars Magne Ingebrigtsen  <larsi@eistla.ifi.uio.no>
 
+       * gnus.el: September Gnus v0.52 is released.
+
        * gnus.el (gnus-article-strip-leading-blank-lines): New command. 
 
        * gnus-score.el (gnus-score-score-files-1): Message.
index b5c7aaa..c0ad25e 100644 (file)
@@ -241,43 +241,48 @@ variable to \"^nnml\".")
 
 (defun gnus-cache-retrieve-headers (articles group &optional fetch-old)
   "Retrieve the headers for ARTICLES in GROUP."
-  (let* ((cached 
-         (setq gnus-newsgroup-cached (gnus-cache-articles-in-group group)))
-        (uncached-articles (gnus-sorted-intersection
-                            (gnus-sorted-complement articles cached)
-                            articles))
-        (cache-file (gnus-cache-file-name group ".overview"))
-        type)
-    ;; We first retrieve all the headers that we don't have in 
-    ;; the cache.
-    (let ((gnus-use-cache nil))
-      (setq type (and articles 
-                     (gnus-retrieve-headers 
-                      uncached-articles group fetch-old))))
-    (gnus-cache-save-buffers)
-    ;; Then we insert the cached headers.
-    (save-excursion
-      (cond
-       ((not (file-exists-p cache-file))
-       ;; There are no cached headers.
-       type)
-       ((null type)
-       ;; There were no uncached headers (or retrieval was 
-       ;; unsuccessful), so we use the cached headers exclusively.
-       (set-buffer nntp-server-buffer)
-       (erase-buffer)
-       (insert-file-contents cache-file)
-       'nov)
-       ((eq type 'nov)
-       ;; We have both cached and uncached NOV headers, so we
-       ;; braid them.
-       (gnus-cache-braid-nov group cached)
-       type)
-       (t
-       ;; We braid HEADs.
-       (gnus-cache-braid-heads group (gnus-sorted-intersection
-                                      cached articles))
-       type)))))
+  (let ((cached 
+        (setq gnus-newsgroup-cached (gnus-cache-articles-in-group group))))
+    (if (not cached)
+       ;; No cached articles here, so we just retrieve them
+       ;; the normal way.
+       (let ((gnus-use-cache nil))
+         (gnus-retrieve-headers articles group fetch-old))
+      (let ((uncached-articles (gnus-sorted-intersection
+                               (gnus-sorted-complement articles cached)
+                               articles))
+           (cache-file (gnus-cache-file-name group ".overview"))
+           type)
+       ;; We first retrieve all the headers that we don't have in 
+       ;; the cache.
+       (let ((gnus-use-cache nil))
+         (setq type (and articles 
+                         (gnus-retrieve-headers 
+                          uncached-articles group fetch-old))))
+       (gnus-cache-save-buffers)
+       ;; Then we insert the cached headers.
+       (save-excursion
+         (cond
+          ((not (file-exists-p cache-file))
+           ;; There are no cached headers.
+           type)
+          ((null type)
+           ;; There were no uncached headers (or retrieval was 
+           ;; unsuccessful), so we use the cached headers exclusively.
+           (set-buffer nntp-server-buffer)
+           (erase-buffer)
+           (insert-file-contents cache-file)
+           'nov)
+          ((eq type 'nov)
+           ;; We have both cached and uncached NOV headers, so we
+           ;; braid them.
+           (gnus-cache-braid-nov group cached)
+           type)
+          (t
+           ;; We braid HEADs.
+           (gnus-cache-braid-heads group (gnus-sorted-intersection
+                                          cached articles))
+           type)))))))
 
 (defun gnus-cache-enter-article (&optional n)
   "Enter the next N articles into the cache.
@@ -455,7 +460,9 @@ Returns the list of articles removed."
        (erase-buffer)
        (insert-file-contents (gnus-cache-file-name group (car cached)))
        (goto-char (point-min))
-       (insert "220 " (int-to-string (car cached)) " Article retrieved.\n")
+       (insert "220 ")
+       (princ (car cached) (current-buffer))
+       (insert " Article retrieved.\n")
        (search-forward "\n\n" nil 'move)
        (delete-region (point) (point-max))
        (forward-char -1)
index baf0e67..1168356 100644 (file)
   "%U%R%z%l%I%(%[%4L: %-20,20n%]%) %s\n"
   "*The line format spec in summary GroupLens mode buffers.")
 
+(defvar gnus-summary-grouplens-lab-line-format
+  "%U%R%z%uL%I%(%[%4L: %-20,20n%]%) %s\n"
+  "*The line format spec in summary GroupLens mode buffers.")
+
 (defvar grouplens-pseudonym ""
   "User's pseudonym.  This pseudonym is obtained during the registration 
 process")
@@ -515,10 +519,9 @@ recommend using both scores and grouplens predictions together."
     (let* ((rate-string (make-string 12 ? ))
            (mid (aref header (nth 1 (assoc "message-id" gnus-header-index))))
            (hashent (gethash mid grouplens-current-hashtable))
-           (pred (nth 0 hashent))
+           (pred (or (nth 0 hashent) 0))
            (low (nth 1 hashent))
            (high (nth 2 hashent)))
-      (gnus-message 5 (concat "mid = " mid))
       ;; Init rate-string
       (aset rate-string 0 ?|) 
       (aset rate-string 11 ?|)
@@ -759,7 +762,7 @@ recommend using both scores and grouplens predictions together."
 ;;          BUG REPORTING
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
-(defconst gnus-gl-version "gnus-gl.el 2.9")
+(defconst gnus-gl-version "gnus-gl.el 2.10")
 (defconst gnus-gl-maintainer-address "grouplens-bug@cs.umn.edu")
 (defun gnus-gl-submit-bug-report ()
   "Submit via mail a bug report on gnus-gl"
@@ -843,7 +846,9 @@ recommend using both scores and grouplens predictions together."
                   '(lambda() 
                      (bbb-build-mid-scores-alist gnus-newsgroup-name))))
       (make-local-variable 'gnus-summary-line-format)
-      (setq gnus-summary-line-format gnus-summary-grouplens-line-format)
+      (if gnus-grouplens-override-scoring
+       
+         (setq gnus-summary-line-format gnus-summary-grouplens-lab-line-format))
       (make-local-variable 'gnus-summary-line-format-spec)
 
       ;; Set up the menu.
@@ -860,4 +865,3 @@ recommend using both scores and grouplens predictions together."
 (provide 'gnus-gl)
 
 ;;; end gnus-gl.el
-
index 78969f2..9a24e29 100644 (file)
@@ -2333,10 +2333,11 @@ If INHIBIT-PROMPT, never prompt for a Subject."
                  (save-excursion
                    (gnus-copy-article-buffer)
                    (mail-yank-original nil)
-                   (setq end (point)))
+                   (setq end (set-marker (make-marker) (point))))
                  (or mail-yank-hooks mail-citation-hook
                      (run-hooks 'news-reply-header-hook))
                  (goto-char end)
+                 (set-marker end nil)
                  (setq yank (cdr yank))))
              (goto-char last))
            (gnus-configure-windows 'followup-yank 'force))
@@ -2615,18 +2616,17 @@ The source file has to be in the Emacs load path."
       (insert "------------------ Environment follows ------------------\n\n"))
     (while olist
       (if (boundp (car olist))
-         (insert 
-          (condition-case ()
-              (pp-to-string
-               `(setq ,(car olist)
-                      ,(if (or (consp (setq sym (symbol-value (car olist))))
-                               (and (symbolp sym)
-                                    (not (or (eq sym nil)
-                                             (eq sym t)))))
-                           (list 'quote (symbol-value (car olist)))
-                         (symbol-value (car olist)))))
-            (error
-             (format "(setq %s 'whatever)\n" (car olist)))))
+         (condition-case ()
+             (pp `(setq ,(car olist)
+                        ,(if (or (consp (setq sym (symbol-value (car olist))))
+                                 (and (symbolp sym)
+                                      (not (or (eq sym nil)
+                                               (eq sym t)))))
+                             (list 'quote (symbol-value (car olist)))
+                           (symbol-value (car olist))))
+                 (current-buffer))
+           (error
+            (format "(setq %s 'whatever)\n" (car olist))))
        (insert ";; (makeunbound '" (symbol-name (car olist)) ")\n"))
       (setq olist (cdr olist)))
     (insert "\n\n")
@@ -2805,7 +2805,7 @@ Headers will be generated before sending."
                          ;; If the group doesn't exist, we assume
                          ;; it's an archive group...
                          gnus-message-archive-method)
-                        (t (gnus-find-method-for-group group)))))
+                        (t (gnus-group-method group)))))
            (unless (gnus-request-group group t method)
              (gnus-request-create-group group method))
            (gnus-check-server method)
index 0d18575..73a7b34 100644 (file)
   (when (and gnus-nocem-alist
             gnus-nocem-touched-alist)
     (nnheader-temp-write (gnus-nocem-cache-file)
-      (insert (prin1-to-string
-              `(setq gnus-nocem-alist ',gnus-nocem-alist))))
+      (prin1 `(setq gnus-nocem-alist ',gnus-nocem-alist) (current-buffer)))
     (setq gnus-nocem-touched-alist nil)))
 
 (defun gnus-nocem-save-active ()
   "Save the NoCeM active file."
   (nnheader-temp-write (gnus-nocem-active-file)
-    (insert (prin1-to-string
-            `(setq gnus-nocem-active ',gnus-nocem-active)))))
+    (prin1 `(setq gnus-nocem-active ',gnus-nocem-active) (current-buffer))))
 
 (defun gnus-nocem-alist-to-hashtb ()
   "Create a hashtable from the Message-IDs we have."
index d7a2655..9aaa74d 100644 (file)
@@ -1290,7 +1290,9 @@ SCORE is the score to add."
     (save-restriction
       (let* ((buffer-read-only nil)
             (articles gnus-scores-articles)
-            (last (mail-header-number (caar gnus-scores-articles)))
+            (last (if (caar gnus-scores-articles)
+                      (mail-header-number (caar gnus-scores-articles))
+                    0))
             (all-scores scores)
             (request-func (cond ((string= "head" (downcase header))
                                  'gnus-request-head)
@@ -1833,7 +1835,7 @@ This mode is an extended emacs-lisp mode.
 (defun gnus-score-edit-insert-date ()
   "Insert date in numerical format."
   (interactive)
-  (insert (int-to-string (gnus-day-number (current-time-string)))))
+  (princ (gnus-day-number (current-time-string)) (current-buffer)))
 
 (defun gnus-score-pretty-print ()
   "Format the current score file."
index 1cfb9c4..a8c8e93 100644 (file)
@@ -1,4 +1,4 @@
-;;; gnus-topic.el --- a folding minor mode for Gnus group buffers
+;; gnus-topic.el --- a folding minor mode for Gnus group buffers
 ;; Copyright (C) 1995,96 Free Software Foundation, Inc.
 
 ;; Author: Ilja Weis <kult@uni-paderborn.de>
@@ -78,7 +78,8 @@ with some simple extensions.
 
 (defun gnus-group-topic-name ()
   "The name of the topic on the current line."
-  (get-text-property (gnus-point-at-bol) 'gnus-topic))
+  (let ((group (get-text-property (gnus-point-at-bol) 'gnus-topic)))
+    (and group (symbol-name group))))
 
 (defun gnus-group-topic-level ()
   "The level of the topic on the current line."
@@ -218,9 +219,9 @@ articles in the topic and its subtopics."
        (<= clevel level) 
        (>= clevel lowest)              ; Is inside the level we want.
        (or all
-          (and gnus-group-list-inactive-groups
-               (eq unread t))
-          (> unread 0)
+          (if (eq unread t)
+              gnus-group-list-inactive-groups
+            (> unread 0))
           (and gnus-list-groups-with-ticked-articles
                (cdr (assq 'tick (gnus-info-marks info))))
                                        ; Has right readedness.
@@ -273,7 +274,7 @@ articles in the topic and its subtopics."
 
 (defun gnus-group-topic-p ()
   "Return non-nil if the current line is a topic."
-  (get-text-property (gnus-point-at-bol) 'gnus-topic))
+  (gnus-group-topic-name))
 
 (defun gnus-topic-visible-p ()
   "Return non-nil if the current topic is visible."
@@ -293,7 +294,7 @@ articles in the topic and its subtopics."
      (prog1 (1+ (point)) 
        (eval gnus-topic-line-format-spec)
        (gnus-topic-remove-excess-properties))
-     (list 'gnus-topic name
+     (list 'gnus-topic (intern name)
           'gnus-topic-level level
           'gnus-active active-topic
           'gnus-topic-visible visiblep))))
@@ -414,14 +415,9 @@ articles in the topic and its subtopics."
     out))
 
 (defun gnus-topic-goto-topic (topic)
-  (let ((orig (point)))
-    (goto-char (point-min))
-    (while (and (not (equal topic (gnus-group-topic-name)))
-               (zerop (forward-line 1))))
-    (or (gnus-group-topic-name)
-       (progn
-         (goto-char orig)
-         nil))))
+  (when topic
+    (gnus-goto-char (text-property-any (point-min) (point-max)
+                                      'gnus-topic (intern topic)))))
   
 (defun gnus-topic-update-topic ()
   "Update all parent topics to the current group."
@@ -800,7 +796,7 @@ group."
 (defun gnus-topic-goto-next-group (group props)
   "Go to group or the next group after group."
   (if (null group)
-      (gnus-topic-goto-topic (cadr (memq 'gnus-topic props)))
+      (gnus-topic-goto-topic (symbol-name (cadr (memq 'gnus-topic props))))
     (if (gnus-group-goto-group group)
        t
       ;; The group is no longer visible.
index 91b3fc1..472c137 100644 (file)
@@ -1332,8 +1332,8 @@ It does this by highlighting everything after
          (widen)
          (re-search-backward gnus-signature-separator nil t)
          (let ((start (match-beginning 0))
-               (end (set-marker (make-marker) (match-end 0))))
-           (gnus-article-add-button start end 'gnus-signature-toggle
+               (end (set-marker (make-marker) (1+ (match-end 0)))))
+           (gnus-article-add-button start (1- end) 'gnus-signature-toggle
                                     end)))))))
 
 (defun gnus-article-add-buttons (&optional force)
@@ -1434,8 +1434,8 @@ specified by `gnus-button-alist'."
     (let ((buffer-read-only nil)
          (inhibit-point-motion-hooks t))
       (if (get-text-property end 'invisible)
-         (remove-text-properties end (point-max) gnus-hidden-properties)
-       (add-text-properties end (point-max) gnus-hidden-properties)))))
+         (gnus-unhide-text end (point-max))
+       (gnus-hide-text end (point-max) gnus-hidden-properties)))))
 
 (defun gnus-button-entry ()
   ;; Return the first entry in `gnus-button-alist' matching this place.
index 8b382b7..ee4c662 100644 (file)
@@ -1715,7 +1715,7 @@ variable (string, integer, character, etc).")
   "gnus-bug@ifi.uio.no (The Gnus Bugfixing Girls + Boys)"
   "The mail address of the Gnus maintainers.")
 
-(defconst gnus-version "September Gnus v0.52"
+(defconst gnus-version "September Gnus v0.53"
   "Version number for this version of Gnus.")
 
 (defvar gnus-info-nodes
@@ -2157,6 +2157,11 @@ Thank you for your help in stamping out bugs.
       (substring subject (match-end 0))
     subject))
 
+(defsubst gnus-functionp (form)
+  "Return non-nil if FORM is funcallable."
+  (or (and (symbolp form) (fboundp form))
+      (and (listp form) (eq (car form) 'lambda))))
+
 (defsubst gnus-goto-char (point)
   (and point (goto-char point)))
 
@@ -2510,6 +2515,8 @@ Thank you for your help in stamping out bugs.
          (push (list type new-format val) gnus-format-specs))
        (set (intern (format "gnus-%s-line-format-spec" type)) val))))
 
+  (push (cons 'version emacs-version) gnus-format-specs)
+
   (gnus-update-group-mark-positions)
   (gnus-update-summary-mark-positions))
 
@@ -3351,47 +3358,51 @@ If RE-ONLY is non-nil, strip leading `Re:'s only."
       (gnus-configure-frame split (get-buffer-window (current-buffer))))))
 
 (defun gnus-all-windows-visible-p (split)
-  (when (vectorp split)
-    (setq split (append split nil)))
-  (when (or (consp (car split))
-           (vectorp (car split)))
-    (push 1.0 split)
-    (push 'vertical split))
-  ;; The SPLIT might be something that is to be evaled to
-  ;; return a new SPLIT.
-  (while (and (not (assq (car split) gnus-window-to-buffer))
-             (gnus-functionp (car split)))
-    (setq split (eval split)))
-  (let* ((type (elt split 0)))
-    (cond
-     ((null split)
-      t)
-     ((not (or (eq type 'horizontal) (eq type 'vertical) (eq type 'frame)))
-      (let ((buffer (cond ((stringp type) type)
-                         (t (cdr (assq type gnus-window-to-buffer)))))
-           win buf)
+  "Say whether all buffers in SPLIT are currently visible.
+In particular, the value returned will be the window that
+should have point."
+  (let ((stack (list split))
+       (all-visible t)
+       type buffer win buf)
+    (while (and (setq split (pop stack))
+               all-visible)
+      ;; Be backwards compatible.
+      (when (vectorp split)
+       (setq split (append split nil)))
+      (when (or (consp (car split))
+               (vectorp (car split)))
+       (push 1.0 split)
+       (push 'vertical split))
+      ;; The SPLIT might be something that is to be evaled to
+      ;; return a new SPLIT.
+      (while (and (not (assq (car split) gnus-window-to-buffer))
+                 (gnus-functionp (car split)))
+       (setq split (eval split)))
+
+      (setq type (elt split 0))
+      (cond
+       ;; Nothing here.
+       ((null split) t)
+       ;; A buffer.
+       ((not (memq type '(horizontal vertical frame)))
+       (setq buffer (cond ((stringp type) type)
+                          (t (cdr (assq type gnus-window-to-buffer)))))
        (unless buffer
          (error "Illegal buffer type: %s" type))
-       (when (setq buf (get-buffer (if (symbolp buffer) (symbol-value buffer)
+       (when (setq buf (get-buffer (if (symbolp buffer)
+                                       (symbol-value buffer)
                                      buffer)))
          (setq win (get-buffer-window buf t)))
-       (when win
-         (if (memq 'point split)
-             win
-           t))))
-     (t
-      (when (eq type 'frame)
-       (setq gnus-frame-split-p t))
-      (let ((n (mapcar 'gnus-all-windows-visible-p
-                      (cddr split)))
-           (win t))
-       (while n
-         (cond ((windowp (car n))
-                (setq win (car n)))
-               ((null (car n))
-                (setq win nil)))
-         (setq n (cdr n)))
-       win)))))
+       (if win
+           (when (memq 'point split)
+               (setq all-visible win))
+         (setq all-visible nil)))
+       (t
+       (when (eq type 'frame)
+         (setq gnus-frame-split-p t))
+       (setq stack (append (cddr split) stack)))))
+    (unless (eq all-visible t)
+      all-visible)))
 
 (defun gnus-window-top-edge (&optional window)
   (nth 1 (window-edges window)))
@@ -3655,11 +3666,6 @@ simple-first is t, first argument is already simplified."
     ;; from `message'.
     (apply 'format args)))
 
-(defun gnus-functionp (form)
-  "Return non-nil if FORM is funcallable."
-  (or (and (symbolp form) (fboundp form))
-      (and (listp form) (eq (car form) 'lambda))))
-
 ;; Generate a unique new group name.
 (defun gnus-generate-new-group-name (leaf)
   (let ((name leaf)
@@ -3668,6 +3674,22 @@ simple-first is t, first argument is already simplified."
       (setq name (concat leaf "<" (int-to-string (setq num (1+ num))) ">")))
     name))
 
+(defsubst gnus-hide-text (b e props)
+  "Set text PROPS on the B to E region, extending `intangble' 1 past B."
+  (add-text-properties b e props)
+  (when (memq 'intangible props)
+    (put-text-property (1- b) b 'intangible (cddr (memq 'intangible props)))))
+
+(defsubst gnus-unhide-text (b e)
+  "Remove hidden text properties from region between B and E."
+  (remove-text-properties b e gnus-hidden-properties)
+  (when (memq 'intangible gnus-hidden-properties)
+    (put-text-property (1- b) b 'intangible nil)))
+
+(defun gnus-hide-text-type (b e type)
+  "Hide text of TYPE between B and E."
+  (gnus-hide-text b e (cons 'gnus-type (cons type gnus-hidden-properties))))
+
 ;; Find out whether the gnus-visual TYPE is wanted.
 (defun gnus-visual-p (&optional type class)
   (and gnus-visual                     ; Has to be non-nil, at least.
@@ -4427,9 +4449,9 @@ If REGEXP, only list groups matching REGEXP."
               (<= (setq clevel (gnus-info-level info)) level)
               (>= clevel lowest)
               (or all                  ; We list all groups?
-                  (and gnus-group-list-inactive-groups
-                       (eq unread t))  ; We list unactivated groups
-                  (> unread 0)         ; We list groups with unread articles
+                  (if (eq unread t)    ; Unactivated?
+                      gnus-group-list-inactive-groups ; We list unactivated 
+                    (> unread 0))      ; We list groups with unread articles
                   (and gnus-list-groups-with-ticked-articles
                        (cdr (assq 'tick (gnus-info-marks info))))
                                        ; And groups with tickeds
@@ -6374,14 +6396,14 @@ If N is negative, this group and the N-1 previous groups will be checked."
            (string-match regexp (symbol-name group))
            (setq groups (cons (symbol-name group) groups))))
      gnus-active-hashtb)
-    ;; Go through all descriptions that are known to Gnus.
-    (if search-description
-       (mapatoms
-        (lambda (group)
-          (and (string-match regexp (symbol-value group))
-               (gnus-active (symbol-name group))
-               (setq groups (cons (symbol-name group) groups))))
-        gnus-description-hashtb))
+    ;; Also go through all descriptions that are known to Gnus.
+    (when search-description
+      (mapatoms
+       (lambda (group)
+        (and (string-match regexp (symbol-value group))
+             (gnus-active (symbol-name group))
+             (setq groups (cons (symbol-name group) groups))))
+       gnus-description-hashtb))
     (if (not groups)
        (gnus-message 3 "No groups matched \"%s\"." regexp)
       ;; Print out all the groups.
@@ -7293,9 +7315,8 @@ This is all marks except unread, ticked, dormant, and expirable."
 (defvar gnus-thread-indent-array-level gnus-thread-indent-level)
 (defun gnus-make-thread-indent-array ()
   (let ((n 200))
-    (if (and gnus-thread-indent-array
-            (= gnus-thread-indent-level gnus-thread-indent-array-level))
-       nil
+    (unless (and gnus-thread-indent-array
+                (= gnus-thread-indent-level gnus-thread-indent-array-level))
       (setq gnus-thread-indent-array (make-vector 201 "")
            gnus-thread-indent-array-level gnus-thread-indent-level)
       (while (>= n 0)
@@ -7721,15 +7742,14 @@ If NO-DISPLAY, don't generate a summary buffer."
        (when (and (setq references (mail-header-references header))
                   (not (string= references "")))
          (insert references)
-         (setq child (downcase (mail-header-id header))
+         (setq child (mail-header-id header)
                subject (mail-header-subject header))
          (setq generation 0)
          (while (search-backward ">" nil t)
            (setq end (1+ (point)))
            (when (search-backward "<" nil t)
              (push (list (incf generation) 
-                         child (setq child (downcase
-                                            (buffer-substring (point) end)))
+                         child (setq child (buffer-substring (point) end))
                          subject)
                    relations)))
          (push (list (1+ generation) child nil subject) relations)
@@ -7868,7 +7888,7 @@ If NO-DISPLAY, don't generate a summary buffer."
 
 (defun gnus-id-to-thread (id)
   "Return the (sub-)thread where ID appears."
-  (gnus-gethash (downcase id) gnus-newsgroup-dependencies))
+  (gnus-gethash id gnus-newsgroup-dependencies))
 
 (defun gnus-id-to-article (id)
   "Return the article number of ID."
@@ -7897,9 +7917,8 @@ If NO-DISPLAY, don't generate a summary buffer."
 (defun gnus-root-id (id)
   "Return the id of the root of the thread where ID appears."
   (let (last-id prev)
-    (while (and id (setq prev (car (gnus-gethash
-                                   (downcase id)
-                                   gnus-newsgroup-dependencies))))
+    (while (and id (setq prev (car (gnus-gethash 
+                                   id gnus-newsgroup-dependencies))))
       (setq last-id id
            id (gnus-parent-id (mail-header-references prev))))
     last-id))
@@ -7940,7 +7959,7 @@ If NO-DISPLAY, don't generate a summary buffer."
       (if thread
          (unless dont-remove
            (setq gnus-newsgroup-threads (delq thread gnus-newsgroup-threads)))
-       (setq thread (gnus-gethash (downcase last-id) dep)))
+       (setq thread (gnus-gethash last-id dep)))
       (when thread
        (prog1
            thread ; We return this thread.
@@ -8102,7 +8121,7 @@ Unscored articles will be counted as having a score of zero."
         (or (cdr (assq (mail-header-number root) gnus-newsgroup-scored))
             gnus-summary-default-score 0)
         (mapcar 'gnus-thread-total-score
-                (cdr (gnus-gethash (downcase (mail-header-id root))
+                (cdr (gnus-gethash (mail-header-id root)
                                    gnus-newsgroup-dependencies)))))
 
 ;; Added by Per Abrahamsen <amanda@iesd.auc.dk>.
@@ -8957,15 +8976,14 @@ The resulting hash table is returned, or nil if no Xrefs were found."
                    (setq end (match-end 0))
                    (save-excursion
                      (setq ref
-                           (downcase
-                            (buffer-substring
-                             (progn
-                               (end-of-line)
-                               (search-backward ">" end t)
-                               (1+ (point)))
-                             (progn
-                               (search-backward "<" end t)
-                               (point)))))))
+                           (buffer-substring
+                            (progn
+                              (end-of-line)
+                              (search-backward ">" end t)
+                              (1+ (point)))
+                            (progn
+                              (search-backward "<" end t)
+                              (point))))))
                ;; Get the references from the in-reply-to header if there
                ;; were no references and the in-reply-to header looks
                ;; promising.
@@ -8975,7 +8993,7 @@ The resulting hash table is returned, or nil if no Xrefs were found."
                    (prog1
                        (setq ref (substring in-reply-to (match-beginning 0)
                                             (match-end 0)))
-                     (setq ref (downcase ref))))
+                     (setq ref ref)))
                (setq ref "")))
            ;; Chars.
            0
@@ -8996,7 +9014,7 @@ The resulting hash table is returned, or nil if no Xrefs were found."
          ;; the same hash table.  Some tippy-toeing around has to be
          ;; done in case an article has arrived before the article
          ;; which it refers to.
-         (if (boundp (setq id-dep (intern (downcase id) dependencies)))
+         (if (boundp (setq id-dep (intern id dependencies)))
              (if (and (car (symbol-value id-dep))
                       (not force-new))
                  ;; An article with this Message-ID has already
@@ -9102,12 +9120,9 @@ list of headers that match SEQUENCE (see `nntp-retrieve-headers')."
                     (search-forward "\t" eol)
                     (if (search-backward ">" beg t)
                         (setq ref
-                              (downcase
-                               (buffer-substring
-                                (1+ (point))
-                                (progn
-                                  (search-backward "<" beg t)
-                                  (point)))))
+                              (buffer-substring
+                               (1+ (point))
+                               (search-backward "<" beg t)))
                       (setq ref nil))))
                 (gnus-nov-field))      ; refs
               (gnus-nov-read-integer)  ; chars
@@ -9126,7 +9141,7 @@ list of headers that match SEQUENCE (see `nntp-retrieve-headers')."
 
     ;; We build the thread tree.
     (when header
-      (if (boundp (setq id-dep (intern (downcase id) dependencies)))
+      (if (boundp (setq id-dep (intern id dependencies)))
          (if (and (car (symbol-value id-dep))
                   (not force-new))
              ;; An article with this Message-ID has already been seen,
@@ -10728,7 +10743,7 @@ Return how many articles were fetched."
       (setq message-id (concat "<" message-id)))
     (unless (string-match ">$" message-id)
       (setq message-id (concat message-id ">")))
-    (let ((header (car (gnus-gethash (downcase message-id)
+    (let ((header (car (gnus-gethash message-id
                                     gnus-newsgroup-dependencies))))
       (if header
          ;; The article is present in the buffer, to we just go to it.
@@ -12321,6 +12336,26 @@ Returns nil if no threads were there to be hidden."
 (defun gnus-summary-go-to-next-thread (&optional previous)
   "Go to the same level (or less) next thread.
 If PREVIOUS is non-nil, go to previous thread instead.
+Return the article number moved to, or nil if moving was impossible."
+  (let ((level (gnus-summary-thread-level))
+       (way (if previous -1 1))
+       (beg (point)))
+    (forward-line way)
+    (while (and (not (eobp))
+               (< level (gnus-summary-thread-level)))
+      (forward-line way))
+    (if (eobp)
+       (progn
+         (goto-char beg)
+         nil)
+      (setq beg (point))
+      (prog1
+         (gnus-summary-article-number)
+       (goto-char beg)))))
+
+(defun gnus-summary-go-to-next-thread-old (&optional previous)
+  "Go to the same level (or less) next thread.
+If PREVIOUS is non-nil, go to previous thread instead.
 Return the article number moved to, or nil if moving was impossible."
   (if (and (eq gnus-summary-make-false-root 'dummy)
           (gnus-summary-article-intangible-p))
@@ -12359,16 +12394,7 @@ If SILENT, don't output messages."
        (n (abs n))
        old dum int)
     (while (and (> n 0)
-               (setq old (save-excursion 
-                           (forward-line 1) 
-                           (setq int (gnus-summary-article-intangible-p))
-                           (point)))
-               (or int 
-                   (gnus-summary-go-to-next-thread backward)))
-      (when (and (eq gnus-summary-make-false-root 'dummy)
-                (setq dum (text-property-not-all
-                           old (point) 'gnus-intangible nil)))
-       (goto-char dum))
+               (gnus-summary-go-to-next-thread backward))
       (decf n))
     (unless silent 
       (gnus-summary-position-point))
@@ -13260,16 +13286,13 @@ The following commands are available:
          (goto-char (point-max))
          (insert ".\n")
          (goto-char (point-min))
-         (insert "211 "
-                 (int-to-string
-                  (cond
-                   ((numberp id)
-                    id)
-                   ((cdr where)
-                    (cdr where))
-                   (t
-                    gnus-reffed-article-number)))
-                 " Article retrieved.\n"))
+         (insert "211 ")
+         (princ (cond
+                 ((numberp id) id)
+                 ((cdr where) (cdr where))
+                 (t gnus-reffed-article-number))
+                (current-buffer))
+         (insert " Article retrieved.\n"))
        (if (not (setq header (car (gnus-get-newsgroup-headers))))
            () ; Malformed head.
          (if (and (stringp id)
@@ -13409,8 +13432,7 @@ If ALL-HEADERS is non-nil, no headers are hidden."
     (gnus-article-setup-buffer)
     (set-buffer gnus-article-buffer)
     (let ((buffer-read-only nil))
-      (remove-text-properties (point-min) (point-max)
-                             gnus-hidden-properties))))
+      (gnus-unhide-text (point-min) (point-max)))))
 
 (defun gnus-article-hide-headers-if-wanted ()
   "Hide unwanted headers if `gnus-have-all-headers' is nil.
@@ -13431,6 +13453,8 @@ always hide."
        (set-buffer gnus-article-buffer)
        (save-restriction
          (let ((buffer-read-only nil)
+               (props (nconc (list 'gnus-type 'headers)
+                             gnus-hidden-properties))
                (ignored (when (not (stringp gnus-visible-headers))
                           (cond ((stringp gnus-ignored-headers)
                                  gnus-ignored-headers)
@@ -13451,9 +13475,7 @@ always hide."
            (while (looking-at "From ")
              (forward-line 1))
            (unless (bobp)
-             (add-text-properties
-              (point-min) (point)
-              (nconc (list 'gnus-type 'headers) gnus-hidden-properties)))
+             (gnus-hide-text (point-min) (point) props))
            ;; Then treat the rest of the header lines.
            (narrow-to-region
             (point)
@@ -13490,10 +13512,7 @@ always hide."
            (if delete
                (delete-region (point-min) (point-max))
              ;; Suggested by Sudish Joseph <joseph@cis.ohio-state.edu>.
-             (add-text-properties
-              (point) (point-max)
-              (nconc (list 'gnus-type 'headers)
-                     gnus-hidden-properties)))))))))
+             (gnus-hide-text-type (point) (point-max) 'headers))))))))
 
 (defsubst gnus-article-header-rank (header)
   "Give the rank of the string HEADER as given by `gnus-sorted-header-list'."
@@ -13533,15 +13552,14 @@ always hide."
             ((eq elem 'empty)
              (while (re-search-forward "^[^:]+:[ \t]\n[^ \t]" nil t)
                (forward-line -1)
-               (add-text-properties
+               (gnus-hide-text-type
                 (progn (beginning-of-line) (point))
                 (progn 
                   (end-of-line)
                   (if (re-search-forward "^[^ \t]" nil t)
                       (match-beginning 0)
                     (point-max)))
-                (nconc (list 'gnus-type 'boring-headers)
-                       gnus-hidden-properties))))
+                'boring-headers)))
             ;; Hide boring Newsgroups header.
             ((eq elem 'newsgroups)
              (when (equal (mail-fetch-field "newsgroups")
@@ -13571,15 +13589,14 @@ always hide."
   (save-excursion
     (goto-char (point-min))
     (when (re-search-forward (concat "^" header ":") nil t)
-      (add-text-properties
+      (gnus-hide-text-type
        (progn (beginning-of-line) (point))
        (progn 
         (end-of-line)
         (if (re-search-forward "^[^ \t]" nil t)
             (match-beginning 0)
           (point-max)))
-       (nconc (list 'gnus-type 'boring-headers)
-             gnus-hidden-properties)))))
+       'boring-headers))))
 
 ;; Written by Per Abrahamsen <amanda@iesd.auc.dk>.
 (defun gnus-article-treat-overstrike ()
@@ -13755,12 +13772,12 @@ always hide."
        (goto-char (point-min))
        ;; Hide the "header".
        (and (search-forward "\n-----BEGIN PGP SIGNED MESSAGE-----\n" nil t)
-            (add-text-properties (match-beginning 0) (match-end 0) props))
+            (gnus-hide-text (match-beginning 0) (match-end 0) props))
        (setq beg (point))
        ;; Hide the actual signature.
        (and (search-forward "\n-----BEGIN PGP SIGNATURE-----\n" nil t)
             (setq end (match-beginning 0))
-            (add-text-properties
+            (gnus-hide-text
              (match-beginning 0)
              (if (search-forward "\n-----END PGP SIGNATURE-----\n" nil t)
                  (match-end 0)
@@ -13773,7 +13790,7 @@ always hide."
          (narrow-to-region beg end)
          (goto-char (point-min))
          (while (re-search-forward "^- " nil t)
-           (add-text-properties (match-beginning 0) (match-end 0) props))
+           (gnus-hide-text (match-beginning 0) (match-end 0) props))
          (widen))))))
 
 (defun gnus-article-hide-signature (&optional arg)
@@ -13787,10 +13804,7 @@ always hide."
       (save-restriction
        (let ((buffer-read-only nil))
          (when (gnus-narrow-to-signature)
-           (add-text-properties
-            (point-min) (point-max)
-            (nconc (list 'gnus-type 'signature)
-                   gnus-hidden-properties))))))))
+           (gnus-hide-text-type (point-min) (point-max) 'signature)))))))
 
 (defun gnus-article-strip-leading-blank-lines ()
   "Remove all blank lines from the beginning of the article."
@@ -13863,8 +13877,8 @@ If HIDE, hide the text instead."
        (setq beg (point))
        (forward-char)
        (if hide
-           (add-text-properties beg (point) gnus-hidden-properties)
-         (remove-text-properties beg (point) gnus-hidden-properties))
+           (gnus-hide-text beg (point) gnus-hidden-properties)
+         (gnus-unhide-text beg (point)))
        (setq beg (point)))
       t)))
 
@@ -14565,6 +14579,8 @@ If it is down, start it up (again)."
 
 (defun gnus-open-server (method)
   "Open a connection to METHOD."
+  (when (stringp method)
+    (setq method (gnus-server-to-method method)))
   (let ((elem (assoc method gnus-opened-servers)))
     ;; If this method was previously denied, we just return nil.
     (if (eq (nth 1 elem) 'denied)
@@ -14586,23 +14602,33 @@ If it is down, start it up (again)."
 
 (defun gnus-close-server (method)
   "Close the connection to METHOD."
+  (when (stringp method)
+    (setq method (gnus-server-to-method method)))
   (funcall (gnus-get-function method 'close-server) (nth 1 method)))
 
 (defun gnus-request-list (method)
   "Request the active file from METHOD."
+  (when (stringp method)
+    (setq method (gnus-server-to-method method)))
   (funcall (gnus-get-function method 'request-list) (nth 1 method)))
 
 (defun gnus-request-list-newsgroups (method)
   "Request the newsgroups file from METHOD."
+  (when (stringp method)
+    (setq method (gnus-server-to-method method)))
   (funcall (gnus-get-function method 'request-list-newsgroups) (nth 1 method)))
 
 (defun gnus-request-newgroups (date method)
   "Request all new groups since DATE from METHOD."
+  (when (stringp method)
+    (setq method (gnus-server-to-method method)))
   (funcall (gnus-get-function method 'request-newgroups)
           date (nth 1 method)))
 
 (defun gnus-server-opened (method)
   "Check whether a connection to METHOD has been opened."
+  (when (stringp method)
+    (setq method (gnus-server-to-method method)))
   (funcall (gnus-get-function method 'server-opened) (nth 1 method)))
 
 (defun gnus-status-message (method)
@@ -14616,6 +14642,8 @@ this group uses will be queried."
 (defun gnus-request-group (group &optional dont-check method)
   "Request GROUP.  If DONT-CHECK, no information is required."
   (let ((method (or method (gnus-find-method-for-group group))))
+    (when (stringp method)
+      (setq method (gnus-server-to-method method)))
     (funcall (gnus-get-function method 'request-group)
             (gnus-group-real-name group) (nth 1 method) dont-check)))
 
@@ -14660,6 +14688,8 @@ If FETCH-OLD, retrieve all headers (or some subset thereof) in the group."
 
 (defun gnus-retrieve-groups (groups method)
   "Request active information on GROUPS from METHOD."
+  (when (stringp method)
+    (setq method (gnus-server-to-method method)))
   (funcall (gnus-get-function method 'retrieve-groups) groups (nth 1 method)))
 
 (defun gnus-request-type (group &optional article)
@@ -14700,6 +14730,8 @@ If BUFFER, insert the article in that group."
 
 (defun gnus-request-post (method)
   "Post the current buffer using METHOD."
+  (when (stringp method)
+    (setq method (gnus-server-to-method method)))
   (funcall (gnus-get-function method 'request-post) (nth 1 method)))
 
 (defun gnus-request-scan (group method)
@@ -14711,6 +14743,8 @@ If GROUP is nil, all groups on METHOD are scanned."
 
 (defsubst gnus-request-update-info (info method)
   "Request that METHOD update INFO."
+  (when (stringp method)
+    (setq method (gnus-server-to-method method)))
   (when (gnus-check-backend-function 'request-update-info (car method))
     (funcall (gnus-get-function method 'request-update-info)
             (gnus-group-real-name (gnus-info-group info))
@@ -14731,6 +14765,8 @@ If GROUP is nil, all groups on METHOD are scanned."
 
 (defun gnus-request-accept-article (group &optional last method)
   ;; Make sure there's a newline at the end of the article.
+  (when (stringp method)
+    (setq method (gnus-server-to-method method)))
   (goto-char (point-max))
   (unless (bolp)
     (insert "\n"))
@@ -14757,6 +14793,8 @@ If GROUP is nil, all groups on METHOD are scanned."
             article (gnus-group-real-name group) (nth 1 method))))
 
 (defun gnus-request-create-group (group &optional method)
+  (when (stringp method)
+    (setq method (gnus-server-to-method method)))
   (let ((method (or method (gnus-find-method-for-group group))))
     (funcall (gnus-get-function method 'request-create-group)
             (gnus-group-real-name group) (nth 1 method))))
@@ -14780,6 +14818,8 @@ If GROUP is nil, all groups on METHOD are scanned."
 
 (defun gnus-method-option-p (method option)
   "Return non-nil if select METHOD has OPTION as a parameter."
+  (when (stringp method)
+    (setq method (gnus-server-to-method method)))
   (memq option (assoc (format "%s" (car method))
                      gnus-valid-select-methods)))
 
@@ -14894,6 +14934,10 @@ If LEVEL is non-nil, the news will be set up at level LEVEL."
             (gnus-check-server gnus-select-method))
        (gnus-find-new-newsgroups))
 
+    ;; We might read in new NoCeM messages here.
+    (when gnus-use-nocem 
+      (gnus-nocem-scan-groups))
+
     ;; Find the number of unread articles in each non-dead group.
     (let ((gnus-read-active-file (and (not level) gnus-read-active-file)))
       (gnus-get-unread-articles level))
@@ -15357,12 +15401,9 @@ newsgroup."
     (setq gnus-killed-hashtb
          (gnus-make-hashtable
           (+ (length gnus-killed-list) (length gnus-zombie-list))))
-    (while lists
-      (setq list (symbol-value (car lists)))
-      (setq lists (cdr lists))
+    (while (setq list (symbol-value (pop lists)))
       (while list
-       (gnus-sethash (car list) (car list) gnus-killed-hashtb)
-       (setq list (cdr list))))))
+       (gnus-sethash (car list) (pop list) gnus-killed-hashtb)))))
 
 (defun gnus-get-unread-articles-in-group (info active &optional update)
   (when active
@@ -16213,7 +16254,7 @@ If FORCE is non-nil, the .newsrc file is read."
     (set-buffer (create-file-buffer gnus-current-startup-file))
     (let ((newsrc (cdr gnus-newsrc-alist))
          (standard-output (current-buffer))
-         info ranges range)
+         info ranges range method)
       (setq buffer-file-name gnus-current-startup-file)
       (buffer-disable-undo (current-buffer))
       (erase-buffer)
@@ -16222,7 +16263,9 @@ If FORCE is non-nil, the .newsrc file is read."
       ;; Write subscribed and unsubscribed.
       (while (setq info (pop newsrc))
        ;; Don't write foreign groups to .newsrc.
-       (when (gnus-server-equal (gnus-info-method info) gnus-select-method)
+       (when (or (null (setq method (gnus-info-method info)))
+                 (equal method "native")
+                 (gnus-server-equal method gnus-select-method))
          (insert (gnus-info-group info)
                  (if (> (gnus-info-level info) gnus-level-subscribed)
                      "!" ":"))
@@ -16234,9 +16277,7 @@ If FORCE is non-nil, the .newsrc file is read."
                  (princ (car ranges))
                  (insert "-")
                  (princ (cdr ranges)))
-             (while ranges
-               (setq range (car ranges)
-                     ranges (cdr ranges))
+             (while (setq range (pop ranges))
                (if (or (atom range) (= (car range) (cdr range)))
                    (princ (or (and (atom range) range) (car range)))
                  (princ (car range))
index 0bea648..6f41769 100644 (file)
@@ -688,27 +688,24 @@ FUNC will be called with the buffer narrowed to each mail."
                                  (list (list group ""))
                                nnmail-split-methods)))
     (save-excursion
-      ;; Open the message-id cache.
-      (nnmail-cache-open)
       ;; Insert the incoming file.
       (set-buffer (get-buffer-create " *nnmail incoming*"))
       (buffer-disable-undo (current-buffer))
       (erase-buffer)
       (insert-file-contents incoming)
-      (goto-char (point-min))
-      (save-excursion (run-hooks 'nnmail-prepare-incoming-hook))
-      ;; Handle both babyl, MMDF and unix mail formats, since movemail will
-      ;; use the former when fetching from a mailbox, the latter when
-      ;; fetches from a file.
-      (cond ((or (looking-at "\^L")
-                (looking-at "BABYL OPTIONS:"))
-            (nnmail-process-babyl-mail-format func))
-           ((looking-at "\^A\^A\^A\^A")
-            (nnmail-process-mmdf-mail-format func))
-           (t
-            (nnmail-process-unix-mail-format func)))
-      ;; Close the message-id cache.
-      (nnmail-cache-close)
+      (unless (zerop (buffer-size))
+       (goto-char (point-min))
+       (save-excursion (run-hooks 'nnmail-prepare-incoming-hook))
+       ;; Handle both babyl, MMDF and unix mail formats, since movemail will
+       ;; use the former when fetching from a mailbox, the latter when
+       ;; fetches from a file.
+       (cond ((or (looking-at "\^L")
+                  (looking-at "BABYL OPTIONS:"))
+              (nnmail-process-babyl-mail-format func))
+             ((looking-at "\^A\^A\^A\^A")
+              (nnmail-process-mmdf-mail-format func))
+             (t
+              (nnmail-process-unix-mail-format func))))
       (if exit-func (funcall exit-func))
       (kill-buffer (current-buffer)))))
 
@@ -1083,6 +1080,8 @@ See the documentation for the variable `nnmail-split-fancy' for documentation."
       (nnmail-activate method)
       ;; Allow the user to hook.
       (run-hooks 'nnmail-pre-get-new-mail-hook)
+      ;; Open the message-id cache.
+      (nnmail-cache-open)
       ;; The we go through all the existing spool files and split the
       ;; mail from each.
       (while spools
@@ -1123,6 +1122,8 @@ See the documentation for the variable `nnmail-split-fancy' for documentation."
          (funcall exit-func))
        (run-hooks 'nnmail-read-incoming-hook)
        (nnheader-message 3 "%s: Reading incoming mail...done" method))
+      ;; Close the message-id cache.
+      (nnmail-cache-close)
       ;; Allow the user to hook.
       (run-hooks 'nnmail-post-get-new-mail-hook)
       ;; Delete all the temporary files.
index 53bc2bb..a60a9ca 100644 (file)
        (setq result (nnmbox-save-mail (and (stringp group) group))))
      (save-excursion
        (set-buffer nnmbox-mbox-buffer)
+       (goto-char (point-max))
        (insert-buffer-substring buf)
        (and last (save-buffer))
        result)
index 5684060..ad065df 100644 (file)
@@ -77,6 +77,7 @@ The SOUP packet file name will be inserted at the %s.")
 (defvar nnsoup-replies-list nil)
 (defvar nnsoup-buffers nil)
 (defvar nnsoup-current-group nil)
+(defvar nnsoup-group-alist-touched nil)
 
 \f
 
@@ -96,6 +97,7 @@ The SOUP packet file name will be inserted at the %s.")
     (nnsoup-packet-directory ,nnsoup-packet-directory)
     (nnsoup-unpacker ,nnsoup-unpacker)
     (nnsoup-packer ,nnsoup-packer)
+    (nnsoup-group-alist-touched nil)
     (nnsoup-replies-index-type ,nnsoup-replies-index-type)
     (nnsoup-replies-format-type ,nnsoup-replies-format-type)
     (nnsoup-replies-directory ,nnsoup-replies-directory)
@@ -213,6 +215,7 @@ The SOUP packet file name will be inserted at the %s.")
 
 (defun nnsoup-close-server (&optional server)
   (setq nnsoup-current-server nil
+       nnsoup-group-alist-touched nil
        nnsoup-group-alist nil)
   t)
 
@@ -228,6 +231,7 @@ The SOUP packet file name will be inserted at the %s.")
           (buffer-name buffer)
           (kill-buffer buffer))))
   (setq nnsoup-group-alist nil
+       nnsoup-group-alist-touched nil
        nnsoup-current-group nil
        nnsoup-current-server nil
        nnsoup-server-alist nil
@@ -294,10 +298,14 @@ The SOUP packet file name will be inserted at the %s.")
     (set-buffer nntp-server-buffer)
     (erase-buffer)
     (let ((alist nnsoup-group-alist)
+         (standard-output (current-buffer))
          entry)
       (while (setq entry (pop alist))
-       (insert (format "%s %d %d y\n" (car entry)
-                       (cdadr entry) (caadr entry))))
+       (insert (car entry) " ")
+       (princ (cdadr entry))
+       (insert " ")
+       (princ (caadr entry))
+       (insert " y\n"))
       t)))
 
 (defun nnsoup-request-scan (group &optional server)
@@ -357,7 +365,7 @@ The SOUP packet file name will be inserted at the %s.")
     (if (cddr total-infolist)
        (setcar active (caaadr (cdr total-infolist)))
       (setcar active (1+ (cdr active))))
-    (nnsoup-write-active-file)
+    (nnsoup-write-active-file t)
     ;; Return the articles that weren't expired.
     articles))
 
@@ -373,7 +381,7 @@ The SOUP packet file name will be inserted at the %s.")
   (setq nnsoup-group-alist)
   (when (file-exists-p nnsoup-active-file)
     (condition-case ()
-       (load nnsoup-active-file)
+       (load nnsoup-active-file t t t)
       (error nil))
     ;; Be backwards compatible.
     (when (and nnsoup-group-alist
@@ -385,21 +393,19 @@ The SOUP packet file name will be inserted at the %s.")
          (while (cdr e)
            (setq e (cdr e)))
          (setq max (cdaar e))
-         (setcdr entry (cons (cons min max) (cdr entry))))))
+         (setcdr entry (cons (cons min max) (cdr entry)))))
+      (setq nnsoup-group-alist-touched t))
     nnsoup-group-alist))
 
-(defun nnsoup-write-active-file ()
-  (when nnsoup-group-alist
-    (save-excursion
-      (set-buffer (get-buffer-create " *nnsoup work*"))
-      (buffer-disable-undo (current-buffer))
-      (erase-buffer)
-      (insert (format "(setq nnsoup-group-alist '%S)\n" nnsoup-group-alist))
-      (insert (format "(setq nnsoup-current-prefix %d)\n"
-                     nnsoup-current-prefix))
-      (write-region (point-min) (point-max) nnsoup-active-file
-                   nil 'silent)
-      (kill-buffer (current-buffer)))))
+(defun nnsoup-write-active-file (&optional force)
+  (when (and nnsoup-group-alist
+            (or force 
+                nnsoup-group-alist-touched))
+    (setq nnsoup-group-alist-touched nil)
+    (nnheader-temp-write nnsoup-active-file
+      (let ((standard-output (current-buffer)))
+       (prin1 `(setq nnsoup-group-alist ',nnsoup-group-alist))
+       (prin1 `(setq nnsoup-current-prefix ,nnsoup-current-prefix))))))
 
 (defun nnsoup-next-prefix ()
   "Return the next free prefix."
@@ -447,7 +453,7 @@ The SOUP packet file name will be inserted at the %s.")
                                           (+ lnum number))
                                     area)))
            (setcdr (cadr entry) (+ lnum number))))))
-    (nnsoup-write-active-file)
+    (nnsoup-write-active-file t)
     (delete-file (concat nnsoup-tmp-directory "AREAS"))))
 
 (defun nnsoup-number-of-articles (area)
@@ -748,7 +754,7 @@ The SOUP packet file name will be inserted at the %s.")
     (while active
       (setcdr (car active) (nreverse (cdar active)))
       (setq active (cdr active)))
-    (nnsoup-write-active-file)))
+    (nnsoup-write-active-file t)))
 
 (defun nnsoup-delete-unreferenced-message-files ()
   "Delete any *.MSG and *.IDX files that aren't known by nnsoup."
index b845d15..d30f5e7 100644 (file)
@@ -124,6 +124,7 @@ there.")
     (when (nnspool-possibly-change-directory group)
       (let* ((number (length articles))
             (count 0)
+            (default-directory nnspool-current-directory)
             (do-message (and (numberp nnspool-large-newsgroup)
                              (> number nnspool-large-newsgroup)))
             file beg article ag)
@@ -132,8 +133,7 @@ there.")
            ;; We successfully retrieved the NOV headers.
            'nov
          ;; No NOV headers here, so we do it the hard way.
-         (while articles
-           (setq article (pop articles))
+         (while (setq article (pop articles))
            (if (stringp article)
                ;; This is a Message-ID.
                (setq ag (nnspool-find-id article)
@@ -141,14 +141,15 @@ there.")
                                    (car ag) (cdr ag)))
                      article (cdr ag))
              ;; This is an article in the current group.
-             (setq file (nnspool-article-pathname 
-                         nnspool-current-group article)))
+             (setq file (int-to-string article)))
            ;; Insert the head of the article.
            (when (and file
                       (file-exists-p file))
-             (insert (format "221 %d Article retrieved.\n" article))
+             (insert "221 ")
+             (princ article (current-buffer))
+             (insert " Article retrieved.\n")
              (setq beg (point))
-             (nnheader-insert-head file)
+             (inline (nnheader-insert-head file))
              (goto-char beg)
              (search-forward "\n\n" nil t)
              (forward-char -1)
index 7afd915..cf6b135 100644 (file)
@@ -1043,7 +1043,7 @@ It will prompt for a password."
 
 (defun nntp-send-xover-command (beg end &optional wait-for-reply)
   "Send the XOVER command to the server."
-  (let ((range (format "%d-%d" beg end)))
+  (let ((range (format "%d-%d" (or beg 1) (or end beg 1))))
     (if (stringp nntp-server-xover)
        ;; If `nntp-server-xover' is a string, then we just send this
        ;; command.
index 67e37ac..f15f8dc 100644 (file)
@@ -274,6 +274,12 @@ virtual group.")
   (nnvirtual-possibly-change-group group server t)
   (let ((gnus-group-marked nnvirtual-component-groups)
        (gnus-expert-user t))
+    ;; Make sure all groups are activated.
+    (mapcar
+     (lambda (g)
+       (when (not (numberp (car (gnus-gethash g gnus-newsrc-hashtb))))
+        (gnus-activate-group g)))
+     nnvirtual-component-groups)
     (save-excursion
       (set-buffer gnus-group-buffer)
       (gnus-group-catchup-current nil all))))
index 02d3fcb..91c21dc 100644 (file)
@@ -2566,7 +2566,7 @@ move around, read articles, post articles and reply to articles.
 * Saving Articles::             Ways of customizing article saving.
 * Decoding Articles::           Gnus can treat series of (uu)encoded articles.
 * Article Treatment::           The article buffer can be mangled at will.
-* Summary Sorting::             You can sort the summary buffer four ways.
+* Summary Sorting::             Sorting the summary buffer in various ways.
 * Finding the Parent::          No child support? Get the parent.
 * Alternative Approaches::      Reading using non-default summaries.
 * Tree Display::                A more visual display of threads.