From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id 0C1E86DE01F7 for ; Sun, 29 Jul 2018 06:58:30 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: -0.257 X-Spam-Level: X-Spam-Status: No, score=-0.257 tagged_above=-999 required=5 tests=[AWL=-0.047, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01, URI_NOVOWEL=0.5] autolearn=disabled Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id HHPUn7Z7V9Cf for ; Sun, 29 Jul 2018 06:58:28 -0700 (PDT) Received: from mout.gmx.net (mout.gmx.net [212.227.17.20]) by arlo.cworth.org (Postfix) with ESMTPS id 407CA6DE01E1 for ; Sun, 29 Jul 2018 06:58:27 -0700 (PDT) Received: from len.workgroup ([84.185.108.99]) by mail.gmx.com (mrgmx101 [212.227.17.168]) with ESMTPSA (Nemesis) id 0ME33j-1flChk28bv-00HQq5 for ; Sun, 29 Jul 2018 15:58:23 +0200 From: Gregor Zattler To: notmuch@notmuchmail.org Subject: Re: bug: wrong order of messages in notmuch-show In-Reply-To: <871sbmpe4e.fsf@tethera.net> References: <87efgmmysi.fsf@len.workgroup> <87fu05p2iu.fsf@len.workgroup> <871sbmpe4e.fsf@tethera.net> Mail-Followup-To: notmuch@notmuchmail.org Date: Sun, 29 Jul 2018 15:57:52 +0200 Message-ID: <87y3ducffj.fsf@len.workgroup> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:ghAuhNe7/32vtWpjSLAq9KqvUwcrywOrkoVTn02JoM59QMhqOT5 TzXCgLzMNpMes/lCkWIecTheYOVIZTyGi8oH5K4ASNFgElW8M94TeWcmPHaG28CXQSN11bZ qEojC568jaW3zw1a2hSudxO25WXPK02qgH5U4W+mdgVoTJzNfKQHVVNlw9wsZxUJoVZ/yg7 Y9gc74sTWPdOChLxBLYVQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:L6gN2DA3xTs=:Hsniw/wYHz52iX/gaqo2uz AZ61WR3NutYGpHhtn2z+5J4mjr0AKnExbNYdsMm2PjBfauTugt8jUYba92/yRZYcCkGoHnivi PbsN352J9HdcqUCO1i4T5cAIhEP+w08VyHa29ypgyLwzgtqP135sg77YBIWGn77qs/+Beqqgn 1py45CyVRw9fkneECIT4UkCw7vRZsZywI/aAAumOd83Kl6foQu4evBKL6Ih5jFzQxIWNzijr/ KnHYp9dzzUOeTsYHDe4h6LH8DdeNJp9kA0Whd+QAXdZ1YOYJW2oqBwcIP4ZMYoqTuFtirKyl+ 9ZsfFdmdA9AH146g4T6fXo20ZK3TYfg7UZ1Yi07lx0OnrceemSObzp9vu5g837ATTSMPZyNFV TuAFN2qze5sMIWdSkRJfGBi2n9UZyhEnxRozDdVDLIflJtpizh9y4mm8B/OofoPW0bAl/CksK kw2SQtXwqyK5mG6+UQpX+IfiAEOc+8IryusGuS3IrfU0bCLce+LBnneheMI9NwzXC2yWVXIYU qGGiI9MYxXG8NpxDpImFmm/Me5MqqfYaImN0SS0eRH4BCmwetjiE2BFnW6+mJGuK2fgRzjz4u i5DCYWWipcnaBs3JjzBhiTU1AGzD67P7FkCqI8a0T5wDyFy9c42vTDfGa7768uhDGbLVcPBY8 W8EpXCMFr5vAmbIyiZm17x0EBSsDk0Pld4Krd9/3eCklT1Wu1mRRHg3XKlgqpqsUs8drLk3ed 0BYTTc4Uqn03CwQJP2RIBQ6kA/nCIkO9qkdxoz1OBXHeZWnFIn25WUZnCuRtgCLmQK1yhf958 woagEMs X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.26 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, 29 Jul 2018 13:58:30 -0000 Hi David, * David Bremner [2018-07-29; 17:47]: > Gregor Zattler writes: >> * Gregor Zattler [2018-07-01; 23:27]: > I find it helpful to look at these things in tree-view.=20 > > July 09 Gregor Zattler =E2=94=AC=E2=96=BAxxxxxxx-xxxxxxxxx-s= erver xxxxxxxxxxxx (inbox) > July 09 via RT =E2=95=B0=E2=94=AC=E2=96=BA[support.x= xxxxxxxxxx-xxxxxxxxx-xxxxxxxxx.de #33712] AutoReply: xxxxxxx-xxxxxxxxx-serv= er xxxxxxxxxxxx (inbox replied) > July 09 Gregor Zattler =E2=95=B0=E2=94=AC=E2=96=BA ... = (inbox replied) > July 10 Gregor Zattler =E2=94=9C=E2=94=80=E2=96=BA[support= .xxxxxxxxxxx-xxxxxxxxx-xxxxxxxxx.de #33712] xxxxxxx-xxxxxxxxx-server xxxxxx= xxxxxx (inbox) > Tue. 20:03 Gregor Zattler =E2=94=9C=E2=94=80=E2=96=BA[support= .xxxxxxxxxxx-xxxxxxxxx-xxxxxxxxx.de #33712] AutoReply: xxxxxxx-xxxxxxxxx-se= rver xxxxxxxxxxxx (inbox) > July 09 via RT =E2=95=B0=E2=94=80=E2=96=BA[support= .xxxxxxxxxxx-xxxxxxxxx-xxxxxxxxx.de #33712] xxxxxxx-xxxxxxxxx-server xxxxxx= xxxxxx (inbox) > > The place notmuch is not doing as nice a job as you would like is in > ordering the children of your July 9 message. I think this is because it > is added into the tree in the second pass. It ends up in this situation > because its In-Reply-To field points to a non-existent (in the local > database). In the previous version of threading, I'm pretty sure it > would have been a root message, which might have looked a bit better > with respect to dates, but would have been just as confusing. Yes it would or was. Your poatches are surely an improvement. > [enter thinking out loud mode] > > I agree there is still room for improvement here. Looking at the code, > it seems like it might make sense to order the children by date in > _notmuch_message_add_reply. Currently this uses a generic linked list > insert at tail, which is O(1). It would be more expensive to insert by > date, but it would depend how many replies to a given message there are. Thanks for considering this. FWIW: This is what mutt does (the '=3D>' marks duplicates): 1| | 0|Di-19.06.18-18:26|Gregor Zattler | 0K|FYI: xxxx xxxxxxx = xxxxxxxxxxxx xxx 2| | 0|Di-19.06.18-18:26| via RT |0,1K|`->[support.xxxxxxx= xxxx-xxxxxxxxx-xxxxxxxxx.de #33575] AutoReply: FYI: xxxx xxxxxxx xxxxxxxx= xxxx xxx 3| | 0|Di-26.06.18-14:44| via RT |0,1K|[support.xxxxxxxxxx= x-xxxxxxxxx-xxxxxxxxx.de #33575] Resolved: FYI: xxxx xxxxxxx xxxxxxxxxxxx= xxx 4| | 0|Mo-09.07.18-10:03|Gregor Zattler |0,1K|xxxxxxx-xxxxxxxxx-s= erver xxxxxxxxxxxx 5|r | 0|Mo-09.07.18-10:04|via RT |0,1K|`->[support.xxxxxxx= xxxx-xxxxxxxxx-xxxxxxxxx.de #33712] AutoReply: xxxxxxx-xxxxxxxxx-server xxx= xxxxxxxxx 6|r | 0|Mo-09.07.18-10:24|Gregor Zattler |0,1K| `-> 7|r | 0|Mo-09.07.18-10:24|Gregor Zattler |0,1K| |=3D> 8| | 0|Mo-09.07.18-10:37|via RT |0,1K| |->[support.xxx= xxxxxxxx-xxxxxxxxx-xxxxxxxxx.de #33712] xxxxxxx-xxxxxxxxx-server xxxxxxxxxx= xx 9| | 0|Di-10.07.18-12:18|Gregor Zattler |0,1K| |->Re: [support= .xxxxxxxxxxx-xxxxxxxxx-xxxxxxxxx.de #33712] xxxxxxx-xxxxxxxxx-server xxxxxx= xxxxxx 10| | 0|Di-10.07.18-12:18|Gregor Zattler |0,1K| | `=3D> 11| | 0|Di-24.07.18-14:03|Gregor Zattler |0,1K| `->Re: [support= .xxxxxxxxxxx-xxxxxxxxx-xxxxxxxxx.de #33712] AutoReply: xxxxxxx-xxxxxxxxx-se= rver xxxxxxxxxxxx 12| | 0|Di-24.07.18-14:03|Gregor Zattler |0,1K| `=3D> - The treads are ordered according to date of arrival. - The "resolved" email (No 3) is not part of the 33575-Thread (which is a pity). Thanks, Gregor --=20 -... --- .-. . -.. ..--.. ...-.-