How can I configure mutt to display my replies within threads?

7,765

Solution 1

I found that notmuch-mutt has some of the behavior I'm looking for. It defines a macro that looks at message-ids and can create a virtual folder to show an entire threaded conversation regardless of where each message lives. Out of the box it only works on search results. I'm not sure if the same behavior can be applied to regular mailboxes.

Solution 2

I found a solution that works for me even though it is not pretty.

set record = "+INBOX"

I just set record to my inbox, in that way the messages get threaded. It might not be ideal when I am the first sending an e-mail, but normally I will get an answer, so no issue.

Solution 3

You can make a patched mutt save your message to the current folder. To cite the FAQ:

How to save copies of outgoing/sent eMails to the current folder?

You need the current_shortcut patch (see PatchList). With that patch, "^" points to the current folder. You can use that folder in folder-hooks etc.

folder-hook . 'set record="^"'

Note: Make sure you have at least current_shortcut.2. Version 1 is broken.

It seems that the Ubuntu 16.04 package ships that patch.

Share:
7,765

Related videos on Youtube

Marco Ribolla
Author by

Marco Ribolla

Full-stack software engineer

Updated on September 18, 2022

Comments

  • Marco Ribolla
    Marco Ribolla almost 2 years

    While mutt has set sort = threads to show threaded, "conversation" style messages, it doesn't display one's own replies in the threads. Instead, you have to change to the Sent folder to see your own messages. Is there any way to display one's own replies where they belong inside threads?

    • Admin
      Admin about 9 years
      Just save the send email in your current folder and not in the send folder?
    • Admin
      Admin about 9 years
      But what happens if I reply on an email from my phone?
    • Admin
      Admin over 8 years
      You should write up notmuch-mutt up as an answer and accept it. It works fine here!
    • Admin
      Admin over 8 years
      I have since stopped using mutt and now use mu4e (mu for emacs). I will go ahead and answer this question though.
  • Admin
    Admin about 9 years
    This looks like a plain ugly hack to me. Sending copies of all emails to myself just feels wrong. Especially if it is to accommodate for a poor viewing code in the email client. I often search my Gmail inbox and include things such as to:me. Using the approach you suggest messes this up.
  • Admin
    Admin about 9 years
    I did my own little investigation on this feature asked by OP and @aioobe and there seems to be no easy way to do that, so it's a good idea for a patch. There are already a number of patches written for mutt by various people. It would be a great feature to have, btw!
  • Admin
    Admin about 9 years
    Yes. I've started looking into writing a patch. I see it as a last resort though. (Same story for a 'mute' feature.)