Getting the right root mail of the thread

Felipe Contreras felipe.contreras at gmail.com
Sat Nov 2 06:08:14 PDT 2013


Hi,

I often wondered why when browsing threads, I often see a message that doesn't
describe at all the thread, for example:

  notmuch search ...
  thread:000000000000826a 18 mins. ago [45/45] Felipe Contreras; [PATCH/TEST 44/44]

I can reverse the order of the search:

  notmuch search --sort=oldest-first
  thread:000000000000826a 23 mins. ago [45/45] Felipe Contreras; [PATCH/TEST 00/44]

Then I get the correct summary, but now the order of the search is the other
way around, and there doesn't seem to be a way to specify the order of the
messages independently of the order of the threads.

Either way this doesn't make any sense to me. Each thread has a single origin
mail, why would anybody would like to show a message other than that while
displaying the summary of the tread? Even more, why isn't there an option to
fetch that information easily?

I am forced to get the list of messages, and then grab the first one, even
though it's not efficient, probably unnecessary, and potentiall wrong. For
example, it's possible that multiple mails arrived at the same time, then how
am I supposed to display the one that originated the thread?

I think there should be a way to get the root mail of a thread, irrespective of
the search order.

Cheers.

-- 
Felipe Contreras


More information about the notmuch mailing list