Function: mh-speed-flists

mh-speed-flists is an autoloaded, interactive and byte-compiled function defined in mh-speed.el.gz.

Signature

(mh-speed-flists FORCE &rest FOLDERS)

Documentation

Execute flists -recurse and update message counts.

If FORCE is non-nil the timer is reset.

Any number of optional FOLDERS can be specified. If specified, flists is run only for that one folder.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/mh-e/mh-speed.el.gz
;;;###mh-autoload
(defun mh-speed-flists (force &rest folders)
  "Execute flists -recurse and update message counts.
If FORCE is non-nil the timer is reset.

Any number of optional FOLDERS can be specified. If specified,
flists is run only for that one folder."
  (interactive (list t))
  (when force
    (when mh-speed-flists-timer
      (cancel-timer mh-speed-flists-timer)
      (setq mh-speed-flists-timer nil))
    (when (and (processp mh-speed-flists-process)
               (not (eq (process-status mh-speed-flists-process) 'exit)))
      (set-process-filter mh-speed-flists-process t)
      (kill-process mh-speed-flists-process)
      (setq mh-speed-partial-line "")
      (setq mh-speed-flists-process nil)))
  (setq mh-speed-flists-folder folders)
  (unless mh-speed-flists-timer
    (setq mh-speed-flists-timer
          (run-at-time
           nil (if (> mh-speed-update-interval 0)
                   mh-speed-update-interval
                 nil)
           (lambda ()
             (unless (and (processp mh-speed-flists-process)
                          (not (eq (process-status mh-speed-flists-process)
                                   'exit)))
               (setq mh-speed-current-folder
                     (concat
                      (if mh-speed-flists-folder
                          (substring (car (reverse mh-speed-flists-folder)) 1)
                        (with-temp-buffer
                          (call-process (expand-file-name "folder" mh-progs)
                                        nil '(t nil) nil "-fast")
                          (buffer-substring (point-min) (1- (point-max)))))
                      "+"))
               (setq mh-speed-flists-process
                     (apply #'start-process "*flists*" nil
                            (expand-file-name "flists" mh-progs)
                            (if mh-speed-flists-folder "-noall" "-all")
                            "-sequence" (symbol-name mh-unseen-seq)
                            (or mh-speed-flists-folder '("-recurse"))))
               ;; Run flists on all folders the next time around...
               (setq mh-speed-flists-folder nil)
               (set-process-query-on-exit-flag mh-speed-flists-process nil)
               (set-process-filter mh-speed-flists-process
                                   #'mh-speed-parse-flists-output)))))))