Function: mh-sort-folder

mh-sort-folder is an autoloaded, interactive and byte-compiled function defined in mh-funcs.el.gz.

Signature

(mh-sort-folder &optional EXTRA-ARGS)

Documentation

Sort folder.

By default, messages are sorted by date. The option mh-sortm-args holds extra arguments to pass on to the command
"sortm" when a prefix argument EXTRA-ARGS is used.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/mh-e/mh-funcs.el.gz
;;;###mh-autoload
(defun mh-sort-folder (&optional extra-args)
  "Sort folder.

By default, messages are sorted by date. The option
`mh-sortm-args' holds extra arguments to pass on to the command
\"sortm\" when a prefix argument EXTRA-ARGS is used."
  (interactive "P")
  (mh-process-or-undo-commands mh-current-folder)
  (setq mh-next-direction 'forward)
  (mh-set-folder-modified-p t)          ; lock folder while sorting
  (message "Sorting folder...")
  (let ((threaded-flag (memq 'unthread mh-view-ops)))
    (mh-exec-cmd "sortm" mh-current-folder (if extra-args mh-sortm-args))
    (when mh-index-data
      (mh-index-update-maps mh-current-folder))
    (message "Sorting folder...done")
    (mh-scan-folder mh-current-folder "all")
    (cond (threaded-flag (mh-toggle-threads))
          (mh-index-data (mh-index-insert-folder-headers)))))