*** empty log message ***
authorLars Magne Ingebrigtsen <larsi@gnus.org>
Tue, 4 Mar 1997 21:05:12 +0000 (21:05 +0000)
committerLars Magne Ingebrigtsen <larsi@gnus.org>
Tue, 4 Mar 1997 21:05:12 +0000 (21:05 +0000)
15 files changed:
GNUS-NEWS
lisp/ChangeLog
lisp/article.el
lisp/gnus-art.el
lisp/gnus-eform.el
lisp/gnus-group.el
lisp/gnus-load.el
lisp/gnus-score.el
lisp/gnus-sum.el
lisp/gnus-win.el
lisp/gnus.el
lisp/nnmail.el
lisp/nntp.el
texi/ChangeLog
texi/gnus.texi

index a06a4df..6bd1032 100644 (file)
--- a/GNUS-NEWS
+++ b/GNUS-NEWS
@@ -12,3 +12,25 @@ Gnus.
 article mode line.
 
 *** gnus.el has been split into many smaller files.
+
+*** Suppression of duplicate articles based on Message-ID.
+
+(setq gnus-suppress-duplicates t)
+
+*** New variables for specifying what score and adapt files
+are to be considered home score and adapt files.  See
+`gnus-home-score-file' and `gnus-home-adapt-files'.
+
+*** Groups can inherit group parameters from parent topics.
+
+*** Article editing has been revamped and is now usable.
+
+*** Signatures can be recognized in more intelligent fashions.
+See `gnus-signature-separator' and `gnus-signature-limit'.
+
+*** Summary pick mode has been made to look more nn-like.
+Line numbers are displayed and the `.' command can be
+used to pick articles.
+
+*** Commands for moving the .newsrc.eld from one server to
+another have been added.
index 865246c..ee9ef59 100644 (file)
@@ -1,3 +1,50 @@
+Sun Aug  4 00:17:51 1996  Lars Magne Ingebrigtsen  <larsi@ifi.uio.no>
+
+       * nntp.el (nntp-wait-for): Goto point-max before inserting.
+       (nntp-retrieve-headers): Didn't inhibit Erasure.
+
+       * gnus-eform.el (gnus-edit-form-mode-map): Buggy.
+
+       * nntp.el (nntp-send-command-nodelete): New function.
+
+Sat Aug  3 22:21:24 1996  Lars Magne Ingebrigtsen  <larsi@ifi.uio.no>
+
+       * article.el (article-date-ut): Wouldn't do anything much.
+
+       * nntp.el (nntp-wait-for): Wouldn't allow posting.
+
+       * nnmail.el (nnmail-delete-incoming): Set to nil.
+
+Sat Aug  3 01:31:24 1996  Lars Magne Ingebrigtsen  <lars@eyesore.no>
+
+       * gnus-score.el (gnus-home-score-file): New variable.
+       (gnus-home-score-file): New function.
+       (gnus-hierarchial-home-score-file): New function.
+       (gnus-possibly-score-headers): Use `adapt-file' param.
+       (gnus-home-adapt-file): New variable.
+       (gnus-hierarchial-home-adapt-file): New function.
+
+       * gnus-load.el (gnus-original-article-buffer): Moved here.
+
+       * gnus-sum.el (gnus-article-mark): New macro.
+       (gnus-summary-prepare-unthreaded): Use it.
+       (gnus-summary-prepare-threads): Ditto.
+
+       * gnus-win.el (gnus-buffer-configuration): New `edit-article'
+       setting. 
+
+       * gnus-sum.el (gnus-summary-edit-article): Don't move point in the
+       article buffer.
+       (gnus-summary-edit-article-done): Don't move point after editing.
+       (gnus-summary-edit-article-postpone): Removed.
+       (gnus-summary-update-article-line): New function.
+
+       * gnus-art.el (gnus-article-edit-mode-map): Buggy map.
+
+Fri Aug  2 22:36:40 1996  Lars Magne Ingebrigtsen  <larsi@ifi.uio.no>
+
+       * gnus.el: Red Gnus v0.4 is released.
+
 Wed Jul 31 15:23:54 1996  Ken Olstad  <ken@mn.cheyenne.com>
 
        * gnus-xmas.el (gnus-xmas-redefine): Disbale XFace when running
index af70e95..52470dc 100644 (file)
@@ -656,7 +656,8 @@ If TYPE is `local', convert to local time; if it is `lapsed', output
 how much time has lapsed since DATE."
   (interactive (list 'ut t))
   (let* ((header (or header (message-fetch-field "date") ""))
-        (date (and (vectorp header) (mail-header-date header)))
+        (date (if (vectorp header) (mail-header-date header)
+                header))
         (date-regexp "^Date: \\|^X-Sent: ")
         (now (current-time))
         (inhibit-point-motion-hooks t)
index f5977b8..26f5e60 100644 (file)
@@ -1161,13 +1161,16 @@ how much time has lapsed since DATE."
 (defvar gnus-article-edit-mode-hook nil
   "*Hook run in article edit mode buffers.")
 
+(defvar gnus-article-edit-done-function nil)
+
 (defvar gnus-article-edit-mode-map nil)
 
 (unless gnus-article-edit-mode-map 
   (setq gnus-article-edit-mode-map (copy-keymap text-mode-map))
 
   (gnus-define-keys gnus-article-edit-mode-map
-    "\C-c\C-c" 'gnus-summary-edit-article-done)
+    "\C-c\C-c" gnus-article-edit-done
+    "\C-c\C-k" gnus-article-edit-exit)
 
   (gnus-define-keys (gnus-article-edit-wash-map
                     "\C-c\C-w" gnus-article-edit-mode-map)
@@ -1182,10 +1185,62 @@ This is an extended text-mode.
   (kill-all-local-variables)
   (setq major-mode 'gnus-article-edit-mode)
   (setq mode-name "Article Edit")
-  (make-local-variable 'minor-mode-alist)
   (use-local-map gnus-article-edit-mode-map)
+  (make-local-variable 'gnus-article-edit-done-function)
+  (make-local-variable 'gnus-prev-winconf)
+  (setq buffer-read-only nil)
+  (buffer-enable-undo)
+  (widen)
   (run-hooks 'text-mode 'gnus-article-edit-mode-hook))
 
+(defun gnus-article-edit-article (exit-func)
+  "Start editing the contents of the current article buffer."
+  (let ((winconf (current-window-configuration)))
+    (set-buffer gnus-article-buffer)
+    (gnus-article-edit-mode)
+    (gnus-configure-windows 'edit-article)
+    (setq gnus-article-edit-done-function exit-func)
+    (setq gnus-prev-winconf winconf)
+    (gnus-message 6 "C-c C-c to end edits")))
+
+(defun gnus-article-edit-done ()
+  "Update the article edits and exit."
+  (interactive)
+  (let ((func gnus-article-edit-done-function)
+       (buf (current-buffer)))
+    (gnus-article-edit-exit)
+    (save-excursion
+      (set-buffer buf)
+      (let ((buffer-read-only nil))
+       (funcall func)))))
+
+(defun gnus-article-edit-exit ()
+  "Exit the article editing without updating."
+  (interactive)
+      ;; We remove all text props from the article buffer.
+    (let ((buf (format "%s" (buffer-string)))
+         (p (point))
+         (window-start (window-start)))
+      (erase-buffer)
+      (insert buf)
+      (goto-char p)
+      (set-window-start (selected-window) window-start))
+    (let ((winconf gnus-prev-winconf))
+      (gnus-article-mode)
+      ;; The cache and backlog have to be flushed somewhat.
+      (when gnus-use-cache
+       (gnus-cache-update-article      
+        (car gnus-article-current) (cdr gnus-article-current)))
+      (when gnus-keep-backlog
+       (gnus-backlog-remove-article 
+        (car gnus-article-current) (cdr gnus-article-current)))
+      ;; Flush original article as well.
+      (save-excursion
+       (when (get-buffer gnus-original-article-buffer)
+         (set-buffer gnus-original-article-buffer)
+         (setq gnus-original-article nil)))
+      (set-window-configuration winconf)))
+      
 (defun gnus-article-edit-full-stops ()
   "Interactively repair spacing at end of sentences."
   (interactive)
index 013df24..e4cc23f 100644 (file)
 ;;; Internal variables
 
 (defvar gnus-edit-form-done-function nil)
-(defvar gnus-edit-form-buffer  "*Gnus edit form*")
+(defvar gnus-edit-form-buffer "*Gnus edit form*")
 
 (defvar gnus-edit-form-mode-map nil)
 (unless gnus-edit-form-mode-map
-  (set gnus-edit-form-mode-map (copy-keymap emacs-lisp-mode-map))
+  (setq gnus-edit-form-mode-map (copy-keymap emacs-lisp-mode-map))
   (gnus-define-keys gnus-edit-form-mode-map
     "\C-c\C-c" gnus-edit-form-done
     "\C-c\C-k" gnus-edit-form-exit))
index 9dbc751..25f82f1 100644 (file)
@@ -105,7 +105,7 @@ with some simple extensions.
 %i    Number of ticked and dormant (integer)
 %T    Number of ticked articles (integer)
 %R    Number of read articles (integer)
-%t    Total number of articles (integer)
+%t    Estimated total number of articles (integer)
 %y    Number of unread, unticked articles (integer)
 %G    Group name (string)
 %g    Qualified group name (string)
@@ -197,7 +197,6 @@ variable.")
   "Function to override finding the next group after listing groups.")
 
 (defvar gnus-group-edit-buffer nil)
-(defvar gnus-edit-form-buffer nil)
 
 (defvar gnus-group-line-format-alist
   `((?M gnus-tmp-marked-mark ?c)
index 66b74c9..88cc4a1 100644 (file)
@@ -417,6 +417,7 @@ It is called with three parameters -- GROUP, LEVEL and OLDLEVEL.")
 \f
 ;;; Internal variables
 
+(defvar gnus-original-article-buffer " *Original Article*")
 (defvar gnus-newsgroup-name nil)
 
 (defvar gnus-current-select-method nil
index 8f97fdc..c2b40ca 100644 (file)
@@ -110,6 +110,37 @@ will be expired along with non-matching score entries.")
 (defvar gnus-orphan-score nil
   "*All orphans get this score added. Set in the score file.")
 
+(defvar gnus-home-score-file nil
+  "Variable to control where interative score entries are to go.
+It can be:
+
+ * A string
+   This file file will be used as the home score file.
+
+ * A function
+   The result of this function will be used as the home score file.
+
+ * A list
+   The elements in this list can be:
+
+   * `(regexp . file-name)'
+     If the `regexp' matches the group name, the `file-name' will
+     will be used as the home score file.
+
+   * A function.
+     If the function returns non-nil, the result will be used
+     as the home score file.
+
+   * A string.
+     Use the string as the home score file.
+
+   The list will be traversed from the beginning towards the end looking
+   for matches.")
+
+(defvar gnus-home-adapt-file nil
+  "Variable to control where new adaptive score entries are to go.
+This variable allows the same syntax as `gnus-home-score-file'.")
+
 (defvar gnus-default-adaptive-score-alist  
   '((gnus-kill-file-mark)
     (gnus-unread-mark)
@@ -2191,6 +2222,7 @@ The list is determined from the variable gnus-score-file-alist."
 
 (defun gnus-possibly-score-headers (&optional trace)
   (let ((funcs gnus-score-find-score-files-function)
+       (group gnus-newsgroup-name)
        score-files)
     ;; Make sure funcs is a list.
     (and funcs
@@ -2198,19 +2230,32 @@ The list is determined from the variable gnus-score-file-alist."
         (setq funcs (list funcs)))
     ;; Get the initial score files for this group.
     (when funcs 
-      (setq score-files (gnus-score-find-alist gnus-newsgroup-name)))
+      (setq score-files (gnus-score-find-alist group)))
+    ;; Add any home adapt files.
+    (let ((home (gnus-home-score-file group t)))
+      (when home
+       (push home score-files)
+       (setq gnus-newsgroup-adaptive-score-file home)))
+    ;; Check whether there is a `adapt-file' group parameter.
+    (let ((param-file (gnus-group-get-parameter group 'adapt-file)))
+      (when param-file
+       (push param-file score-files)
+       (setq gnus-newsgroup-adaptive-score-file param-file)))
     ;; Go through all the functions for finding score files (or actual
     ;; scores) and add them to a list.
     (while funcs
       (when (gnus-functionp (car funcs))
        (setq score-files 
-             (nconc score-files (funcall (car funcs) gnus-newsgroup-name))))
+             (nconc score-files (funcall (car funcs) group))))
       (setq funcs (cdr funcs)))
+    ;; Add any home score files.
+    (let ((home (gnus-home-score-file group)))
+      (when home
+       (setq score-files (nconc score-files (list home)))))
     ;; Check whether there is a `score-file' group parameter.
-    (let ((param-file (gnus-group-get-parameter 
-                      gnus-newsgroup-name 'score-file)))
+    (let ((param-file (gnus-group-get-parameter group 'score-file)))
       (when param-file
-       (push param-file score-files)))
+       (setq score-files (nconc score-files (list param-file)))))
     ;; Do the scoring if there are any score files for this group.
     (when score-files
       (gnus-score-headers score-files trace))))
@@ -2259,6 +2304,48 @@ The list is determined from the variable gnus-score-file-alist."
       (gnus-message 1 "New score file entries will be case insensitive.")
     (gnus-message 1 "New score file entries will be case sensitive.")))
 
+;;; Home score file.
+
+(defun gnus-home-score-file (group &optional adapt)
+  "Return the home score file for GROUP.
+If ADAPT, return the home adaptive file instead."
+  (let ((list (if adapt gnus-home-adapt-file gnus-home-score-file))
+       elem found)
+    ;; Make sure we have a list.
+    (unless (listp list)
+      (setq list (list list)))
+    ;; Go through the list and look for matches.
+    (while (and (not found)
+               (setq elem (pop list)))
+      (setq found
+           (cond
+            ;; Simple string.
+            ((stringp elem)
+             elem)
+            ;; Function.
+            ((gnus-functionp elem)
+             (funcall elem group))
+            ;; Regexp-file cons
+            ((consp elem)
+             (when (string-match (car elem) group)
+               (cdr elem))))))
+    (when found
+      (nnheader-concat gnus-kill-files-directory found))))
+
+(defun gnus-hierarchial-home-score-file (group)
+  "Return the score file of the top-level hierarchy of GROUP."
+  (if (string-match "^[^.]+\\." group)
+      (concat (match-string 0 group) "all." gnus-score-file-suffix)
+    ;; Group name without any dots.
+    (concat group ".all." gnus-score-file-suffix)))
+      
+(defun gnus-hierarchial-home-adapt-file (group)
+  "Return the adapt file of the top-level hierarchy of GROUP."
+  (if (string-match "^[^.]+\\." group)
+      (concat (match-string 0 group) "all." gnus-adaptive-file-suffix)
+    ;; Group name without any dots.
+    (concat group ".all." gnus-adaptive-file-suffix)))
+      
 (provide 'gnus-score)
 
 ;;; gnus-score.el ends here
index eab5ff8..af6216f 100644 (file)
@@ -443,7 +443,6 @@ automatically when it is selected.")
 
 ;;; Internal variables
 
-(defvar gnus-original-article-buffer " *Original Article*")
 (defvar gnus-original-article nil)
 (defvar gnus-article-internal-prepare-hook nil)
 
@@ -1378,6 +1377,15 @@ This is all marks except unread, ticked, dormant, and expirable."
           (= mark gnus-dormant-mark)
           (= mark gnus-expirable-mark))))
 
+(defmacro gnus-article-mark (number)
+  `(cond
+    ((memq ,number gnus-newsgroup-unreads) gnus-unread-mark)
+    ((memq ,number gnus-newsgroup-marked) gnus-ticked-mark)
+    ((memq ,number gnus-newsgroup-dormant) gnus-dormant-mark)
+    ((memq ,number gnus-newsgroup-expirable) gnus-expirable-mark)
+    (t (or (cdr (assq ,number gnus-newsgroup-reads))
+          gnus-ancient-mark))))
+
 ;; Saving hidden threads.
 
 (put 'gnus-save-hidden-threads 'lisp-indent-function 0)
@@ -2053,6 +2061,34 @@ If NO-DISPLAY, don't generate a summary buffer."
                      (delq number gnus-newsgroup-unselected)))
            (push number gnus-newsgroup-ancient)))))))
 
+(defun gnus-summary-update-article-line (article header)
+  "Update the line for ARTICLE using HEADERS."
+  (let* ((id (mail-header-id header))
+        (thread (gnus-id-to-thread id)))
+    (unless thread
+      (error "Article in no thread"))
+    ;; Update the thread.
+    (setcar thread header)
+    (gnus-summary-goto-subject article)
+    (let* ((datal (gnus-data-find-list article))
+          (data (car datal))
+          (length (when (cdr datal)
+                    (- (gnus-data-pos data)
+                       (gnus-data-pos (cadr datal)))))
+          (buffer-read-only nil)
+          (level (gnus-summary-thread-level)))
+      (gnus-delete-line)
+      (gnus-summary-insert-line
+       header level nil (gnus-article-mark article)
+       (memq article gnus-newsgroup-replied)
+       (memq article gnus-newsgroup-expirable)
+       (mail-header-subject header)
+       nil (cdr (assq article gnus-newsgroup-scored))
+       (memq article gnus-newsgroup-processable))
+      (when length
+       (gnus-data-update-list
+        (cdr datal) (- length (- (gnus-data-pos data) (point))))))))
+     
 (defun gnus-summary-update-article (article &optional iheader)
   "Update ARTICLE in the summary buffer."
   (set-buffer gnus-summary-buffer)
@@ -2545,15 +2581,7 @@ or a straight list of headers."
              (setq gnus-tmp-dummy-line nil))
 
            ;; Compute the mark.
-           (setq
-            gnus-tmp-unread
-            (cond
-             ((memq number gnus-newsgroup-unreads) gnus-unread-mark)
-             ((memq number gnus-newsgroup-marked) gnus-ticked-mark)
-             ((memq number gnus-newsgroup-dormant) gnus-dormant-mark)
-             ((memq number gnus-newsgroup-expirable) gnus-expirable-mark)
-             (t (or (cdr (assq number gnus-newsgroup-reads))
-                    gnus-ancient-mark))))
+           (setq gnus-tmp-unread (gnus-article-mark number))
 
            (push (gnus-data-make number gnus-tmp-unread (1+ (point))
                                  gnus-tmp-header gnus-tmp-level)
@@ -2663,14 +2691,7 @@ or a straight list of headers."
            (push (cons number gnus-low-score-mark)
                  gnus-newsgroup-reads)))
 
-       (setq mark
-             (cond
-              ((memq number gnus-newsgroup-marked) gnus-ticked-mark)
-              ((memq number gnus-newsgroup-dormant) gnus-dormant-mark)
-              ((memq number gnus-newsgroup-unreads) gnus-unread-mark)
-              ((memq number gnus-newsgroup-expirable) gnus-expirable-mark)
-              (t (or (cdr (assq number gnus-newsgroup-reads))
-                     gnus-ancient-mark))))
+       (setq mark (gnus-article-mark number))
        (setq gnus-newsgroup-data
              (cons (gnus-data-make number mark (1+ (point)) header 0)
                    gnus-newsgroup-data))
@@ -5690,66 +5711,47 @@ groups."
     (when (and (not force)
               (gnus-group-read-only-p))
       (error "The current newsgroup does not support article editing."))
-    (gnus-summary-select-article t nil t)
-    (gnus-configure-windows 'article)
-    (select-window (get-buffer-window gnus-article-buffer))
-    (gnus-message 6 "C-c C-c to end edits")
-    (setq buffer-read-only nil)
-    (gnus-article-edit-mode)
-    (buffer-enable-undo)
-    (widen)
-    (goto-char (point-min))
-    (search-forward "\n\n" nil t)))
-
-(defun gnus-summary-edit-article-done ()
+    ;; Select article if needed.
+    (unless (eq (gnus-summary-article-number)
+               gnus-current-article)
+      (gnus-summary-select-article t))
+    (gnus-article-edit-article
+     `(lambda ()
+       (gnus-summary-edit-article-done
+        ,(mail-header-references gnus-current-headers)
+        ,(gnus-group-read-only-p) ,gnus-summary-buffer)))))
+
+(defun gnus-summary-edit-article-done (references read-only buffer)
   "Make edits to the current article permanent."
   (interactive)
-  (if (gnus-group-read-only-p)
-      (progn
-       (let ((beep (not (eq major-mode 'text-mode))))
-         (gnus-summary-edit-article-postpone)
-         (when beep
-           (gnus-error
-            3 "The current newsgroup does not support article editing."))))
-    (let ((buf (format "%s" (buffer-string))))
-      (erase-buffer)
-      (insert buf)
-      (if (not (gnus-request-replace-article
-               (cdr gnus-article-current) (car gnus-article-current)
-               (current-buffer)))
-         (error "Couldn't replace article.")
-       (gnus-article-mode)
-       (use-local-map gnus-article-mode-map)
-       (setq buffer-read-only t)
-       (buffer-disable-undo (current-buffer))
-       (gnus-configure-windows 'summary)
-       (gnus-summary-update-article (cdr gnus-article-current))
-       (when gnus-use-cache
-         (gnus-cache-update-article    
-          (car gnus-article-current) (cdr gnus-article-current)))
-       (when gnus-keep-backlog
-         (gnus-backlog-remove-article 
-          (car gnus-article-current) (cdr gnus-article-current))))
-      (save-excursion
-       (when (get-buffer gnus-original-article-buffer)
-         (set-buffer gnus-original-article-buffer)
-         (setq gnus-original-article nil)))
-      (setq gnus-article-current nil
-           gnus-current-article nil)
-      (run-hooks 'gnus-article-display-hook)
-      (and (gnus-visual-p 'summary-highlight 'highlight)
-          (run-hooks 'gnus-visual-mark-article-hook)))))
-
-(defun gnus-summary-edit-article-postpone ()
-  "Postpone changes to the current article."
-  (interactive)
-  (gnus-article-mode)
-  (use-local-map gnus-article-mode-map)
-  (setq buffer-read-only t)
-  (buffer-disable-undo (current-buffer))
-  (gnus-configure-windows 'summary)
-  (and (gnus-visual-p 'summary-highlight 'highlight)
-       (run-hooks 'gnus-visual-mark-article-hook)))
+  ;; Replace the article.
+  (if (and (not read-only)
+          (not (gnus-request-replace-article
+                (cdr gnus-article-current) (car gnus-article-current)
+                (current-buffer))))
+      (error "Couldn't replace article.")
+    ;; Update the summary buffer.
+    (if (equal (message-tokenize-header references " ")
+              (message-tokenize-header
+               (message-fetch-field "references") " "))
+       ;; We only have to update this line.
+       (save-restriction
+         (message-narrow-to-head)
+         (let ((header (nnheader-parse-head t)))
+           (set-buffer buffer)
+           (mail-header-set-number header (cdr gnus-article-current))
+           (gnus-summary-update-article-line
+            (cdr gnus-article-current) header)))
+      ;; Update threads.
+      (set-buffer buffer)
+      (gnus-summary-update-article (cdr gnus-article-current)))
+    ;; Prettify the article buffer again.
+    (save-excursion
+      (set-buffer gnus-article-buffer)
+      (run-hooks 'gnus-article-display-hook))
+    ;; Prettify the summary buffer line.
+    (when (gnus-visual-p 'summary-highlight 'highlight)
+      (run-hooks 'gnus-visual-mark-article-hook))))
 
 (defun gnus-summary-edit-wash (key)
   "Perform editing command in the article buffer."
@@ -5761,7 +5763,7 @@ groups."
   (message "")
   (gnus-summary-edit-article)
   (execute-kbd-macro (concat (this-command-keys) key))
-  (gnus-summary-edit-article-done))
+  (gnus-article-edit-done))
 
 ;;; Respooling
 
index 1f662b3..0ab87ae 100644 (file)
@@ -91,6 +91,9 @@
      (vertical 1.0
               (summary 0.25)
               (faq 1.0 point)))
+    (edit-article
+     (vertical 1.0
+              (article 1.0 point)))
     (edit-form
      (vertical 1.0
               (group 0.5)
@@ -154,7 +157,7 @@ buffer configuration.")
     (server . gnus-server-buffer)
     (browse . "*Gnus Browse Server*")
     (edit-group . gnus-group-edit-buffer)
-    (edit-group . gnus-edit-form-buffer)
+    (edit-form . gnus-edit-form-buffer)
     (edit-server . gnus-server-edit-buffer)
     (group-carpal . gnus-carpal-group-buffer)
     (summary-carpal . gnus-carpal-summary-buffer)
index eab6c03..efaad9d 100644 (file)
 
 (eval '(run-hooks 'gnus-load-hook))
 
-(defconst gnus-version-number "0.4"
+(defconst gnus-version-number "0.5"
   "Version number for this version of Gnus.")
 
 (defconst gnus-version (format "Red Gnus v%s" gnus-version-number)
   "Version string for this version of Gnus.")
 
-;;; Splash screen.
+(defvar gnus-inhibit-startup-message nil
+  "*If non-nil, the startup message will not be displayed.")
+
+;;; Internal variables
 
 (defvar gnus-group-buffer "*Group*")
 
-(defvar gnus-inhibit-startup-message nil
-  "*If non-nil, the startup message will not be displayed.")
+;;; Splash screen.
 
 (defun gnus-splash ()
   (save-excursion
index 9145d17..cb37b16 100644 (file)
@@ -242,7 +242,7 @@ Example:
     (mail . "mailer-daemon\\|postmaster"))
   "*Alist of abbreviations allowed in `nnmail-split-fancy'.")
 
-(defvar nnmail-delete-incoming t
+(defvar nnmail-delete-incoming nil
   "*If non-nil, the mail backends will delete incoming files after splitting.")
 
 (defvar nnmail-message-id-cache-length 1000
index 09d0889..80f007f 100644 (file)
@@ -1,4 +1,3 @@
-;;; nntp.el --- nntp access for Gnus
 ;; Copyright (C) 1987,88,89,90,92,93,94,95,96 Free Software Foundation, Inc.
 
 ;; Author: Lars Magne Ingebrigtsen <larsi@ifi.uio.no>
@@ -175,7 +174,8 @@ server there that you can connect to.")
       (let ((number (length articles))
            (count 0)
            (received 0)
-           (last-point (point-min)))
+           (last-point (point-min))
+           (nntp-inhibit-erase t))
        ;; Send HEAD command.
        (while articles
          (nntp-send-command 
@@ -372,6 +372,13 @@ It will prompt for a password."
    nntp-address nntp-port-number nntp-server-buffer
    wait-for nnheader-callback-function))
 
+(defun nntp-send-command-nodelete (wait-for &rest strings)
+  "Send STRINGS to server and wait until WAIT-FOR returns."
+  (nntp-retrieve-data
+   (mapconcat 'identity strings " ") 
+   nntp-address nntp-port-number nntp-server-buffer
+   wait-for nnheader-callback-function))
+
 (defun nntp-send-command-and-decode (wait-for &rest strings)
   "Send STRINGS to server and wait until WAIT-FOR returns."
   (unless nnheader-callback-function
@@ -387,7 +394,7 @@ It will prompt for a password."
   "Send the current buffer to server and wait until WAIT-FOR returns."
   (unless nnheader-callback-function
     (save-excursion
-      (set-buffer nntp-server-buffer)
+      (set-buffer (nntp-find-connection-buffer nntp-server-buffer))
       (erase-buffer)))
   (nntp-encode-text)
   (process-send-region (nntp-find-connection nntp-server-buffer)
@@ -417,6 +424,12 @@ It will prompt for a password."
   "Return the entry for the connection to BUFFER."
   (assq (nntp-find-connection buffer) nntp-connection-alist))
 
+(defun nntp-find-connection-buffer (buffer)
+  "Return the process connection buffer tied to BUFFER."
+  (let ((process (nntp-find-connection buffer)))
+    (when process
+      (process-buffer process))))
+
 (defun nntp-open-connection (buffer)
   "Open a connection to PORT on ADDRESS delivering output to BUFFER."
   (run-hooks 'nntp-prepare-server-hook)
@@ -542,7 +555,7 @@ It will prompt for a password."
       (nntp-accept-process-output process)
       (goto-char (point-min)))
     (prog1
-       (if (looking-at "[345]")
+       (if (looking-at "[45]")
            (progn
              (nntp-snarf-error-message)
              nil)
@@ -553,6 +566,7 @@ It will prompt for a password."
          (nntp-decode-text (not decode))
          (save-excursion
            (set-buffer buffer)
+           (goto-char (point-max))
            (insert-buffer-substring (process-buffer process))
            t))
       (erase-buffer))))
@@ -564,8 +578,9 @@ It will prompt for a password."
 (defun nntp-accept-process-output (process)
   "Wait for output from PROCESS and message some dots."
   (save-excursion
-    (set-buffer nntp-server-buffer)
-    (message "nntp reading%s" (make-string (/ (point-max) 100) ?.))
+    (set-buffer (or (nntp-find-connection-buffer nntp-server-buffer)
+                   nntp-server-buffer))
+    (message "nntp reading%s" (make-string (/ (point-max) 1000) ?.))
     (accept-process-output process 1)))
 
 (defun nntp-accept-response ()
@@ -617,6 +632,7 @@ It will prompt for a password."
     (insert "." nntp-end-of-line)))
 
 (defun nntp-retrieve-headers-with-xover (articles &optional fetch-old)
+  (set-buffer nntp-server-buffer)
   (erase-buffer)
   (cond 
 
@@ -722,14 +738,14 @@ It will prompt for a password."
        ;; If `nntp-server-xover' is a string, then we just send this
        ;; command.
        (if wait-for-reply
-           (nntp-send-command "\r\n\\.\r\n" nntp-server-xover range)
+           (nntp-send-command-nodelete "\r\n\\.\r\n" nntp-server-xover range)
          ;; We do not wait for the reply.
-         (nntp-send-command "\r\n\\.\r\n" nntp-server-xover range))
+         (nntp-send-command-nodelete "\r\n\\.\r\n" nntp-server-xover range))
       (let ((commands nntp-xover-commands))
        ;; `nntp-xover-commands' is a list of possible XOVER commands.
        ;; We try them all until we get at positive response. 
        (while (and commands (eq nntp-server-xover 'try))
-         (nntp-send-command "\r\n\\.\r\n" (car commands) range)
+         (nntp-send-command-nodelete "\r\n\\.\r\n" (car commands) range)
          (save-excursion
            (set-buffer nntp-server-buffer)
            (goto-char (point-min))
@@ -815,12 +831,6 @@ It will prompt for a password."
                            nntp-rlogin-parameters " ")))))
     proc))
 
-(defun nntp-find-connection-buffer (buffer)
-  "Return the process connection buffer tied to BUFFER."
-  (let ((process (nntp-find-connection buffer)))
-    (when process
-      (process-buffer process))))
-
 (provide 'nntp)
 
 ;;; nntp.el ends here
index cc429c4..87b8c78 100644 (file)
@@ -1,3 +1,9 @@
+Sat Aug  3 17:35:36 1996  Lars Magne Ingebrigtsen  <lars@eyesore.no>
+
+       * gnus.texi (Group Parameters): Addition.
+       (Home Score File): New.
+       (Topic Parameters): New.
+
 Wed Jul 31 15:34:12 1996  Lars Magne Ingebrigtsen  <lars@eyesore.no>
 
        * gnus.texi (are): Fix.
index ea07a80..c4b1dd6 100644 (file)
@@ -970,7 +970,8 @@ Number of ticked articles.
 Number of read articles.
 
 @item t
-Total number of articles.
+Estimated total number of articles.  (This is really @var{max-number}
+minus @var{min-number} plus 1.)
 
 @item y
 Number of unread, unticked, non-dormant articles.
@@ -1730,10 +1731,17 @@ The value can either be a number of days (not necessarily an integer) or
 the symbols @code{never} or @code{immediate}.
 
 @item score-file
+@cindex score file group parameter
 Elements that look like @code{(score-file . "file")} will make
-@samp{file} into the current score file for the group in question.  This
+@file{file} into the current score file for the group in question.  This
 means that all score commands you issue will end up in that file. 
 
+@item adapt-file
+@cindex adapt file group parameter
+Elements that look like @code{(adapt-file . "file")} will make
+@file{file} into the current adaptive file for the group in question.
+All adaptive score entries will be put into this file.
+
 @item admin-address
 When unsubscribing to a mailing list you should never send the
 unsubscription notice to the mailing list itself.  Instead, you'd send
@@ -1760,11 +1768,9 @@ form, but who cares?
 
 @end table
 
-If you want to change the group info you can use the @kbd{G E} command
-to enter a buffer where you can edit it.
+Use the @kbd{G p} command to edit group parameters of a group.
 
-You usually don't want to edit the entire group info, so you'd be better
-off using the @kbd{G p} command to just edit the group parameters.
+Also @xref{Topic Parameters}.
 
 
 @node Listing Groups
@@ -2143,6 +2149,7 @@ the hook for the group mode:
 * Topic Variables::    How to customize the topics the Lisp Way.
 * Topic Commands::     Interactive E-Z commands.
 * Topic Topology::     A map of the world.
+* Topic Parameters::   Parameters that apply to all groups in a topic.
 @end menu
 
 
@@ -2296,11 +2303,8 @@ List all groups that Gnus knows about in a topics-ified way
 @cindex group parameters
 @cindex topic parameters
 @cindex parameters
-Edit the topic parameters (@code{gnus-topic-edit-parameters}).  All
-groups in the topic will inherit group parameters from the parent (and
-ancestor) topic parameters.  Group parameters (of course) override topic
-parameters, and topic parameters in sub-topics override topic parameters
-in super-topics.  You know.  Normal inheretance rules.
+Edit the topic parameters (@code{gnus-topic-edit-parameters}).
+@xref{Topic Parameters}.
 
 @end table
 
@@ -2315,14 +2319,14 @@ So, let's have a look at an example group buffer:
 @example
 Gnus
   Emacs -- I wuw it!
-       3: comp.emacs
-       2: alt.religion.emacs
+     3: comp.emacs
+     2: alt.religion.emacs
     Naughty Emacs
      452: alt.sex.emacs
        0: comp.talk.emacs.recovery
   Misc
-       8: comp.binaries.fractals
-      13: comp.sources.unix
+     8: comp.binaries.fractals
+    13: comp.sources.unix
 @end example
 
 So, here we have one top-level topic, two topics under that, and one
@@ -2348,6 +2352,56 @@ and which topics are visible.  Two settings are currently
 allowed---@code{visible} and @code{invisible}.
 
 
+@node Topic Parameters
+@subsection Topic Parameters
+
+All groups in a topic will inherit group parameters from the parent (and
+ancestor) topic parameters.  All legal group parameters are legal topic
+parameters (@pxref{Group Parameters}).  
+
+Group parameters (of course) override topic parameters, and topic
+parameters in sub-topics override topic parameters in super-topics.  You
+know.  Normal inheretance rules.  (@dfn{Rules} is here a noun, not a
+verb, although you may feel free to disagree with me here.)
+
+@example
+Gnus
+  Emacs
+     3: comp.emacs
+     2: alt.religion.emacs
+   452: alt.sex.emacs
+    Relief
+     452: alt.sex.emacs
+       0: comp.talk.emacs.recovery
+  Misc
+     8: comp.binaries.fractals
+    13: comp.sources.unix
+   452: alt.sex.emacs
+@end example
+
+Now, the @samp{Emacs} topic has the topic parameter 
+@code{(score-file . "emacs.SCORE")}; the @samp{Relief} topic has the topic
+parameter @code{(score-file . "relief.SCORE")}; and the @samp{Misc}
+topic has the topic parameter @code{(score-file . "emacs.SCORE")}.  In
+addition, @samp{alt.religion.emacs} has the group parameter
+@code{(score-file . "religion.SCORE")}.
+
+Now, when you enter @samp{alt.sex.emacs} in the @samp{Relief} topic, you
+will get the @file{relief.SCORE} home score file.  If you enter the same
+group in the @samp{Emacs} topic, you'll get the @file{emacs.SCORE} home
+score file.  If you enter @samp{alt.religion.emacs}, you'll get the
+@file{religion.SCORE} home score file.  
+
+This seems rather simple and self-evident, doesn't it?  Well, yes.  But
+there are some problems, especially with the @code{total-expiry}
+parameter.  Say you have a mail group in two topics; one with
+@code{total-expiry} and one without.  What happens when you do @kbd{M-x
+gnus-expire-all-expirable-groups}?  Gnus has no way of telling which one
+of these topics you mean to expire articles from, so anything may
+happen.  In fact, I hereby declare that it is @dfn{undefined} what
+happens.  You just have to be careful if you do stuff like that.
+
+
 @node Misc Group Stuff
 @section Misc Group Stuff
 
@@ -9161,6 +9215,7 @@ silently to help keep the sizes of the score files down.
 * Score File Format::        What a score file may contain.
 * Score File Editing::       You can edit score files by hand as well.
 * Adaptive Scoring::         Big Sister Gnus @emph{knows} what you read.
+* Home Score File::          How to say where new score entries are to go.
 * Followups To Yourself::    Having Gnus notice when people answer you.
 * Scoring Tips::             How to score effectively.
 * Reverse Scoring::          That problem child of old is not problem.
@@ -9921,6 +9976,95 @@ this variable is @code{nil}, exact matching will always be used to avoid
 this problem.
 
 
+@node Home Score File
+@section Home Score File
+
+The score file where new score file entries will go is calle the
+@dfn{home score file}.  This is normally (and by default) the score file
+for the group itself.  For instance, the home score file for
+@samp{gnu.emacs.gnus} is @file{gnu.emacs.gnus.SCORE}.
+
+However, this may not be what you want.  It is often convenient to share
+a common home score file among many groups---all @samp{emacs} groups
+could perhaps use the same home score file.
+
+@vindex gnus-home-score-file
+The variable that controls this is @code{gnus-home-score-file}.  It can
+be:
+
+@enumerate
+@item
+A string.  Then this file will be used as the home score file for all
+groups. 
+
+@item
+A function. The result of this function will be used as the home score
+file.  The function will be called with the name of the group as the
+parameter. 
+
+@item
+A list.  The elements in this list can be:
+
+@enumerate
+@item 
+@var{(regexp . file-name)}.  If the @var{regexp} matches the group name,
+the @var{file-name} will will be used as the home score file.
+
+@item 
+A function. If the function returns non-nil, the result will be used as
+the home score file.
+
+@item 
+A string.  Use the string as the home score file.
+@end enumerate
+
+The list will be traversed from the beginning towards the end looking
+for matches.
+
+@end enumerate
+
+So, if you want to use just a single score file, you could say:
+
+@lisp
+(setq gnus-home-score-file
+      "my-total-score-file.SCORE")
+@end lisp
+
+If you want to use @file{gnu.SCORE} for all @samp{gnu} groups and
+@file{rec.SCORE} for all @samp{rec} groups (and so on), you can say:
+
+@lisp
+(setq gnus-home-score-file
+      'gnus-hierarchial-home-score-file)
+@end lisp
+
+This is a ready-made function provided for your convenience.
+
+If you want to have one score file for the @samp{emacs} groups and
+another for the @samp{comp} groups, while letting all other groups use
+their own home score files:
+
+@lisp
+(setq gnus-home-score-file
+      ;; All groups that match the regexp "\\.emacs"
+      '("\\.emacs" . "emacs.SCORE")
+      ;; All the comp groups in one score file
+       ("^comp" . "comp.SCORE"))
+@end lisp
+   
+@vindex gnus-home-adapt-file
+@code{gnus-home-adapt-file} works exactly the same way as
+@code{gnus-home-score-file}, but says what the home adaptive score file
+is instead.  All new adaptive file entries will go into the file
+specified by this variable, and the same syntax is allowed.
+
+In addition to using @code{gnus-home-score-file} and
+@code{gnus-home-adapt-file}, you can also use group parameters
+(@pxref{Group Parameters}) and topic parameters (@pxref{Topic
+Parameters}) to achieve much the same.  Group and topic parameters take
+presedence over this variable.
+
+
 @node Followups To Yourself
 @section Followups To Yourself