mu4e-view view thread?

304 views
Skip to first unread message

Christian Hopps

unread,
Jan 8, 2016, 12:00:51 PM1/8/16
to mu-discuss, cho...@chopps.org

Hi,

So I've been using org mode to store links to mail, and one thing that
would be *very* useful is a way to go from mu4e-view mode on a
particular message to a headers view of the containing mail folder with
the message highlighted. It would be even better if there was some sort
of thread view only, but I suspect that may be harder.

Is there a way to do this currently or should I look to write one?

Thanks,
Chris.
signature.asc

Dirk-Jan C. Binnema

unread,
Jan 10, 2016, 2:48:46 PM1/10/16
to mu-di...@googlegroups.com, cho...@chopps.org
It's not available out of the box (I think -- mu4e sometimes surprises
me as well!), but it shouldn't be _too_ hard to add.

Basically, take the message-id of the message at point, then store a
query searching for that message-id, and store that as an org-link. Now,
as long as mu4e-headers-show-threads is `t`, you should be able to jump
to it.

If it works, it can probably turned into an 'action' (see the docs)
quite easily.

Kind regards,
Dirk.


--
Dirk-Jan C. Binnema Helsinki, Finland
e:dj...@djcbsoftware.nl w:www.djcbsoftware.nl
pgp: D09C E664 897D 7D39 5047 A178 E96A C7A1 017D DA3C

Christian Hopps

unread,
Jan 10, 2016, 3:03:34 PM1/10/16
to Dirk-Jan C. Binnema, mu-di...@googlegroups.com
Dirk-Jan C. Binnema <dj...@djcbsoftware.nl> writes:

> On Friday Jan 08 2016, Christian Hopps wrote:
>
>> So I've been using org mode to store links to mail, and one thing that
>> would be *very* useful is a way to go from mu4e-view mode on a
>> particular message to a headers view of the containing mail folder with
>> the message highlighted. It would be even better if there was some sort
>> of thread view only, but I suspect that may be harder.
>>
>> Is there a way to do this currently or should I look to write one?
>
> It's not available out of the box (I think -- mu4e sometimes surprises
> me as well!), but it shouldn't be _too_ hard to add.
>
> Basically, take the message-id of the message at point, then store a
> query searching for that message-id, and store that as an org-link. Now,
> as long as mu4e-headers-show-threads is `t`, you should be able to jump
> to it.
>
> If it works, it can probably turned into an 'action' (see the docs)
> quite easily.

So I tried that using my original message..

mu4e:query:msgid:m2k2nk8...@chopps.org

Unfortunately it only showed that message (in it's 3 locations). I tried
with your reply message ID as well, but it just showed the 2 copies of
that email.

Thanks,
Chris.

(mu4e-headers-show-threads is t for me BTW.)

>
> Kind regards,
> Dirk.

signature.asc

Dirk-Jan C. Binnema

unread,
Jan 10, 2016, 3:20:41 PM1/10/16
to Christian Hopps, mu-di...@googlegroups.com
> (mu4e-headers-show-threads is t for me BTW.)

--8<---------------cut here---------------start------------->8---
(defun my-link-thread ()
(interactive)
(let ((org-mu4e-link-query-in-headers-mode t))
(org-mu4e-store-and-capture)))
--8<---------------cut here---------------end--------------->8---

It works just fine for me -- perhaps you also need to set
`mu4e-headers-include-related` to t.

Christian Hopps

unread,
Jan 10, 2016, 3:26:22 PM1/10/16
to mu-di...@googlegroups.com, cho...@chopps.org

Dirk-Jan C. Binnema <dj...@djcbsoftware.nl> writes:
> It works just fine for me -- perhaps you also need to set
> `mu4e-headers-include-related` to t.

This was it. I'm not sure I like that in headers mode for my normal scan
though unread email though, (I don't want to normally see all the
messages I've already read) perhaps that's why it was nil. :)

I'll try running with it for a while.

Thanks!
Chris.
signature.asc

Christian Hopps

unread,
Jan 10, 2016, 3:50:59 PM1/10/16
to mu-di...@googlegroups.com, cho...@chopps.org

Christian Hopps <cho...@chopps.org> writes:

> Dirk-Jan C. Binnema <dj...@djcbsoftware.nl> writes:
>> It works just fine for me -- perhaps you also need to set
>> `mu4e-headers-include-related` to t.
>
> This was it. I'm not sure I like that in headers mode for my normal scan
> though unread email though, (I don't want to normally see all the
> messages I've already read) perhaps that's why it was nil. :)

Ah, figured a way to do this:

emacsclient --eval '(let ((mu4e-headers-include-related t)) (org-mu4e-open "query:msgid:m2k2nk8...@chopps.org"))'

I can leave mu4e-headers-include-related set to nil by default, and run
that from terminal-notifier to open the message with it enabled.

Thanks,
Chris.
signature.asc

Jeroen Tiebout

unread,
Jan 10, 2016, 4:19:54 PM1/10/16
to mu-di...@googlegroups.com, cho...@chopps.org
Also note that the default keybinding to toggle "include-related" is
a simple uppercase 'W'.
Reply all
Reply to author
Forward
0 new messages