Custom Tagging π₯#
Some backends allow to index and tag mail without storing the tags within the mail envelope. Two backends are currently implementing this feature. Notmuch handles them natively and IMAP stores them in custom IMAP keywords.
Variables#
Name |
Type |
Default |
|---|---|---|
|
string |
|
Functions#
Notmuch adds the following functions to NeoMutt. By default, none of them are bound to keys.
Menus |
Function |
Description |
|---|---|---|
index,pager |
add, remove, or toggle tags: |
|
IMAP: edit the tags list |
||
Notmuch: [+]<tag> to add, -<tag> to remove, !<tag> to toggle(notmuch) tags. |
||
Note: Tab completion of tag names is available |
||
index,pager |
add, remove, or toggle tags |
|
IMAP: edit the tags list |
||
Notmuch: [+]<tag> to add, -<tag> to remove, !<tag> to toggle labels and then hide or unhide the message by changing the βquasi-deletedβ to match if it would be shown when requerying. |
||
Normal redisplay rules apply here, so the user must call <sync-mailbox> for the changes to be displayed. |
||
Note: Tab completion of tag names is available. |
Commands#
tag-transforms tag transformed-string { tag transformed-string ...}
tag-formats tag format-string { tag format-string ...}
Colors#
Adds the objects, below, to index-color feature. The objects can take an optional pattern.
Object |
Highlights |
|---|---|
|
an individual message tag, %G, uses tag name |
|
the transformed message tags, %g or %J |
neomuttrc#
# Example NeoMutt config file for the custom tags feature.
# VARIABLES β shown with their default values
# --------------------------------------------------------------------------
# This variable specifies private notmuch tags which should not be printed
# on screen (index, pager).
set hidden_tags = "unread,draft,flagged,passed,replied,attachment,signed,encrypted"
# --------------------------------------------------------------------------
# FUNCTIONS β shown with an example mapping
# --------------------------------------------------------------------------
# modify (notmuch/imap) tags
bind index,pager ` modify-labels
# modify (notmuch/imap) tag non-interactively.
macro index,pager tt "<modify-labels>!todo\n" "Toggle the 'todo' tag"
# modify labels and then hide message
# bind index,pager ??? modify-labels-then-hide
# --------------------------------------------------------------------------
# COMMANDS β shown with an example
# --------------------------------------------------------------------------
# Replace some tags with icons
# tag-transforms tag transformed-string { tag transformed-string ...}
# tag-transforms "inbox" "i" \
# "unread" "u" \
# "replied" "β» " \
# "sent" "β₯ " \
# "todo" "T" \
# "deleted" "DEL" \
# "invites" "CAL"
# The formats must start with 'G' and the entire sequence is case sensitive.
# tag-formats tag format-string { tag format-string ...}
# tag-formats "inbox" "GI" \
# "unread" "GU" \
# "replied" "GR" \
# "sent" "GS" \
# "todo" "Gt" \
# "deleted" "GD" \
# "invites" "Gi"
# Now instead of using '%g' or '%J' in your $index_format, which lists all tags
# in a non-deterministic order, you can something like the following which puts
# a transformed tag name in a specific spot on the index line:
# set index_format='%4C %S %[%y.%m.%d] %-18.18n %<GU?%GU& > %<GR?%GR& > %<GI?%GI& > %s'
# The %G formatting sequence may display all tags including tags hidden by
# hidden_tags.
#
# --------------------------------------------------------------------------
# COLORS β some unpleasant examples are given
# --------------------------------------------------------------------------
# These symbols are added to the index-color feature:
# an individual message tag, %G, uses tag name
color index_tag red white "inbox"
# the transformed message tags, %g
color index_tags green default
# --------------------------------------------------------------------------
# vim: filetype=neomuttrc
Credits#
Mehdi Abaakouk, Richard Russon, Bernard βGuyzmoβ Pratz