mu4e: added action to show the current thread only

Add an action for view and headers buffer to show only the messages in
the current thread.
This commit is contained in:
Dima Kogan
2015-11-06 21:36:31 -08:00
committed by djcb
parent 66a082a6ad
commit 781f0782f5
3 changed files with 15 additions and 3 deletions

View File

@ -268,6 +268,16 @@ store your org-contacts."
(mu4e-message (concat "tagging: " (mapconcat 'identity taglist ", "))) (mu4e-message (concat "tagging: " (mapconcat 'identity taglist ", ")))
(mu4e-refresh-message path maildir))) (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))))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

View File

@ -194,7 +194,8 @@ Field must be a symbol, one of: :date, :subject, :size, :prio,
(defvar mu4e-headers-actions (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. "List of actions to perform on messages in the headers list.
The actions are of the form (NAME SHORTCUT FUNC) where: The actions are of the form (NAME SHORTCUT FUNC) where:
* NAME is the name of the action (e.g. \"Count lines\") * NAME is the name of the action (e.g. \"Count lines\")

View File

@ -99,7 +99,8 @@ directory and saves all attachments in the chosen directory."
(defvar mu4e-view-actions (defvar mu4e-view-actions
'( ("capture message" . mu4e-action-capture-message) '( ("capture message" . mu4e-action-capture-message)
("view as pdf" . mu4e-action-view-as-pdf)) ("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. "List of actions to perform on messages in view mode.
The actions are of the form: The actions are of the form:
(NAME FUNC) (NAME FUNC)