Function: mh-index-sequenced-messages

mh-index-sequenced-messages is an autoloaded, interactive and byte-compiled function defined in mh-search.el.gz.

Signature

(mh-index-sequenced-messages FOLDERS SEQUENCE)

Documentation

Display messages in any sequence.

All messages from the FOLDERS in mh-new-messages-folders in the SEQUENCE you provide are listed. With a prefix argument, enter a space-separated list of folders at the prompt, or nothing to search all folders.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/mh-e/mh-search.el.gz
;;;###mh-autoload
(defun mh-index-sequenced-messages (folders sequence)
  "Display messages in any sequence.

All messages from the FOLDERS in `mh-new-messages-folders' in the
SEQUENCE you provide are listed. With a prefix argument, enter a
space-separated list of folders at the prompt, or nothing to
search all folders."
  (interactive
   (list (if current-prefix-arg
             (split-string (read-string "Search folder(s) (default all): "))
           mh-new-messages-folders)
         (mh-read-seq-default "Search" nil)))
  (unless sequence (setq sequence mh-unseen-seq))
  (let* ((mh-flists-search-folders folders)
         (mh-flists-sequence sequence)
         (mh-flists-called-flag t)
         (mh-searcher 'flists)
         (mh-search-function 'mh-flists-execute)
         (mh-search-next-result-function 'mh-mairix-next-result)
         (mh-mairix-folder mh-user-path)
         (mh-search-regexp-builder nil)
         (new-folder (format "%s/%s/%s" mh-index-folder
                             mh-flists-results-folder sequence))
         (window-config (if (equal new-folder mh-current-folder)
                            mh-previous-window-config
                          (current-window-configuration)))
         (redo-flag nil)
         message)
    (cond ((buffer-live-p (get-buffer new-folder))
           ;; The destination folder is being visited. Trick `mh-search'
           ;; into thinking that the folder resulted from a previous search.
           (set-buffer new-folder)
           (setq mh-index-previous-search (list folders mh-searcher sequence))
           (setq redo-flag t))
          ((mh-folder-exists-p new-folder)
           ;; Folder exists but we don't have it open. That means they are
           ;; stale results from an old flists search. Clear it out.
           (mh-exec-cmd-quiet nil "rmf" new-folder)))
    (setq message (mh-search "+" mh-flists-results-folder
                             redo-flag window-config)
          mh-index-sequence-search-flag t
          mh-index-previous-search (list folders mh-searcher sequence))
    (mh-index-write-data)
    (when (stringp message) (message "%s" message))))