diff --git a/mu4e/mu4e-actions.el b/mu4e/mu4e-actions.el index ca763e80..9e0a0b39 100644 --- a/mu4e/mu4e-actions.el +++ b/mu4e/mu4e-actions.el @@ -268,6 +268,16 @@ store your org-contacts." (mu4e-message (concat "tagging: " (mapconcat 'identity taglist ", "))) (mu4e-refresh-message path maildir))) + +(defun mu4e-action-show-thread (msg) + "Show all messages that are in the same thread as the message +at point." + (let ((msgid (mu4e-message-field msg :message-id))) + (when msgid + (let ((mu4e-headers-show-threads t) + (mu4e-headers-include-related t)) + (mu4e-headers-search + (format "msgid:%s" msgid)))))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; diff --git a/mu4e/mu4e-headers.el b/mu4e/mu4e-headers.el index 8df4203a..6b4bc9f9 100644 --- a/mu4e/mu4e-headers.el +++ b/mu4e/mu4e-headers.el @@ -194,7 +194,8 @@ Field must be a symbol, one of: :date, :subject, :size, :prio, (defvar mu4e-headers-actions - '( ("capture message" . mu4e-action-capture-message)) + '( ("capture message" . mu4e-action-capture-message) + ("show this thread" . mu4e-action-show-thread)) "List of actions to perform on messages in the headers list. The actions are of the form (NAME SHORTCUT FUNC) where: * NAME is the name of the action (e.g. \"Count lines\") diff --git a/mu4e/mu4e-view.el b/mu4e/mu4e-view.el index 26a28ea0..c5afcbf8 100644 --- a/mu4e/mu4e-view.el +++ b/mu4e/mu4e-view.el @@ -98,8 +98,9 @@ directory and saves all attachments in the chosen directory." :group 'mu4e-view) (defvar mu4e-view-actions - '( ("capture message" . mu4e-action-capture-message) - ("view as pdf" . mu4e-action-view-as-pdf)) + '( ("capture message" . mu4e-action-capture-message) + ("view as pdf" . mu4e-action-view-as-pdf) + ("show this thread" . mu4e-action-show-thread)) "List of actions to perform on messages in view mode. The actions are of the form: (NAME FUNC)