Skip to main content

Module message

Module message 

Source

Structs§

Display
Everything the pager needs to turn a message into text: mutt’s auto_view filters, the header weeding rules, $reflow_text and $alternative_order.
Envelope
Summary of one message for the index view.
HeaderRules
mutt’s ignore/unignore/hdr_order: which headers the pager’s brief view shows, and in what order. Entries are lowercase name prefixes; * matches everything; unignore wins over ignore.
MessageView
Full message ready for the pager: mutt-style brief header block, the complete header list for the h toggle, and the decoded text body.
Part
One leaf MIME part, for the attachment menu.

Constants§

BROKEN_HEADER
The header break-thread leaves behind, so that the subject grouping knows to leave the message alone.
LIST_ACTIONS
mutt’s list-action menu, in its order: the RFC 2369 List-* headers a message may carry, each with the URL mutt would act on. mutt takes the first <mailto:...> in the header and nothing else; here a header holding only other schemes keeps its first URL, so the answer can be “only mailto: is supported” rather than “none”.

Functions§

body_lines
Lines in the body part (after the first blank line), counted on the raw bytes, cheap enough to do for every envelope.
body_text
Decoded text body only (used by ~b pattern matching).
envelope
filter_part
Decoded part rendered through a filter command (attachment viewer).
first_header
Decoded value of the first name header, read from disk (used by the ~e Sender pattern).
format_index_date
format_index_date_with
Index date column, with an optional strftime override (mutt’s date_format); “%b %e” when unset, like mutt’s default index date.
header_text
The whole decoded header block as Name: value lines, for the ~h pattern (mutt matches the header text, not one field).
list_actions
The list actions a raw message offers: one entry per action in LIST_ACTIONS order, None where the header is absent.
load
load_with
Like load, but under an explicit Display.
one_line
Header text on its way to a one-line slot in the display. A tab or a stray control character would be written to the terminal as it stands: a tab jumps to the next tab stop, pushing the rest of an index row past the window edge and wrapping it onto a second line. Mail carries them often enough (a header the sender folded by hand, an RFC 2047 word that decoded to one), so every such field passes through here.
parse_msg_ids
Extract all <...> message-id tokens from a header value.
part_bytes
Decoded bytes of the given leaf part (for saving to a file).
part_text
Decoded text of the given leaf part.
parts
render_entity
Render a MIME entity that is not a file of its own (the plaintext gpg hands back for a PGP/MIME message) exactly as the pager renders a message body: the whole tree, attachments announced, filters applied. Text that is not MIME at all comes back as it is.
short_from
Display name if present, otherwise the bare address.
weed
The brief header view under rules: weeded (ignore minus unignore), then sorted by hdr_order position; unlisted names keep message order after the listed ones.
with_header
The message with one header replaced: every existing line for name (folded continuations included) is dropped, and, when value is Some and non-empty, one name: value line is written at the end of the header block. Used by edit-label; the line ending of the original is kept.
with_thread_headers
The message with its threading headers replaced: In-Reply-To and References (folded continuation lines included) are dropped, and the given ones written at the end of the header block, when there are any. This is what break-thread and link-threads write back; mutt does the same to the message itself (mutt_break_thread clears both, link_threads sets In-Reply-To to the parent’s id). The line ending of the original is kept.