(defvar-local notmuch-tree-unthreaded nil
"A buffer local copy of argument unthreaded to the function notmuch-tree.")
+;;; Options
+
(defgroup notmuch-tree nil
"Showing message and thread structure."
:group 'notmuch)
notmuch-unthreaded-result-format
notmuch-tree-result-format))
-;; Faces for messages that match the query.
+;;; Faces
+;;;; Faces for messages that match the query
+
(defface notmuch-tree-match-face
'((t :inherit default))
"Default face used in tree mode face for matching messages"
:group 'notmuch-tree
:group 'notmuch-faces)
-;; Faces for messages that do not match the query.
+;;;; Faces for messages that do not match the query
+
(defface notmuch-tree-no-match-face
'((t (:foreground "gray")))
"Default face used in tree mode face for non-matching messages."
:group 'notmuch-tree
:group 'notmuch-faces)
+;;; Variables
+
(defvar-local notmuch-tree-previous-subject
"The subject of the most recent result shown during the async display.")
if the user has loaded a different buffer in that window.")
(put 'notmuch-tree-message-buffer 'permanent-local t)
+;;; Tree wrapper commands
+
(defmacro notmuch-tree--define-do-in-message-window (name cmd)
"Define NAME as a command that calls CMD interactively in the message window.
If the message pane is closed then this command does nothing.
notmuch-tree-view-raw-message
notmuch-show-view-raw-message)
+;;; Keymap
+
(defvar notmuch-tree-mode-map
(let ((map (make-sparse-keymap)))
(set-keymap-parent map notmuch-common-keymap)
map)
"Keymap for \"notmuch tree\" buffers.")
+;;; Message properties
+
(defun notmuch-tree-get-message-properties ()
"Return the properties of the current message as a plist.
(interactive)
(notmuch-tree-get-prop :match))
+;;; Update display
+
(defun notmuch-tree-refresh-result ()
"Redisplay the current message line.
(when (string= tree-msg-id (notmuch-show-get-message-id))
(notmuch-show-update-tags new-tags)))))))
+;;; Commands (and some helper functions used by them)
+
(defun notmuch-tree-tag (tag-changes)
"Change tags for the current message."
(interactive
(notmuch-tree-tag-thread
(notmuch-tag-change-list notmuch-archive-tags unarchive))))
-;; Functions below here display the tree buffer itself.
+;;; Functions for displaying the tree buffer itself
(defun notmuch-tree-clean-address (address)
"Try to clean a single email ADDRESS for display. Return
(interactive)
(notmuch-tree query query-context target buffer-name open-target t))
-;;
+;;; _
(provide 'notmuch-tree)