Function: mh-folder-mode
mh-folder-mode is an autoloaded, interactive and byte-compiled
function defined in mh-folder.el.gz.
Signature
(mh-folder-mode)
Documentation
Major MH-E mode for "editing" an MH folder scan listing.
You can show the message the cursor is pointing to, and step through the messages. Messages can be marked for deletion or refiling into another folder; these commands are executed all at once with a separate command.
Options that control this mode can be changed with
M-x customize-group (customize-group); specify the "mh" group. In particular, please
see the mh-scan-format-file option if you wish to modify scan's
format.
When a folder is visited, the hook mh-folder-mode-hook is run.
Ranges
======
Many commands that operate on individual messages, such as
mh-forward or mh-refile-msg take a RANGE argument. This argument
can be used in several ways.
If you provide the prefix argument (C-u (universal-argument)) to
these commands, then you will be prompted for the message range.
This can be any valid MH range which can include messages,
sequences, and the abbreviations (described in the mh(1) man
page):
<num1>-<num2>
Indicates all messages in the range <num1> to <num2>, inclusive.
The range must be nonempty.
<num>:N
<num>:+N
<num>:-N
Up to N messages beginning with (or ending with) message num. Num
may be any of the predefined symbols: first, prev, cur, next or
last.
first:N
prev:N
next:N
last:N
The first, previous, next or last messages, if they exist.
all
All of the messages.
For example, a range that shows all of these things is 1 2 3
5-10 last:5 unseen.
If the option transient-mark-mode(var)/transient-mark-mode(fun) is set to t and you set a
region in the MH-Folder buffer, then the MH-E command will
perform the operation on all messages in that region.
! mh-refile-or-write-again
' mh-toggle-tick
, mh-header-display
- negative-argument
. mh-alt-show
/ ' mh-narrow-to-tick
/ ? mh-prefix-help
/ c mh-narrow-to-cc
/ g mh-narrow-to-range
/ m mh-narrow-to-from
/ s mh-narrow-to-subject
/ t mh-narrow-to-to
/ w mh-widen
: mh-show-preferred-alternative
; mh-toggle-mh-decode-mime-flag
<backtab> mh-index-previous-folder
<mouse-2> mh-show-mouse
> mh-write-msg-to-file
? mh-help
C-M-i mh-index-previous-folder
C-d mh-delete-msg-no-motion
D ? mh-prefix-help
D DEL mh-page-digest-backwards
D SPC mh-page-digest
D b mh-burst-digest
DEL mh-previous-page
E mh-extract-rejected-mail
F ' mh-index-ticked-messages
F ? mh-prefix-help
F S mh-sort-folder
F c mh-catchup
F f mh-alt-visit-folder
F k mh-kill-folder
F l mh-list-folders
F n mh-index-new-messages
F o mh-alt-visit-folder
F p mh-pack-folder
F q mh-index-sequenced-messages
F r mh-rescan-folder
F s mh-search
F u mh-undo-folder
F v mh-visit-folder
I ? #<anonymous-function>
J ? mh-prefix-help
J a mh-junk-allowlist
J b mh-junk-blocklist
J w mh-junk-whitelist
K <backtab> mh-prev-button
K ? mh-prefix-help
K C-M-i mh-prev-button
K TAB mh-next-button
K a mh-mime-save-parts
K e mh-display-with-external-viewer
K i mh-folder-inline-mime-part
K o mh-folder-save-mime-part
K t mh-toggle-mime-buttons
K v mh-folder-toggle-mime-part
M mh-modify
M-< mh-first-msg
M-> mh-last-msg
M-d mh-redistribute
M-n mh-next-unread-msg
M-p mh-previous-unread-msg
P ? mh-prefix-help
P C mh-ps-print-toggle-color
P F mh-ps-print-toggle-faces
P f mh-ps-print-msg-file
P l mh-print-msg
P p mh-ps-print-msg
RET mh-show
S ' mh-narrow-to-tick
S ? mh-prefix-help
S d mh-delete-msg-from-seq
S k mh-delete-seq
S l mh-list-sequences
S n mh-narrow-to-seq
S p mh-put-msg-in-seq
S s mh-msg-is-in-seq
S w mh-widen
SPC mh-page-msg
SPC..~ undefined
T ? mh-prefix-help
T d mh-thread-delete
T n mh-thread-next-sibling
T o mh-thread-refile
T p mh-thread-previous-sibling
T t mh-toggle-threads
T u mh-thread-ancestor
TAB mh-index-next-folder
X ? mh-prefix-help
X s mh-store-msg
X u mh-store-msg
^ mh-alt-refile-msg
c mh-copy-msg
d mh-delete-msg
e mh-edit-again
f mh-forward
g mh-goto-msg
i mh-inc-folder
k mh-delete-subject-or-thread
m mh-alt-send
n mh-next-undeleted-msg
o mh-refile-msg
p mh-previous-undeleted-msg
q mh-quit
r mh-reply
s mh-send
t mh-toggle-showing
u mh-undo
v mh-index-visit-folder
x mh-execute-commands
| mh-pipe-msg
..\x3FFFFF digit-argument
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/mh-e/mh-folder.el.gz
;; Autoload cookie needed by desktop.el
;;;###autoload
(define-derived-mode mh-folder-mode fundamental-mode "MH-Folder"
"Major MH-E mode for \"editing\" an MH folder scan listing.
\\<mh-folder-mode-map>
You can show the message the cursor is pointing to, and step through
the messages. Messages can be marked for deletion or refiling into
another folder; these commands are executed all at once with a
separate command.
Options that control this mode can be changed with
\\[customize-group]; specify the \"mh\" group. In particular, please
see the `mh-scan-format-file' option if you wish to modify scan's
format.
When a folder is visited, the hook `mh-folder-mode-hook' is run.
Ranges
======
Many commands that operate on individual messages, such as
`mh-forward' or `mh-refile-msg' take a RANGE argument. This argument
can be used in several ways.
If you provide the prefix argument (\\[universal-argument]) to
these commands, then you will be prompted for the message range.
This can be any valid MH range which can include messages,
sequences, and the abbreviations (described in the mh(1) man
page):
<num1>-<num2>
Indicates all messages in the range <num1> to <num2>, inclusive.
The range must be nonempty.
<num>:N
<num>:+N
<num>:-N
Up to N messages beginning with (or ending with) message num. Num
may be any of the predefined symbols: first, prev, cur, next or
last.
first:N
prev:N
next:N
last:N
The first, previous, next or last messages, if they exist.
all
All of the messages.
For example, a range that shows all of these things is `1 2 3
5-10 last:5 unseen'.
If the option `transient-mark-mode' is set to t and you set a
region in the MH-Folder buffer, then the MH-E command will
perform the operation on all messages in that region.
\\{mh-folder-mode-map}"
(unless mh-folder-tool-bar-map
(mh-tool-bar-folder-buttons-init))
(if (boundp 'tool-bar-map)
(setq-local tool-bar-map mh-folder-tool-bar-map))
(make-local-variable 'font-lock-defaults)
(setq font-lock-defaults '(mh-folder-font-lock-keywords t))
(make-local-variable 'desktop-save-buffer)
(setq desktop-save-buffer t)
(setq-local
mh-colors-available-flag (display-color-p)
; Do we have colors available
mh-current-folder (buffer-name) ; Name of folder, a string
mh-show-buffer (format "show-%s" (buffer-name)) ; Buffer that displays msgs
mh-folder-filename ; e.g. "/usr/foobar/Mail/inbox/"
(file-name-as-directory (mh-expand-file-name (buffer-name)))
mh-display-buttons-for-inline-parts-flag
mh-display-buttons-for-inline-parts-flag ; Allow for display of buttons to
; be toggled.
mh-arrow-marker (make-marker) ; Marker where arrow is displayed
overlay-arrow-position nil ; Allow for simultaneous display in
overlay-arrow-string ">" ; different MH-E buffers.
mh-showing-mode nil ; Show message also?
mh-refile-list nil ; List of folder names in mh-seq-list
mh-delete-list nil ; List of msgs nums to delete
mh-blocklist nil ; List of messages to process as spam
mh-allowlist nil ; List of messages to process as ham
mh-seq-list nil ; Alist of (seq . msgs) nums
mh-seen-list nil ; List of displayed messages
mh-next-direction 'forward ; Direction to move to next message
mh-view-ops () ; Stack that keeps track of the order
; in which narrowing/threading has been
; carried out.
mh-folder-view-stack () ; Stack of previous views of the
; folder.
mh-index-data nil ; If the folder was created by a call
; to mh-search, this contains info
; about the search results.
mh-index-previous-search nil ; folder, indexer, search-regexp
mh-index-msg-checksum-map nil ; msg -> checksum map
mh-index-checksum-origin-map nil ; checksum -> ( orig-folder, orig-msg )
mh-index-sequence-search-flag nil ; folder resulted from sequence search
mh-first-msg-num nil ; Number of first msg in buffer
mh-last-msg-num nil ; Number of last msg in buffer
mh-msg-count nil ; Number of msgs in buffer
mh-mode-line-annotation nil ; Indicates message range
mh-sequence-notation-history (make-hash-table)
; Remember what is overwritten by
; mh-note-seq.
imenu-create-index-function 'mh-index-create-imenu-index
; Setup imenu support
mh-previous-window-config nil) ; Previous window configuration
(setq truncate-lines t)
(auto-save-mode -1)
(setq buffer-offer-save t)
(add-hook 'write-file-functions #'mh-execute-commands nil t)
(make-local-variable 'revert-buffer-function)
(make-local-variable 'hl-line-mode) ; avoid pollution
(hl-line-mode 1)
(setq revert-buffer-function #'mh-undo-folder)
(add-to-list 'minor-mode-alist '(mh-showing-mode " Show"))
(mh-inc-spool-make)
(mh-set-help mh-folder-mode-help-messages))