Function: mh-visit-folder
mh-visit-folder is an autoloaded, interactive and byte-compiled
function defined in mh-folder.el.gz.
Signature
(mh-visit-folder FOLDER &optional RANGE INDEX-DATA)
Documentation
Visit FOLDER.
When you want to read the messages that you have refiled into folders, use this command to visit the folder. You are prompted for the folder name.
The folder buffer will show just unseen messages if there are any;
otherwise, it will show all the messages in the buffer as long there
are fewer than mh-large-folder messages. If there are more, then you
are prompted for a range of messages to scan.
You can provide a prefix argument in order to specify a RANGE of
messages to show when you visit the folder. In this case, regions are
not used to specify the range and mh-large-folder is ignored. Check
the documentation of mh-interactive-range to see how RANGE is read
in interactive use.
Note that this command can also be used to create folders. If you specify a folder that does not exist, you will be prompted to create it.
Do not call this function from outside MH-E; use M-x mh-rmail (mh-rmail) instead.
If, in a program, RANGE is nil (the default), then all messages in FOLDER are displayed. If an index buffer is being created then INDEX-DATA is used to initialize the index buffer specific data structures.
Key Bindings
Aliases
Source Code
;; Defined in /usr/src/emacs/lisp/mh-e/mh-folder.el.gz
;;;###mh-autoload
(defun mh-visit-folder (folder &optional range index-data)
"Visit FOLDER.
When you want to read the messages that you have refiled into folders,
use this command to visit the folder. You are prompted for the folder
name.
The folder buffer will show just unseen messages if there are any;
otherwise, it will show all the messages in the buffer as long there
are fewer than `mh-large-folder' messages. If there are more, then you
are prompted for a range of messages to scan.
You can provide a prefix argument in order to specify a RANGE of
messages to show when you visit the folder. In this case, regions are
not used to specify the range and `mh-large-folder' is ignored. Check
the documentation of `mh-interactive-range' to see how RANGE is read
in interactive use.
Note that this command can also be used to create folders. If you
specify a folder that does not exist, you will be prompted to create
it.
Do not call this function from outside MH-E; use \\[mh-rmail] instead.
If, in a program, RANGE is nil (the default), then all messages in
FOLDER are displayed. If an index buffer is being created then
INDEX-DATA is used to initialize the index buffer specific data
structures."
(interactive (let ((folder-name (mh-prompt-for-folder "Visit" mh-inbox t)))
(list folder-name
(mh-read-range "Scan" folder-name t nil
current-prefix-arg
mh-interpret-number-as-range-flag))))
(let ((config (current-window-configuration))
(current-buffer (current-buffer))
(threaded-view-flag mh-show-threads-flag))
(delete-other-windows)
(when (get-buffer folder)
(with-current-buffer folder
(setq threaded-view-flag (memq 'unthread mh-view-ops))))
(when index-data
(mh-make-folder folder)
(setq mh-index-data (car index-data)
mh-index-msg-checksum-map (make-hash-table :test #'equal)
mh-index-checksum-origin-map (make-hash-table :test #'equal))
(mh-index-update-maps folder (cadr index-data))
(mh-index-create-sequences))
(mh-scan-folder folder (or range "all"))
(cond ((and threaded-view-flag
(save-excursion
(goto-char (point-min))
(or (null mh-large-folder)
(not (equal (forward-line (1+ mh-large-folder)) 0))
(and (message "Not threading since the number of messages exceeds `mh-large-folder'")
nil))))
(mh-toggle-threads))
(mh-index-data
(mh-index-insert-folder-headers)))
(unless (eq current-buffer (current-buffer))
(setq mh-previous-window-config config)))
nil)