A little hack on the directory mail source.
authorShengHuo ZHU <zsh@cs.rochester.edu>
Sun, 14 May 2000 20:31:01 +0000 (20:31 +0000)
committerShengHuo ZHU <zsh@cs.rochester.edu>
Sun, 14 May 2000 20:31:01 +0000 (20:31 +0000)
lisp/gnus-start.el
lisp/nnmail.el

index 58f8b70..aad6822 100644 (file)
@@ -1551,12 +1551,17 @@ newsgroup."
            ;; hack: `nnmail-get-new-mail' changes the mail-source depending
            ;; on the group, so we must perform a scan for every group
            ;; if the users has any directory mail sources.
-           (if (and (null (assq 'directory
+           ;; hack: if `nnmail-scan-directory-mail-source-once' is non-nil,
+           ;; for it scan all spool files even when the groups are 
+           ;; not required.
+           (if (and 
+                (or nnmail-scan-directory-mail-source-once
+                    (null (assq 'directory
                                 (or mail-sources
                                     (if (listp nnmail-spool-file) 
                                         nnmail-spool-file
-                                      (list nnmail-spool-file)))))
-                    (member method scanned-methods))
+                                      (list nnmail-spool-file))))))
+                (member method scanned-methods))
                (setq active (gnus-activate-group group))
              (setq active (gnus-activate-group group 'scan))
              (push method scanned-methods))
index a5ff525..21cd1ee 100644 (file)
@@ -191,6 +191,12 @@ This variable is obsolete; `mail-sources' should be used instead."
   :group 'nnmail-procmail
   :type 'boolean)
 
+(defcustom nnmail-scan-directory-mail-source-once nil
+  "*If non-nil, scan all incoming procmail sorted mails once.
+It scans low-level sorted spools even when not required."
+  :group 'nnmail-procmail
+  :type 'boolean)
+
 (defcustom nnmail-delete-file-function 'delete-file
   "Function called to delete files in some mail backends."
   :group 'nnmail-files
@@ -1520,6 +1526,7 @@ See the documentation for the variable `nnmail-split-fancy' for documentation."
          nil))
        ;; Hack to only fetch the contents of a single group's spool file.
        (when (and (eq (car source) 'directory)
+                  (null nnmail-scan-directory-mail-source-once)
                   group)
          (mail-source-bind (directory source)
            (setq source (append source