Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id ED275431FBF; Sat, 21 Nov 2009 21:12:43 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id vMdFddMh5azB; Sat, 21 Nov 2009 21:12:43 -0800 (PST) Received: from cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id AF32B431FAE; Sat, 21 Nov 2009 21:12:42 -0800 (PST) From: Carl Worth To: Bart Trojanowski , notmuch@notmuchmail.org In-Reply-To: <20091122021833.GC17268@jukie.net> Date: Sun, 22 Nov 2009 05:58:58 +0100 Message-ID: <87zl6f17fx.fsf@yoom.home.cworth.org> References: <20091122021833.GC17268@jukie.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [notmuch] hijacked threads can be confusing in notmuch X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Nov 2009 05:12:44 -0000 On Sat, 21 Nov 2009 21:18:34 -0500, Bart Trojanowski wrote: > In mutt it looked like this: >=20 > [notmuch] [PATCH 1/3] Make mouse-1 click in search view show thread > =E2=94=94=E2=94=80>[notmuch] [PATCH 2/3] Add 'notmuch count' command to= show the count of matching messages > =E2=94=94=E2=94=80>[notmuch] [PATCH 3/3] Add notmuch-index mode to di= splay message counts >=20 > ... and in the mutt threaded display the relationship between the three > messages is pretty clear. >=20 > Now consider what happens when I run notmuch search 'notmuch count'. I > get this: >=20 > Today 02:15 [2/3] Keith Packard; [notmuch] [PATCH 1/3] Make mouse-1 > click in search view show thread (inbox unread) Hmm... that's a bug. What notmuch *should* be doing here is taking as the subject of the thread the subject of the first message in the thread that matched, (rather than the subject of the first message in the thread). The thread_create has all that information, (it constructs two lists---one of all its messages, and one of matched messages). Now the next step is still missing. Let's say that instead of 2/3 mesages matched in the thread, (and by the way, did you all now that that's what's being reported there? it's not the number of unread messages or anything like that, but the number of matched messages). Anyway, let's say you had something like 1/20 there instead. And let's also assume that there aren't any unread messages in the thread. Then when you go to view that thread you will see all the messages open, and you won't have any information as to which message matched. What *should* happen here is that only the messages that matched should be open, and the messages that didn't match should be closed. Currently, the various pieces of the system don't have access to the information they need for this result. One way to do it would be to make "notmuch search" return a list of message IDs rather than a thread ID and then emacs could pass that list to "notmuch show". Alternately, the emacs interface could pass the current thread ID to "notmuch show" but also pass along the search string and then "notmuch show" could indicate which messages matched the search. Another thing to decide is how this relates with the default behavior of opening unread messages but closing read messages. Would possibility there could be to make that work just like any other search, just as I described above. If we were to go that route, I think it might mean getting rid of the distinction between "inbox" and "unread", and I'm not sure I want to do that or not. Anyway, I'd love to hear some ideas. > On a related note, one mail related pet peeve I have is when people > reply to a random email in their mailbox when they actually intend to > start a new thread. Doing that would totally mess up someone using > notmuch. They could get search results with threads which have no > relevance to their actual search... at least at first glance. Hopefully, the fix of displaying the subject from the first matched message would help here. -Carl