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 CD7076DE10B7 for ; Sat, 30 Sep 2017 08:29:31 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: 0.015 X-Spam-Level: X-Spam-Status: No, score=0.015 tagged_above=-999 required=5 tests=[AWL=0.035, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01] 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 ZaTYaTH28ciX for ; Sat, 30 Sep 2017 08:29:30 -0700 (PDT) Received: from mail-lf0-f54.google.com (mail-lf0-f54.google.com [209.85.215.54]) by arlo.cworth.org (Postfix) with ESMTPS id 6551C6DE100F for ; Sat, 30 Sep 2017 08:29:30 -0700 (PDT) Received: by mail-lf0-f54.google.com with SMTP id 80so2156793lfy.4 for ; Sat, 30 Sep 2017 08:29:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nikula-org.20150623.gappssmtp.com; s=20150623; h=from:to:subject:in-reply-to:references:date:message-id:mime-version; bh=F+v2MaKk8eHEKk0bkwzsGsqHkSk7VjCua4yX7zkUmqA=; b=Edb1mVFchG/eZ263EU7kGRsZnLvqwsCHMQdAoe6eW2xTmMYi48T8XBxQggkiB7zQ/J 1YRJFjAH5iSTNyJnPp5eIaLIcNFPU9lFZDE7FbzbpZhhD1Hsmb0NIXMCf2oqdDIfS9AG KmRYYCbMKlDtISo0lrGUw+lrpJjEBMwO2P/ciaRGmtCt4qyBWTmOVhYnnQXleGOL/nuX df/e5eXYfogWUUzh2u863vhJucIe72vVXZTd89QWbGnILHI8clyOmptQJFgl0axdj3md +k6r8TvgvbDUjeyislUf1zXasqX6h7t+2R1rACi4TCC6RHLDu/uMPTrqrFNtZL5E8uCQ JOrw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:in-reply-to:references:date :message-id:mime-version; bh=F+v2MaKk8eHEKk0bkwzsGsqHkSk7VjCua4yX7zkUmqA=; b=YRLagjpJzpK4SB3lzYRILDJVtELlNbGPv6tawyROhm+3W9xYj0us+67a88OWTgOy01 9PCyQBXwj/abSGQ1HdHBhPA6+eW8bR6Xa8s++D1eE7CsUi8XzYMPh9HB9FWAoFPLZU5X QGb21dIyfsf70f3lSb6gfHDpCdG+DWsHhFF85wQlXxICEAwkAaQicsWEnlQKRlbecxch q1V4TM+Q2y2fVujQHAStrV/Et/h72jdKFgAoTx92J3k7VES//EMbU1MNGaBisiGNtrZ/ 11YbM2ktqPRnY0BMXUwG6jneOIckhEXZYi50kXSUJoX2lGZ+kuFMl7PdIcY0ksjg1F+h 5q8Q== X-Gm-Message-State: AHPjjUi96dTe6Hamdx25Ncj7TrZx5F6VkCnFXDwy70H2/rW5/oA8BSfF OFngTx1HxkzQsT6bWpvvNSiStuT2F6A= X-Google-Smtp-Source: AOwi7QDuFDzAitcyRyzwiZpqMaDNRSrJ+Sh0GhSRSrdGX2UWaHG/TV3EQ1d6qyDdIaGuW82JgXl6sQ== X-Received: by 10.46.31.18 with SMTP id f18mr4659987ljf.181.1506785368126; Sat, 30 Sep 2017 08:29:28 -0700 (PDT) Received: from localhost (mobile-access-5d6a60-234.dhcp.inet.fi. [93.106.96.234]) by smtp.gmail.com with ESMTPSA id n74sm1338246lja.44.2017.09.30.08.29.26 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 30 Sep 2017 08:29:27 -0700 (PDT) From: Jani Nikula To: William Casarin , notmuch@notmuchmail.org Subject: Re: [PATCH 0/6] Sort by from and subject In-Reply-To: <871smome28.fsf@jb55.com> References: <20170926053547.18564-1-jb55@jb55.com> <87r2uoqyy0.fsf@nikula.org> <871smome28.fsf@jb55.com> Date: Sat, 30 Sep 2017 18:29:23 +0300 Message-ID: <87o9psqk6k.fsf@nikula.org> MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.23 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: Sat, 30 Sep 2017 15:29:31 -0000 On Sat, 30 Sep 2017, William Casarin wrote: > Jani Nikula writes: > >> I think there are two considerations here: >> >> First, is this something we want to have? Is this generally useful? > > Sorting by from and subject are in most mail clients (mutt, gnus, outlook...) Which of those display results as threads, and of those that do, how do they sort the threads? In the notmuch case, the threads would be sorted based on one of the matching messages. Which one should it be? For current date based searches, the message used for sorting is also selected based on date. If we expand the sorting, perhaps we should also think about sorting by relevance provided by Xapian. Not saying you'd have to do this, but I'd like to figure out how all of this should work. The implementation doesn't look particularly difficult, it's the design that's harder to get right. >> There's still the issue of From: and Subject: needing more heuristic for >> useful sorting that I mentioned in id:87efrm70ai.fsf@nikula.org. > > I think I understand what you mean in id:87efrm70ai.fsf@nikula.org but I > don't have enough knowledge of notmuch to implement what you're asking > :(. I believe these are rare cases because I haven't ran into the issue > you described? Look at the subject line of this message. Should it be sorted starting at "Re:", "[PATCH", or "Sort"? You could argue for and against any one of them. Contrast that with the thread sorting above: If the matching message in this thread changes from one with vs. without "Re:", the sort placement of the thread could change considerably. It's common for some corporate mail systems to switch "Firstname Lastname" in messages to "Lastname, Firstname". Should we do something about that? Arguably we could do the sorting first, and think of ways to improve it afterwards. >> Second, if we decide we want this, IMHO the interfaces (both human and >> the lib) need to split the sort key and sort order from the >> start. Fixing it later on is not going to be fun. > > I agree, I figured that would have been a larger refactor so I decided > not to mix it in with this one. I'll start working on a branch that > addresses this. Please wait for feedback from others first, to not waste effort based on just my opinions. I don't make the decisions here. :) BR, Jani.