Function: mh-pack-folder

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

Signature

(mh-pack-folder RANGE)

Documentation

Pack folder.

This command packs the folder, removing gaps from the numbering sequence. If you don't want to rescan the entire folder afterward, this command will accept a RANGE. Check the documentation of mh-interactive-range to see how RANGE is read in interactive use.

This command will ask if you want to process refiles or deletes first and then either run x (mh-execute-commands) for you or undo the pending refiles and deletes.

The hook mh-pack-folder-hook is run after the folder is packed; see its documentation for variables it can use.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/mh-e/mh-funcs.el.gz
;;;###mh-autoload
(defun mh-pack-folder (range)
  "Pack folder\\<mh-folder-mode-map>.

This command packs the folder, removing gaps from the numbering
sequence. If you don't want to rescan the entire folder
afterward, this command will accept a RANGE. Check the
documentation of `mh-interactive-range' to see how RANGE is read
in interactive use.

This command will ask if you want to process refiles or deletes
first and then either run \\[mh-execute-commands] for you or undo
the pending refiles and deletes.

The hook `mh-pack-folder-hook' is run after the folder is packed;
see its documentation for variables it can use."
  (interactive (list (if current-prefix-arg
                         (mh-read-range "Scan" mh-current-folder t nil t
                                        mh-interpret-number-as-range-flag)
                       '("all"))))
  (let ((threaded-flag (memq 'unthread mh-view-ops)))
    (mh-pack-folder-1 range)
    (mh-goto-cur-msg)
    (when mh-index-data
      (mh-index-update-maps mh-current-folder))
    (cond (threaded-flag (mh-toggle-threads))
          (mh-index-data (mh-index-insert-folder-headers))))
  (run-hooks 'mh-pack-folder-hook)
  (message "Packing folder...done"))