Hi Josiah,

On 2014-05-23 at 14:21, Josiah Schwab <[email protected]> wrote:
> Is there a way to navigate from the message view to a headers view that
> shows the related messages (the messages in the same thread)?

I have the following code in my init file that does what you want with
keybinding "a f" in either header or message view.



;; https://groups.google.com/forum/#!topic/mu-discuss/vpAyzYrJbCk
(defun flatten (mylist)
  (cond
   ((null mylist) nil)
   ((atom mylist) (list mylist))
   (t
    (append (flatten (car mylist)) (flatten (cdr mylist))))))
(defun mu4e-action-find-references (msg)
  (let* ((msgid (mu4e-message-field-raw msg :message-id))
     (msgids (mu4e-message-field-raw msg :references))
     (query (mapconcat 'identity (mapcar '(lambda (x) (concat "i:" x)) (flatten 
(list msgids msgid)))  " or ")))
    (mu4e-headers-toggle-include-related)
    (mu4e-headers-search query)
    (mu4e-headers-toggle-include-related t)
    ))
(add-to-list 'mu4e-headers-actions
             '("find related" . mu4e-action-find-references) t)
(add-to-list 'mu4e-view-actions
             '("find related" . mu4e-action-find-references) t)

-- 
You received this message because you are subscribed to the Google Groups 
"mu-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to