X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=doc%2Fnotmuch-emacs.rst;h=e69bd23da5cf69b343ff69ad4506fc408ab5e0a2;hb=f4ebb6037529569875029f411fd062d79641ce14;hp=49111d2896881e5d207a48427d6444e991fc30ac;hpb=2b10a56c78af816b902aee7fdfecb357605539f5;p=notmuch diff --git a/doc/notmuch-emacs.rst b/doc/notmuch-emacs.rst index 49111d28..e69bd23d 100644 --- a/doc/notmuch-emacs.rst +++ b/doc/notmuch-emacs.rst @@ -253,6 +253,9 @@ variables. ("subject" . "%s ") ("tags" . "(%s)"))) + See also :emacsvar:`notmuch-tree-result-format` and + :emacsvar:`notmuch-unthreaded-result-format`. + .. emacsvar:: notmuch-search-oldest-first Display the oldest threads at the top of the buffer @@ -475,6 +478,41 @@ tags. As is the case with :ref:`notmuch-search`, the presentation of results can be controlled by the variable ``notmuch-search-oldest-first``. +.. emacsvar:: notmuch-tree-result-format + + |docstring::notmuch-tree-result-format| + + The following example shows how to optionally display recipients instead + of authors for sent mail (assuming the user is named Mustermann). + + .. code:: lisp + + (defun -notmuch-authors-or-to (format-string result) + (let* ((headers (plist-get result :headers)) + (to (plist-get headers :To)) + (author (plist-get headers :From)) + (face (if (plist-get result :match) + 'notmuch-tree-match-author-face + 'notmuch-tree-no-match-author-face))) + (propertize + (format format-string + (if (string-match "Mustermann" author) + (concat "To:" (notmuch-tree-clean-address to)) + author)) + 'face face))) + + (setq notmuch-tree-result-format + '(("date" . "%12s ") + (-notmuch-authors-or-to . "%-20.20s") + ((("tree" . "%s") + ("subject" . "%s")) + . " %-54s ") + ("tags" . "(%s)"))) + + See also :emacsvar:`notmuch-search-result-format` and + :emacsvar:`notmuch-unthreaded-result-format`. + + .. _notmuch-unthreaded: notmuch-unthreaded @@ -486,6 +524,13 @@ is presented. Keybindings are the same as :any:`notmuch-tree`. +.. emacsvar:: notmuch-unthreaded-result-format + + |docstring::notmuch-unthreaded-result-format| + + See also :emacsvar:`notmuch-search-result-format` and + :emacsvar:`notmuch-tree-result-format`. + Global key bindings ===================