*** empty log message ***
authorLars Magne Ingebrigtsen <larsi@gnus.org>
Tue, 4 Mar 1997 02:33:51 +0000 (02:33 +0000)
committerLars Magne Ingebrigtsen <larsi@gnus.org>
Tue, 4 Mar 1997 02:33:51 +0000 (02:33 +0000)
17 files changed:
lisp/ChangeLog
lisp/gnus-cache.el
lisp/gnus-ems.el
lisp/gnus-mh.el
lisp/gnus-msg.el
lisp/gnus-score.el
lisp/gnus-uu.el
lisp/gnus.el
lisp/nnbabyl.el
lisp/nneething.el
lisp/nnkiboze.el
lisp/nnmail.el
lisp/nnmh.el
lisp/nnml.el
lisp/nnsoup.el
lisp/nntp.el
texi/gnus.texi

index d285723..9c8eaf2 100644 (file)
@@ -1,4 +1,83 @@
-Thu Jun 15 03:34:23 1995  Lars Magne Ingebrigtsen  <larsi@hymir.ifi.uio.no>
+Sat Jun 17 02:38:33 1995  Lars Ingebrigtsen  <lars@eyesore.no>
+
+       * nnkiboze.el (nnkiboze-close-group): Don't bug out on missing nov
+       files. 
+
+       * gnus-cache.el (gnus-cache-possibly-remove-articles): Wait until
+       exit to remove articles from the cache. 
+
+       * gnus.el (gnus-summary-next-group): Go to the next group, or exit
+       if no articles. 
+       (gnus-summary-search-article-forward): Cleaned up. 
+       (gnus-summary-search-article-backward): New implementation. 
+
+       * gnus-uu.el (gnus-uu-decode-with-method): Make sure the dir name
+       is a directory. 
+
+       * gnus.el (gnus-summary-mode-map): Add binding for gnus-bug. 
+       (gnus-article-mode-map): Ditto. 
+       (gnus-browse-mode-map): Ditto.
+
+       * nnmh.el (nnmh-request-expire-articles): Possibly keep last
+       article; and return the right `rest' undeleted list. 
+
+       * gnus.el (gnus-summary-mark-article): Don't auto-expire ancient
+       articles. 
+
+       * nnbabyl.el (nnbabyl-request-expire-articles): Would infloop. 
+
+       * gnus.el (gnus-summary-mark-article): Would possibly enter a nil
+       into the lists of articles. 
+
+Fri Jun 16 01:51:01 1995  Lars Ingebrigtsen  <lars@eyesore.no>
+
+       * nneething.el (nneething-get-head): Returned nil. 
+
+       * gnus-cache.el (gnus-cache-possibly-enter-article): Make doubly
+       sure that point as at the start of the line. 
+
+       * gnus-score.el (gnus-summary-score-entry): Matches on lines were
+       entered with strings, leading to later bugouts. 
+
+       * nntp.el (nntp-request-asynchronous): Error message slightly
+       off. 
+
+       * gnus.el (gnus-summary-verbose-header): New command and keystroke
+       for POG compatability. 
+       (gnus-article-hide-headers-if-wanted): Fix to the same. 
+
+       * gnus-score.el (gnus-score-edit-alist): Use it new config.  
+
+       * gnus.el (gnus-summary-refer-parent-article): Give a more
+       unabiguous error message. 
+       (gnus-summary-refer-article): Save the article buffer before
+       trying to refer some other. 
+       (gnus-summary-refer-article): Don't blank out the old article
+       buffer. 
+       (gnus-buffer-configuration): New entry for summary-edit-score. 
+
+       * gnus-mh.el (gnus-mail-reply-using-mhe): Set mail-bug to wrong
+       thing. 
+
+       * gnus.el (gnus-article-word-wrap): Let adaptive-fill-regexp be
+       somewhat more permissive.
+       (gnus-summary-first-subject): Did not go to the first article. 
+
+Thu Jun 15 21:31:38 1995  Lars Ingebrigtsen  <lars@eyesore.no>
+
+       * gnus.el (gnus-setup-news): Read active file from secondary
+       servers even if native is down. 
+       (gnus-get-unread-articles): Didn't display unread articles when
+       started on a low level. 
+       (gnus-get-unread-articles): More efficient implementation.
+
+Thu Jun 15 05:28:03 1995  Lars Magne Ingebrigtsen  <larsi@hymir.ifi.uio.no>
+
+       * gnus-score.el (gnus-score-save): Delete empty score files. 
+
+Thu Jun 15 03:34:23 1995  Lars Magne Ingebrigtsen  <larsi@menja.ifi.uio.no>
+
+       * gnus.el: 0.86 is released.
 
        * gnus.el (gnus-summary-refer-article): Recenter after fetching. 
 
@@ -56,6 +135,8 @@ Sat Jun 10 00:15:13 1995  Lars Ingebrigtsen  <lars@eyesore.no>
        expinged from scoring. 
        (gnus-simplify-subject-fuzzy): Totally bugged out. 
 
+       * gnus.el: 0.85 is released.
+
 Thu Jun  8 22:27:07 1995  Per Abrahamsen  <abraham@iesd.auc.dk>
 
        * custom.el: Added support for faces, sexp, and pair types.  Added
index ce11e5f..85c938e 100644 (file)
                        (forward-line 1)))
                (beginning-of-line))
            (forward-line 1))
+         (beginning-of-line)
          ;; [number subject from date id references chars lines xref]
          (insert (format "%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t\n"
                          (header-number headers)
                          (or (header-xref headers) ""))))
        t))))
 
+(defvar gnus-cache-remove-articles nil)
+
+(defun gnus-cache-enter-remove-article (article)
+  (setq gnus-cache-remove-articles
+       (cons article gnus-cache-remove-articles)))
+
+(defun gnus-cache-possibly-remove-articles ()
+  (let ((articles gnus-cache-remove-articles)
+       article)
+    (while articles
+      (setq article (car articles)
+           articles (cdr articles))
+      (gnus-cache-possibly-remove-article
+       gnus-newsgroup-name article 
+       (memq article gnus-newsgroup-marked)
+       (memq article gnus-newsgroup-dormant)
+       (or (memq article gnus-newsgroup-unreads)
+          (memq article gnus-newsgroup-unselected))))))
+
 (defun gnus-cache-possibly-remove-article 
   (group article ticked dormant unread)
   (let ((file (gnus-cache-file-name group article)))
index 3900c80..62b1e2a 100644 (file)
@@ -51,7 +51,7 @@
     (or (fboundp 'set-text-properties)
        (defun set-text-properties (start end props &optional buffer)
          (if props
-             (put-text-property start end (car props) (cadr props) buffer)
+             (put-text-property start end (car props) (cdr props) buffer)
            (remove-text-properties start end ()))))
     
     (or (fboundp 'make-overlay) (fset 'make-overlay 'make-extent))
     (fset 'gnus-set-mouse-face (lambda (string) string))
 
     (defun gnus-summary-make-display-table ()
-      ;; We start from the standard display table, if any.
-      (let* ((table (window-display-table)))
-       (and (not table)
-            (setq table (make-vector 261 ())))
-       ;; Nix out all the control chars...
-       (let ((i 32))
-         (while (>= (setq i (1- i)) 0)
-           (aset table i [??])))
-       ;; ... but not newline, of course.
-       (aset table ?\n nil)
-       ;; We nix out any glyphs over 126 that are not set already.  
-       (let ((i 256))
-         (while (>= (setq i (1- i)) 127)
-           (or (aref table i)
-               (aset table i [??]))))
-       (set-window-display-table (get-buffer-window (current-buffer)) table)))
+      )
 
     (defun gnus-highlight-selected-summary ()
       ;; Added by Per Abrahamsen <amanda@iesd.auc.dk>.
index b2723eb..04342bf 100644 (file)
@@ -122,7 +122,7 @@ The command \\[mh-yank-cur-msg] yank the original message into current buffer."
       (if (not yank)
          (gnus-configure-windows 'reply)
        (gnus-configure-windows 'reply-yank))
-      (setq mail-buf (cdr (assq 'mail gnus-window-to-buffer)))
+      (setq mail-buf gnus-mail-buffer)
       (pop-to-buffer mail-buf) ;; always in the display, so won't have window probs
       (switch-to-buffer draft)
       (kill-buffer mail-buf) ;; mh-e don't use it!
index 74ad7c9..cfc953a 100644 (file)
@@ -1040,15 +1040,18 @@ Headers in `gnus-required-headers' will be generated."
                      ;; so we just ask the user.
                      (read-from-minibuffer
                       (format "Empty header for %s; enter value: " header))))
-           ;; Add the deletable property to the headers that require it. 
-           (and (memq header gnus-deletable-headers)
-                (add-text-properties 
-                 0 (length value) '(gnus-deletable t) value))
            ;; Finally insert the header.
            (if (bolp)
                (save-excursion
                  (goto-char (point-max))
-                 (insert (symbol-name header) ": " value "\n"))
+                 (insert (symbol-name header) ": ")
+                 ;; Add the deletable property to the headers that require it.
+                 (if (memq header gnus-deletable-headers)
+                     (add-text-properties 
+                      (point) (progn (insert value) (point))
+                      '(gnus-deletable t) (current-buffer))
+                   (insert value))
+                 (insert "\n"))
              (replace-match value t t))))
       (setq headers (cdr headers)))))
 
index 372e941..dfcb63a 100644 (file)
@@ -65,6 +65,7 @@ always be used.")
 (defvar gnus-score-help-winconf nil)
 (defvar gnus-adaptive-score-alist gnus-default-adaptive-score-alist)
 (defvar gnus-score-trace nil)
+(defvar gnus-score-edit-buffer nil)
 
 (defvar gnus-score-alist nil
   "Alist containing score information.
@@ -329,10 +330,14 @@ If optional argument `SILENT' is nil, show effect of score entry."
                                 (int-to-string match)
                               match))))
     (and (>= (nth 1 (assoc header gnus-header-index)) 0)
-        (eq (nth 2 (assoc header gnus-header-index))
-            'gnus-score-string)
+        (eq (nth 2 (assoc header gnus-header-index)) 'gnus-score-string)
         (not silent)
         (gnus-summary-score-effect header match type score))
+
+    ;; If this is an integer comparison, we transform from string to int. 
+    (and (eq (nth 2 (assoc header gnus-header-index)) 'gnus-score-integer)
+        (setq match (string-to-int match)))
+
     (if (eq date 'now)
        ()
       (and (= score gnus-score-interactive-default-score)
@@ -486,8 +491,8 @@ SCORE is the score to add."
   (interactive (list gnus-current-score-file))
   (let ((winconf (current-window-configuration)))
     (and (buffer-name gnus-summary-buffer) (gnus-score-save))
-    (gnus-configure-windows 'article)
-    (pop-to-buffer (find-file-noselect file))
+    (setq gnus-score-edit-buffer (find-file-noselect file))
+    (gnus-configure-windows 'summary-edit-score)
     (gnus-score-mode)
     (make-local-variable 'gnus-prev-winconf)
     (setq gnus-prev-winconf winconf))
@@ -501,8 +506,8 @@ SCORE is the score to add."
    (list (read-file-name "Edit score file: " gnus-kill-files-directory)))
   (and (buffer-name gnus-summary-buffer) (gnus-score-save))
   (let ((winconf (current-window-configuration)))
-    (gnus-configure-windows 'article)
-    (pop-to-buffer (find-file-noselect file))
+    (setq gnus-score-edit-buffer (find-file-noselect file))
+    (gnus-configure-windows 'summary-edit-score)
     (gnus-score-mode)
     (make-local-variable 'gnus-prev-winconf)
     (setq gnus-prev-winconf winconf))
@@ -718,7 +723,11 @@ SCORE is the score to add."
                ;; prettily. 
                (pp score (current-buffer))))
            (gnus-make-directory (file-name-directory file))
-           (write-region (point-min) (point-max) file nil 'silent))))
+           ;; If the score file is empty, we delete it.
+           (if (zerop (buffer-size))
+               (delete-file file)
+             ;; There are scores, so we write the file. 
+             (write-region (point-min) (point-max) file nil 'silent)))))
       (kill-buffer (current-buffer)))))
   
 (defun gnus-score-headers (score-files &optional trace)
index 095c19c..6b54f7f 100644 (file)
@@ -323,9 +323,10 @@ The headers will be included in the sequence they are matched.")
   "Decodes and saves the resulting file."
   (interactive
    (list current-prefix-arg
-        (read-file-name "Uudecode and save in dir: "
-                        gnus-uu-default-dir
-                        gnus-uu-default-dir t)))
+        (file-name-as-directory
+         (read-file-name "Uudecode and save in dir: "
+                         gnus-uu-default-dir
+                         gnus-uu-default-dir t))))
   (gnus-uu-decode-with-method 'gnus-uu-uustrip-article n dir))
 
 (defun gnus-uu-decode-unshar (n)
@@ -337,9 +338,10 @@ The headers will be included in the sequence they are matched.")
   "Unshars and saves the current article."
   (interactive
    (list current-prefix-arg
-        (read-file-name "Unshar and save in dir: "
-                        gnus-uu-default-dir
-                        gnus-uu-default-dir t)))
+        (file-name-as-directory
+         (read-file-name "Unshar and save in dir: "
+                         gnus-uu-default-dir
+                         gnus-uu-default-dir t))))
   (gnus-uu-decode-with-method 'gnus-uu-unshar-article n dir nil 'scan))
 
 (defun gnus-uu-decode-save (n file)
@@ -361,9 +363,10 @@ The headers will be included in the sequence they are matched.")
   "Unbinhexes the current article."
   (interactive
    (list current-prefix-arg
-        (read-file-name "Unbinhex and save in dir: "
-                        gnus-uu-default-dir
-                        gnus-uu-default-dir t)))
+        (file-name-as-directory
+         (read-file-name "Unbinhex and save in dir: "
+                         gnus-uu-default-dir
+                         gnus-uu-default-dir t))))
   (gnus-uu-decode-with-method 'gnus-uu-binhex-article n dir))
 
 (defun gnus-uu-decode-uu-view (n)
@@ -557,9 +560,10 @@ The headers will be included in the sequence they are matched.")
   "Extracts postscript and saves the current article."
   (interactive
    (list current-prefix-arg
-        (read-file-name "Where do you want to save the file(s)? "
-                        gnus-uu-default-dir
-                        gnus-uu-default-dir t)))
+        (file-name-as-directory
+         (read-file-name "Save in dir: "
+                         gnus-uu-default-dir
+                         gnus-uu-default-dir t))))
   (gnus-uu-decode-with-method 'gnus-uu-decode-postscript-article n dir))
 
 
index a486be5..55aead3 100644 (file)
@@ -687,6 +687,8 @@ beginning of a line.")
                 [edit-group 1.0 point]))
     (edit-server ([server 0.5]
                  [edit-server 1.0 point]))
+    (summary-edit-score ([summary 0.25]
+                        [edit-score 1.0 point]))
     (post ([post 1.0 point]))
     (reply ([article 0.5]
            [mail 1.0 point]))
@@ -723,6 +725,7 @@ buffer configuration.")
     (summary-carpal . gnus-carpal-summary-buffer)
     (server-carpal . gnus-carpal-server-buffer)
     (browse-carpal . gnus-carpal-browse-buffer)
+    (summary-edit-score . gnus-score-edit-buffer)
     (mail . gnus-mail-buffer)
     (post . gnus-post-news-buffer))
   "Mapping from short symbols to buffer names or buffer variables.")
@@ -1287,7 +1290,7 @@ variable (string, integer, character, etc).")
 (defconst gnus-maintainer "gnus-bug@ifi.uio.no (The Gnus Bugfixing Girls & Boys)"
   "The mail address of the Gnus maintainers.")
 
-(defconst gnus-version "(ding) Gnus v0.86"
+(defconst gnus-version "(ding) Gnus v0.87"
   "Version number for this version of Gnus.")
 
 (defvar gnus-info-nodes
@@ -1587,11 +1590,12 @@ Thank you for your help in stamping out bugs.
   ;; gnus-cache
   (autoload 'gnus-cache-possibly-enter-article "gnus-cache")
   (autoload 'gnus-cache-save-buffers "gnus-cache")
-  (autoload 'gnus-cache-possibly-remove-article "gnus-cache")
+  (autoload 'gnus-cache-possibly-remove-articles "gnus-cache")
   (autoload 'gnus-cache-request-article "gnus-cache")
   (autoload 'gnus-cache-retrieve-headers "gnus-cache")
   (autoload 'gnus-cache-possibly-alter-active "gnus-cache")
   (autoload 'gnus-jog-cache "gnus-cache" nil t)
+  (autoload 'gnus-cache-enter-remove-article "gnus-cache")
 
   ;; gnus-score
   (autoload 'gnus-summary-increase-score "gnus-score" nil t)
@@ -3958,6 +3962,7 @@ ADDRESS."
          (or (eq 'score (car (car marked)))
              (eq 'bookmark (car (car marked)))
              (eq 'killed (car (car marked)))
+             (not (numberp (car (cdr (car marked)))))
              (setcdr (car marked) 
                      (gnus-compress-sequence (sort (cdr (car marked)) '<) t)))
          (setq marked (cdr marked))))
@@ -5120,6 +5125,8 @@ buffer.
   (define-key gnus-summary-mode-map "l" 'gnus-summary-goto-last-article)
   (define-key gnus-summary-mode-map "\C-c\C-v\C-v" 'gnus-uu-decode-uu-view)
   (define-key gnus-summary-mode-map "\C-d" 'gnus-summary-enter-digest-group)
+  (define-key gnus-summary-mode-map "v" 'gnus-summary-verbose-headers)
+  (define-key gnus-summary-mode-map "\C-c\C-b" 'gnus-bug)
 
 
   ;; Sort of orthogonal keymap
@@ -7299,6 +7306,7 @@ gnus-exit-group-hook is called with no arguments if that value is non-nil."
          (gnus-group-next-unread-group 1)))
     (if temporary
        nil                             ;Nothing to do.
+      (and gnus-use-cache (gnus-cache-possibly-remove-articles))
       ;; We set all buffer-local variables to nil. It is unclear why
       ;; this is needed, but if we don't, buffer-local variables are
       ;; not garbage-collected, it seems. This would the lead to en
@@ -7338,6 +7346,7 @@ gnus-exit-group-hook is called with no arguments if that value is non-nil."
            gnus-expert-user
            (gnus-y-or-n-p "Do you really wanna quit reading this group? "))
        (progn
+         (and gnus-use-cache (gnus-cache-possibly-remove-articles))
          (gnus-close-group group)
          (gnus-summary-clear-local-variables)
          (set-buffer gnus-group-buffer)
@@ -7389,7 +7398,7 @@ If BACKWARD, go to previous group instead."
   (let ((ingroup gnus-newsgroup-name)
        (sumbuf (current-buffer))
        num)
-    (gnus-summary-exit t)              ;Update all information.
+    (set-buffer gnus-group-buffer)
     (if (and group
             (or (and (numberp (setq num (car (gnus-gethash
                                               group gnus-newsrc-hashtb))))
@@ -7402,6 +7411,7 @@ If BACKWARD, go to previous group instead."
     (gnus-summary-search-group backward)
     (let ((group (or group (gnus-summary-search-group backward)))
          (buf gnus-summary-buffer))
+      (gnus-summary-exit t)            ;Update all information.
       (if (null group)
          (gnus-summary-exit-no-update t)
        (gnus-message 5 "Selecting %s..." group)
@@ -7449,14 +7459,16 @@ If UNREAD is non-nil, go to the first unread article.
 Returns nil if there are no unread articles."
   (interactive "P")
   (prog1
-      (if (or (not unread)
-             (gnus-goto-char 
-              (text-property-any 
-               (point-min) (point-max) 'gnus-mark gnus-unread-mark)))
-         t 
-       ;; If there are no unread articles.
-       (gnus-message 3 "No more unread articles")
-       nil)
+      (cond ((not unread)
+            (goto-char (point-min)))
+           ((gnus-goto-char 
+             (text-property-any 
+              (point-min) (point-max) 'gnus-mark gnus-unread-mark))
+            t)
+           (t 
+            ;; There are no unread articles.
+            (gnus-message 3 "No more unread articles")
+            nil))
     (gnus-summary-position-cursor)))
 
 (defun gnus-summary-next-subject (n &optional unread dont-display)
@@ -7869,10 +7881,11 @@ The difference between N and the number of articles fetched is returned."
         (if (and ref (not (equal ref ""))
                  (string-match "<[^<>]*>[ \t]*$" ref))
             (gnus-summary-refer-article 
-             (substring ref (match-beginning 0) (match-end 0))))))
+             (substring ref (match-beginning 0) (match-end 0)))
+          (gnus-message 1 "No references in article %d"
+                        (gnus-summary-article-number))
+          nil)))
     (setq n (1- n)))
-  (or (zerop n) 
-      (gnus-message 1 "No references in article or expired article."))
   (gnus-summary-position-cursor)
   n)
     
@@ -7903,22 +7916,39 @@ NOTE: This command only works with newsgroups that use real or simulated NNTP."
                (header-number header)))
        (let ((gnus-override-method gnus-refer-article-method)
              (gnus-ancient-mark gnus-read-mark)
+             (tmp-buf (get-buffer-create " *gnus refer"))
+             (tmp-point (window-start
+                         (get-buffer-window gnus-article-buffer)))
              number)
          (and gnus-refer-article-method
               (or (gnus-server-opened gnus-refer-article-method)
                   (gnus-open-server gnus-refer-article-method)))
-         (if (gnus-article-prepare 
-              message-id nil (gnus-read-header message-id))
-             (progn
-               (setq number (header-number gnus-current-headers))
-               (gnus-rebuild-thread message-id)
-               (gnus-summary-goto-subject number)
-               (gnus-summary-recenter)
-               (gnus-article-set-window-start 
-                (cdr (assq number gnus-newsgroup-bookmarks)))
-               message-id)
-           (gnus-message 1 "No such references")
-           nil))))))
+         ;; Save the old article buffer.
+         (save-excursion
+           (set-buffer tmp-buf)
+           (buffer-disable-undo (current-buffer))
+           (insert-buffer-substring gnus-article-buffer))
+         (prog1
+             (if (gnus-article-prepare 
+                  message-id nil (gnus-read-header message-id))
+                 (progn
+                   (setq number (header-number gnus-current-headers))
+                   (gnus-rebuild-thread message-id)
+                   (gnus-summary-goto-subject number)
+                   (gnus-summary-recenter)
+                   (gnus-article-set-window-start 
+                    (cdr (assq number gnus-newsgroup-bookmarks)))
+                   message-id)
+               ;; We restore the old article buffer.
+               (save-excursion
+                 (set-buffer gnus-article-buffer)
+                 (let ((buffer-read-only nil))
+                   (insert-buffer-substring tmp-buf)
+                   (and tmp-point
+                        (set-window-start (get-buffer-window (current-buffer))
+                                          tmp-point))))
+               nil)
+           (kill-buffer tmp-buf)))))))
 
 (defun gnus-summary-enter-digest-group ()
   "Enter a digest group based on the current article."
@@ -7953,41 +7983,35 @@ NOTE: This command only works with newsgroups that use real or simulated NNTP."
   (gnus-eval-in-buffer-window 
    gnus-article-buffer (isearch-forward)))
 
-(defun gnus-summary-search-article-forward (regexp)
+(defun gnus-summary-search-article-forward (regexp &optional backward)
   "Search for an article containing REGEXP forward.
-gnus-select-article-hook is not called during the search."
+If BACKWARD, search backward instead."
   (interactive
    (list (read-string
-         (concat "Search forward (regexp): "
+         (format "Search article %s (regexp%s): "
+                 (if current-prefix-arg "backward" "forward")
                  (if gnus-last-search-regexp
-                     (concat "(default " gnus-last-search-regexp ") "))))))
+                     (concat ", default " gnus-last-search-regexp)
+                   "")))
+        current-prefix-arg))
   (gnus-set-global-variables)
   (if (string-equal regexp "")
       (setq regexp (or gnus-last-search-regexp ""))
     (setq gnus-last-search-regexp regexp))
-  (if (gnus-summary-search-article regexp nil)
-      (gnus-eval-in-buffer-window 
-       gnus-article-buffer
-       (recenter 0))
+  (if (gnus-summary-search-article regexp backward)
+      (gnus-article-set-window-start 
+       (cdr (assq (gnus-summary-article-number) gnus-newsgroup-bookmarks)))
     (error "Search failed: \"%s\"" regexp)))
 
 (defun gnus-summary-search-article-backward (regexp)
-  "Search for an article containing REGEXP backward.
-gnus-select-article-hook is not called during the search."
+  "Search for an article containing REGEXP backward."
   (interactive
    (list (read-string
-         (concat "Search backward (regexp): "
+         (format "Search article backward (regexp%s): "
                  (if gnus-last-search-regexp
-                     (concat "(default " gnus-last-search-regexp ") "))))))
-  (gnus-set-global-variables)
-  (if (string-equal regexp "")
-      (setq regexp (or gnus-last-search-regexp ""))
-    (setq gnus-last-search-regexp regexp))
-  (if (gnus-summary-search-article regexp t)
-      (gnus-eval-in-buffer-window
-       gnus-article-buffer
-       (recenter 0))
-    (error "Search failed: \"%s\"" regexp)))
+                     (concat ", default " gnus-last-search-regexp)
+                   "")))))
+  (gnus-summary-search-article-forward regexp 'backward))
 
 (defun gnus-summary-search-article (regexp &optional backward)
   "Search for an article containing REGEXP.
@@ -8088,6 +8112,20 @@ article. If BACKWARD (the prefix) is non-nil, search backward instead."
   (gnus-set-global-variables)
   (gnus-summary-select-article gnus-have-all-headers t))
 
+(defun gnus-summary-verbose-header (arg)
+  "Toggle permanent full header display.
+If ARG is a positive number, turn header display on.
+If ARG is a negative number, turn header display off."
+  (interactive "P")
+  (gnus-set-global-variables)
+  (gnus-summary-toggle-header arg)
+  (setq gnus-have-all-headers
+       (cond ((or (not (numberp arg))
+                  (zerop arg))
+              (not gnus-have-all-headers))
+             ((natnump arg)
+              t))))
+
 (defun gnus-summary-toggle-header (arg)
   "Show the headers if they are hidden, or hide them if they are shown.
 If ARG is a positive number, show the entire header.
@@ -8811,14 +8849,14 @@ marked."
   (and (not no-expire)
        gnus-newsgroup-auto-expire 
        (or (not mark)
-          (and (numberp mark) (or (= mark gnus-killed-mark)
-                                  (= mark gnus-del-mark)
-                                  (= mark gnus-catchup-mark)
-                                  (= mark gnus-low-score-mark)
-                                  (= mark gnus-read-mark))))
+          (and (numberp mark) 
+               (or (= mark gnus-killed-mark) (= mark gnus-del-mark)
+                   (= mark gnus-catchup-mark) (= mark gnus-low-score-mark)
+                   (= mark gnus-read-mark) (= mark gnus-ancient-mark))))
        (setq mark gnus-expirable-mark))
   (let* ((mark (or (and (stringp mark) (aref mark 0)) mark gnus-del-mark))
         (article (or article (gnus-summary-article-number))))
+    (or article (error "No article on current line"))
     (if (or (= mark gnus-unread-mark) 
            (= mark gnus-ticked-mark) 
            (= mark gnus-dormant-mark))
@@ -8870,13 +8908,7 @@ marked."
     (setq gnus-newsgroup-marked (delq article gnus-newsgroup-marked))
     (setq gnus-newsgroup-dormant (delq article gnus-newsgroup-dormant))
     ;; Possibly remove from cache, if that is used. 
-    (and gnus-use-cache 
-        (gnus-cache-possibly-remove-article
-         gnus-newsgroup-name article 
-         (memq article gnus-newsgroup-marked)
-         (memq article gnus-newsgroup-dormant)
-         (or (memq article gnus-newsgroup-unreads)
-             (memq article gnus-newsgroup-unselected))))))
+    (and gnus-use-cache (gnus-cache-enter-remove-article article))))
 
 (defun gnus-mark-article-as-unread (article &optional mark)
   "Enter ARTICLE in the pertinent lists and remove it from others."
@@ -9866,6 +9898,7 @@ is initialized from the SAVEDIR environment variable."
   (define-key gnus-article-mode-map gnus-mouse-2 'gnus-article-push-button)
   (define-key gnus-article-mode-map "\r" 'gnus-article-press-button)
   (define-key gnus-article-mode-map "\t" 'gnus-article-next-button)
+  (define-key gnus-article-mode-map "\C-c\C-b" 'gnus-bug)
   
   ;; Duplicate almost all summary keystrokes in the article mode map.
   (let ((commands 
@@ -10063,19 +10096,16 @@ If ALL-HEADERS is non-nil, no headers are hidden."
                                (gnus-request-article-this-buffer 
                                 article group))))
            ;; There is no such article.
-           (progn
-             (save-excursion
+           (save-excursion
+             (if (not (numberp article))
+                 ()
+               (setq gnus-article-current 
+                     (cons gnus-newsgroup-name article))
                (set-buffer gnus-summary-buffer)
-               (setq gnus-current-article 0)
-               (and (numberp article) 
-                    (gnus-summary-mark-as-read article gnus-canceled-mark))
-               (gnus-message 1 "No such article (may be canceled)")
-               (and (numberp article)
-                    (setq gnus-current-article article))
-               (ding))
-             (and (numberp article)
-                  (setq gnus-article-current 
-                        (cons gnus-newsgroup-name article)))
+               (setq gnus-current-article article)
+               (gnus-summary-mark-as-read article gnus-canceled-mark))
+             (gnus-message 1 "No such article (may be canceled)")
+             (ding)
              nil)
          (if (or (eq result 'pseudo) (eq result 'nneething))
              (progn
@@ -10160,7 +10190,7 @@ If ALL-HEADERS is non-nil, no headers are hidden."
 (defun gnus-article-hide-headers-if-wanted ()
   "Hide unwanted headers if `gnus-have-all-headers' is nil.
 Provided for backwards compatability."
-  (or gnus-have-all-headers
+  (or (save-excursion (set-buffer gnus-summary-buffer) gnus-have-all-headers)
       (gnus-article-hide-headers)))
 
 (defun gnus-article-hide-headers (&optional delete)
@@ -10265,7 +10295,9 @@ Provided for backwards compatability."
       (goto-char (point-min))
       (search-forward "\n\n" nil t)
       (end-of-line 1)
-      (let ((paragraph-start "^\\W"))
+      (let ((paragraph-start "^\\W")
+           (adaptive-fill-regexp "[ \t]*\\([|#:<;>*]+ *\\)?")
+           (adaptive-fill-mode t))
        (while (not (eobp))
          (and (>= (current-column) (min fill-column (window-width)))
               (/= (preceding-char) ?:)
@@ -11341,8 +11373,7 @@ If LEVEL is non-nil, the news will be set up at level LEVEL."
     ;; hash table. The partial filling out of the hash table will be
     ;; done in `gnus-get-unread-articles'.
     (if (and gnus-read-active-file 
-            (not level)
-            (gnus-server-opened gnus-select-method))
+            (not level))
        (gnus-read-active-file)
       (setq gnus-active-hashtb (make-vector 4095 0)))
 
@@ -11707,12 +11738,22 @@ newsgroup."
   (let* ((newsrc (cdr gnus-newsrc-alist))
         (conditional level)
         (level (or level (1+ gnus-level-subscribed)))
+        (foreign-level
+         (min 
+          (cond ((and gnus-activate-foreign-newsgroups 
+                      (not (numberp gnus-activate-foreign-newsgroups)))
+                 (1+ gnus-level-subscribed))
+                ((numberp gnus-activate-foreign-newsgroups)
+                 gnus-activate-foreign-newsgroups)
+                (t 0))
+          level))
         info group active virtuals method)
     (gnus-message 5 "Checking new news...")
+
     (while newsrc
-      (setq info (car newsrc))
-      (setq group (car info))
-      (setq active (gnus-gethash group gnus-active-hashtb))
+      (setq info (car newsrc)
+           group (car info)
+           active (gnus-gethash group gnus-active-hashtb))
 
       ;; Check newsgroups. If the user doesn't want to check them, or
       ;; they can't be checked (for instance, if the news server can't
@@ -11723,29 +11764,31 @@ newsgroup."
               (not (gnus-server-equal gnus-select-method
                                       (gnus-server-get-method nil method)))
               (not (gnus-secondary-method-p method)))
-         ;; These groups are foreign.
-         (if (or (and gnus-activate-foreign-newsgroups 
-                      (not (numberp gnus-activate-foreign-newsgroups)))
-                 (and (numberp gnus-activate-foreign-newsgroups)
-                      (<= (nth 1 info) gnus-activate-foreign-newsgroups)
-                      (<= (nth 1 info) level)))
+         ;; These groups are foreign. Check the level.
+         (if (<= (nth 1 info) foreign-level)
              (if (eq (car (if (stringp method) 
                               (gnus-server-to-method method)
                             (nth 4 info))) 'nnvirtual)
+                 ;; We have to activate the virtual groups after all
+                 ;; the others, so we just pop them on a list for
+                 ;; now. 
                  (setq virtuals (cons info virtuals))
-               (setq active (gnus-activate-newsgroup (car info)))))
+               (and (setq active (gnus-activate-newsgroup (car info)))
+                    ;; Close the groups as we look at them!
+                    (gnus-close-group group))))
+               
        ;; These groups are native or secondary. 
-       (if (and (not gnus-read-active-file)
+       (if (and (not gnus-have-read-active-file)
                 (<= (nth 1 info) level))
-           (progn
-             (setq active (gnus-activate-newsgroup (car info))))))
+           (setq active (gnus-activate-newsgroup (car info)))))
       
-      (or active (progn (gnus-sethash group nil gnus-active-hashtb)
-                       (setcar (gnus-gethash group gnus-newsrc-hashtb) t)))
-      (and active 
-          (gnus-get-unread-articles-in-group info active)
-          ;; Close the groups as we look at them!
-          (gnus-close-group group))
+      (if active
+         (gnus-get-unread-articles-in-group info active)
+       ;; The group couldn't be reached, so we nix out the number of
+       ;; unread articles and stuff.
+       (gnus-sethash group nil gnus-active-hashtb)
+       (setcar (gnus-gethash group gnus-newsrc-hashtb) t))
+
       (setq newsrc (cdr newsrc)))
 
     ;; Activate the virtual groups. This has to be done after all the
@@ -11988,8 +12031,12 @@ Returns whether the updating was successful."
 ;; Get the active file(s) from the backend(s).
 (defun gnus-read-active-file ()
   (gnus-group-set-mode-line)
-  (let ((methods (cons gnus-select-method gnus-secondary-select-methods))
-       (not-first nil)
+  (let ((methods (if (gnus-server-opened gnus-select-method)
+                    ;; The native server is available.
+                    (cons gnus-select-method gnus-secondary-select-methods)
+                  ;; The native server is down, so we just do the
+                  ;; secondary ones.   
+                  gnus-secondary-select-methods))
        list-type)
     (setq gnus-have-read-active-file nil)
     (save-excursion
@@ -12023,20 +12070,17 @@ Returns whether the updating was successful."
                     (ding)
                     (sit-for 2))
                    ((eq list-type 'active)
-                    (gnus-active-to-gnus-format (and not-first (car methods)))
-                    (setq not-first t))
+                    (gnus-active-to-gnus-format (car methods)))
                    (t
-                    (gnus-groups-to-gnus-format (and not-first (car methods)))
-                    (setq not-first t)))))
+                    (gnus-groups-to-gnus-format (car methods))))))
           (t
            (if (not (gnus-request-list (car methods)))
                (progn
                  (gnus-message 1 "Cannot read active file from %s server." 
                                (car (car methods)))
                  (ding))
-             (gnus-active-to-gnus-format (and not-first (car methods)))
-             (setq gnus-have-read-active-file t
-                   not-first t)
+             (gnus-active-to-gnus-format (car methods))
+             (setq gnus-have-read-active-file t)
              (gnus-message 5 "%sdone" mesg)))))
        (setq methods (cdr methods))))))
 
@@ -12044,11 +12088,14 @@ Returns whether the updating was successful."
 (defun gnus-active-to-gnus-format (method &optional hashtb ignore-errors)
   (let ((cur (current-buffer))
        (hashtb (or hashtb 
-                   (if method
+                   (if (and gnus-active-hashtb 
+                            (not (equal method gnus-select-method)))
                        gnus-active-hashtb
                      (setq gnus-active-hashtb
-                           (gnus-make-hashtable 
-                            (count-lines (point-min) (point-max))))))))
+                           (if (equal method gnus-select-method)
+                               (gnus-make-hashtable 
+                                (count-lines (point-min) (point-max)))
+                             (gnus-make-hashtable 4096)))))))
     ;; Delete unnecessary lines.
     (goto-char (point-min))
     (while (search-forward "\nto." nil t)
@@ -12207,7 +12254,7 @@ If FORCE is non-nil, the .newsrc file is read."
        (error nil))
       (and gnus-newsrc-assoc (setq gnus-newsrc-alist gnus-newsrc-assoc)))
     (let ((inhibit-quit t))
-      (gnus-uncompress-newsrc-assoc))
+      (gnus-uncompress-newsrc-alist))
     (gnus-make-hashtable-from-newsrc-alist)
     (if (not (file-newer-than-file-p file ding-file))
        ()
@@ -12267,7 +12314,7 @@ If FORCE is non-nil, the .newsrc file is read."
     (if (file-exists-p real-file)
        real-file file)))
 
-(defun gnus-uncompress-newsrc-assoc ()
+(defun gnus-uncompress-newsrc-alist ()
   ;; Uncompress all lists of marked articles in the newsrc assoc.
   (let ((newsrc gnus-newsrc-alist)
        marked)
@@ -12282,7 +12329,7 @@ If FORCE is non-nil, the .newsrc file is read."
          (setq marked (cdr marked))))
       (setq newsrc (cdr newsrc)))))
 
-(defun gnus-compress-newsrc-assoc ()
+(defun gnus-compress-newsrc-alist ()
   ;; Compress all lists of marked articles in the newsrc assoc.
   (let ((newsrc gnus-newsrc-alist)
        marked)
@@ -12588,7 +12635,7 @@ If FORCE is non-nil, the .newsrc file is read."
        (gnus-newsrc-alist (cdr gnus-newsrc-alist))
        variable)
     ;; insert lisp expressions.
-    (gnus-compress-newsrc-assoc)
+    (gnus-compress-newsrc-alist)
     (while variables
       (setq variable (car variables))
       (and (boundp variable)
@@ -12598,7 +12645,7 @@ If FORCE is non-nil, the .newsrc file is read."
                   (prin1-to-string (symbol-value variable))
                   ")\n"))
       (setq variables (cdr variables)))
-    (gnus-uncompress-newsrc-assoc)))
+    (gnus-uncompress-newsrc-alist)))
 
 
 (defun gnus-gnus-to-newsrc-format ()
index dbf1dc3..973b7a5 100644 (file)
       ;; Find the lowest active article in this group.
       (let ((active (nth 1 (assoc newsgroup nnbabyl-group-alist))))
        (goto-char (point-min))
-       (while (not (search-forward
-                    (nnbabyl-article-string (car active)) nil t))
+       (while (and (not (search-forward
+                         (nnbabyl-article-string (car active)) nil t))
+                   (<= (car active) (cdr active)))
          (setcar active (1+ (car active)))
          (goto-char (point-min))))
       (nnmail-save-active nnbabyl-group-alist nnbabyl-active-file)
index 26c1cd8..f916a38 100644 (file)
                 (point-max)))
           (point-max))
        (erase-buffer)
-       (nneething-make-head file) t)))))
+       (nneething-make-head file))
+      t))))
 
 (defun nneething-number-to-file (number)
   (car (rassq number nneething-map)))
index 2ef2744..7e18d64 100644 (file)
@@ -145,25 +145,27 @@ If the stream is opened, return T, otherwise return NIL."
 (defun nnkiboze-close-group (group &optional server)
   (nnkiboze-possibly-change-newsgroups group)
   ;; Remove NOV lines of articles that are marked as read.
-  (save-excursion
-    (let ((unreads gnus-newsgroup-unreads)
-         (unselected gnus-newsgroup-unselected))
-      (set-buffer (get-buffer-create "*nnkiboze work*"))
-      (buffer-disable-undo (current-buffer))
-      (erase-buffer)
-      (let ((cur (current-buffer))
-           article)
-       (insert-file-contents (nnkiboze-nov-file-name))
-       (goto-char (point-min))
-       (while (looking-at "[0-9]+")
-         (if (or (memq (setq article (read cur)) unreads)
-                 (memq article unselected))
-             (forward-line 1)
-           (delete-region (progn (beginning-of-line) (point))
-                          (progn (forward-line 1) (point)))))
-       (write-file (nnkiboze-nov-file-name))
-       (kill-buffer (current-buffer)))))
-  (setq nnkiboze-current-group nil))
+  (if (not (file-exists-p (nnkiboze-nov-file-name)))
+      ()
+    (save-excursion
+      (let ((unreads gnus-newsgroup-unreads)
+           (unselected gnus-newsgroup-unselected))
+       (set-buffer (get-buffer-create "*nnkiboze work*"))
+       (buffer-disable-undo (current-buffer))
+       (erase-buffer)
+       (let ((cur (current-buffer))
+             article)
+         (insert-file-contents (nnkiboze-nov-file-name))
+         (goto-char (point-min))
+         (while (looking-at "[0-9]+")
+           (if (or (memq (setq article (read cur)) unreads)
+                   (memq article unselected))
+               (forward-line 1)
+             (delete-region (progn (beginning-of-line) (point))
+                            (progn (forward-line 1) (point)))))
+         (write-file (nnkiboze-nov-file-name))
+         (kill-buffer (current-buffer)))))
+    (setq nnkiboze-current-group nil)))
 
 (defun nnkiboze-request-list (&optional server) 
   (setq nnkiboze-status-string "nnkiboze: LIST is not implemented.")
index f2d6ba2..16e66bd 100644 (file)
@@ -102,7 +102,9 @@ The file(s) in `nnmail-spool-file' will also be read.")
 The Gnus mail backends will read the mail from this directory.")
 
 (defvar nnmail-procmail-suffix ".spool"
-  "*Suffix of files created by procmail (and the like).")
+  "*Suffix of files created by procmail (and the like).
+This variable might be a suffix-regexp to match the suffixes of
+several files - eg. \".spool[0-9]*\".")
 
 (defvar nnmail-resplit-incoming nil
   "*If non-nil, re-split incoming procmail sorted mail.")
index f6e40a6..4e5017f 100644 (file)
   (let* ((days (or (and nnmail-expiry-wait-function
                        (funcall nnmail-expiry-wait-function newsgroup))
                   nnmail-expiry-wait))
+        (active-articles 
+         (mapcar
+          (function
+           (lambda (name)
+             (string-to-int name)))
+          (directory-files nnmh-current-directory nil "^[0-9]+$" t)))
+        (max-article (and active-articles (apply 'max active-articles)))
         article rest mod-time)
-    (if nnmail-keep-last-article
-       (progn
-         (setq articles (sort articles '>))
-         (setq rest (cons (car articles) rest))
-         (setq articles (cdr articles))))
     (while articles
-      (setq article (concat nnmh-current-directory (int-to-string
-                                                   (car articles))))
+      (setq article (concat nnmh-current-directory 
+                           (int-to-string (car articles))))
       (if (setq mod-time (nth 5 (file-attributes article)))
-         (and (or force
-                  (> (nnmail-days-between
-                      (current-time-string)
-                      (current-time-string mod-time))
-                     days))
-              (progn
-                (message "Deleting %s..." article)
-                (condition-case ()
-                    (progn
-                      (delete-file article)
-                      t)
-                  (file-error nil)))
-              (setq rest (cons (car articles) rest))))
+         (if (and (or (not nnmail-keep-last-article)
+                      (not max-article)
+                      (not (= (car articles) max-article)))
+                  (or force
+                      (> (nnmail-days-between
+                          (current-time-string)
+                          (current-time-string mod-time))
+                         days)))
+             (progn
+               (and gnus-verbose-backends (message "Deleting %s..." article))
+               (condition-case ()
+                   (delete-file article)
+                 (file-error
+                  (setq rest (cons (car articles) rest)))))
+           (setq rest (cons (car articles) rest))))
       (setq articles (cdr articles)))
+    (message "")
     rest))
 
 (defun nnmh-close-group (group &optional server)
index 6d1b9a9..83043eb 100644 (file)
@@ -271,8 +271,8 @@ all. This may very well take some time.")
         (max-article (and active-articles (apply 'max active-articles)))
         article rest mod-time)
     (while articles
-      (setq article (concat nnml-current-directory (int-to-string
-                                                     (car articles))))
+      (setq article (concat nnml-current-directory 
+                           (int-to-string (car articles))))
       (if (setq mod-time (nth 5 (file-attributes article)))
          (if (and (or (not nnmail-keep-last-article)
                       (not max-article)
index fac5418..5b9536c 100644 (file)
@@ -190,9 +190,11 @@ The SOUP packet file name will be inserted at the %s.")
            (nnheader-restore-variables (nth 1 state))
            (setq nnsoup-server-alist (delq state nnsoup-server-alist)))
        (nnheader-set-init-variables nnsoup-server-variables defs)))
-    (setq nnsoup-current-server server)))
+    (setq nnsoup-current-server server))
+  (nnsoup-read-active-file))
 
 (defun nnsoup-request-close ()
+  (nnsoup-write-active-file)
   (nnsoup-write-replies)
   (while nnsoup-buffers
     (and (car nnsoup-buffers)
@@ -202,7 +204,8 @@ The SOUP packet file name will be inserted at the %s.")
   (setq nnsoup-group-alist nil
        nnsoup-current-group nil
        nnsoup-current-server nil
-       nnsoup-server-alist nil)
+       nnsoup-server-alist nil
+       nnsoup-replies-list nil)
   t)
 
 (defun nnsoup-close-server (&optional server)
index 35cfac7..75b67a4 100644 (file)
@@ -60,8 +60,8 @@ The default value is `nntp-send-mode-reader', which makes an innd
 server spawn an nnrpd server.  Another useful function to put in this
 hook might be `nntp-send-authinfo', which will prompt for a password
 to allow posting from the server.  Note that this is only necessary to
-do on servers that use strict access control.")  (add-hook
-'nntp-server-opened-hook 'nntp-send-mode-reader)
+do on servers that use strict access control.")  
+(add-hook 'nntp-server-opened-hook 'nntp-send-mode-reader)
 
 (defvar nntp-open-server-function 'nntp-open-network-stream
   "*Function used for connecting to a remote system.
@@ -501,7 +501,7 @@ instead call function `nntp-status-message' to get status message.")
    (if (not (or (nntp-async-server-opened)
                (nntp-async-open-server)))
        (progn
-        (message "Can't open second connection to %s" nntp-address)
+        (message "Can't open second connection to %s" nntp-current-server)
         (ding)
         (setq nntp-async-articles nil)
         (sit-for 2))
index 2873a94..557f243 100644 (file)
@@ -1,4 +1,4 @@
-x      \input texinfo                  @c -*-texinfo-*-
+\input texinfo                  @c -*-texinfo-*-
 @comment %**start of header (This is for running Texinfo on a region.)
 @setfilename gnus
 @settitle (ding) Gnus 0.84 Manual
@@ -4492,6 +4492,20 @@ names will not be used for score files, if it contains the element
 contains the element @code{not-kill}, long file names will not be used
 for kill files.
 
+If you'd like to save articles in a hierarchy that looks something like
+a spool, you could
+
+@lisp
+(setq gnus-use-long-file-name '(not-save)) ; to get a hierarchy
+(setq gnus-default-article-save 'gnus-summary-save-in-file) ; no encoding
+@end lisp
+
+Then just save with @kbd{o}. You'd then read this hierarchy with
+ephemeral @code{nneething} groups - @kbd{G D} in the group buffer, and
+the toplevel directory as the argument (@file{~/News/}). Then just walk
+around to the groups/directories with @code{nneething}.
+
+
 @node Decoding Articles
 @section Decoding Articles
 @cindex decoding articles