Function: mh-scan-folder

mh-scan-folder is an autoloaded and byte-compiled function defined in mh-folder.el.gz.

Signature

(mh-scan-folder FOLDER RANGE &optional DONT-EXEC-PENDING)

Documentation

Scan FOLDER over RANGE.

After the scan is performed, switch to the buffer associated with FOLDER.

Check the documentation of mh-interactive-range to see how RANGE is read in interactive use.

The processing of outstanding commands is not performed if DONT-EXEC-PENDING is non-nil.

Source Code

;; Defined in /usr/src/emacs/lisp/mh-e/mh-folder.el.gz
;;;###mh-autoload
(defun mh-scan-folder (folder range &optional dont-exec-pending)
  "Scan FOLDER over RANGE.

After the scan is performed, switch to the buffer associated with
FOLDER.

Check the documentation of `mh-interactive-range' to see how RANGE is
read in interactive use.

The processing of outstanding commands is not performed if
DONT-EXEC-PENDING is non-nil."
  (when (stringp range)
    (setq range (delete "" (split-string range "[ \t\n]"))))
  (cond ((null (get-buffer folder))
         (mh-make-folder folder))
        (t
         (unless dont-exec-pending
           (mh-process-or-undo-commands folder)
           (mh-reset-threads-and-narrowing))
         (switch-to-buffer folder)))
  (mh-regenerate-headers range)
  (if (zerop (buffer-size))
      (if (equal range "all")
          (message "Folder %s is empty" folder)
        (message "No messages in %s, range %s" folder range))
    (mh-goto-cur-msg))
  (when (mh-outstanding-commands-p)
    (mh-notate-deleted-and-refiled)))