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 CD0A76DE10B7 for ; Sat, 30 Sep 2017 09:03:12 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: -0.013 X-Spam-Level: X-Spam-Status: No, score=-0.013 tagged_above=-999 required=5 tests=[AWL=0.048, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.211, SPF_PASS=-0.001] 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 Lce375-2Wmhp for ; Sat, 30 Sep 2017 09:03:12 -0700 (PDT) Received: from mail-wr0-f177.google.com (mail-wr0-f177.google.com [209.85.128.177]) by arlo.cworth.org (Postfix) with ESMTPS id D6BAE6DE100F for ; Sat, 30 Sep 2017 09:03:11 -0700 (PDT) Received: by mail-wr0-f177.google.com with SMTP id h16so1373368wrf.6 for ; Sat, 30 Sep 2017 09:03:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:in-reply-to:references:date:message-id:mime-version; bh=M2VAl+2HfKNGSBIdMQmuuwWXdPJ3z6pyvkjobHJTl9s=; b=VIYg29mh67qWse0teErfKDz8SNSVat1I+JbWIq6Aa85Qndp9lZ4Pgq6t3qZ5wjHO+5 YUTi1KewEdbW/5n/QxxaLpbTuVkrVhr6vYbRbSPI4YV9HnIFI/PDbwQrxJnxmd3aiwwa NDmQat2TKQOCigBPMGLqqVTqrk2z+clkxe4xVXUMaVfg2VXlWLtCLUqWsj0rW8LawYsE 9QRj4oDi72EMKNpbML8P9wf4KEIqTNdVxP4lifBkKzGzK/8UUYPWfYaOqybNjcbGGyUu 8kJ+LXbfqx4uf5offFDCAfv52HE+/NgKQ/D/1r43lSHHZVi/pb68JKPA1i1qH2fVhVg/ QBbg== 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=M2VAl+2HfKNGSBIdMQmuuwWXdPJ3z6pyvkjobHJTl9s=; b=X9TA4dvYGfSX9ENr5SIsmURqfgYlHj/38xre2ghiKTuavlITKRTP5CVQ/u+es/gHX7 2x0PxBP2Y0gFTtisjwJie9D4OveM2sUnxYsCxsIDYABIoV6GgYuZNHPSJcZobJkEyato 5NRe6NA0JzhmRYAaFZgvtRNOhYNnmDpdUSZmuomieWekkyIpprWtA9pVCEEHraQUo1Uz jLbAuoZV1l3h62x8W6yB7Q3qv7qwG4BVgMayRmuBsjULVwjKXQ29WialK8Uzh1OoeNgK K3/Wn5f70ZelpqtsKOpav5MWGQ5r77XYAdCjs6HV7DusPBX6mcuKfnD+7sB6Ac3JUPfJ FDuw== X-Gm-Message-State: AHPjjUjFakadXzuXg58tI3u+y0pF1LFhdEyX4+j5Ftxq77dOLAoSmPC3 uv/32nD0BuachQrOjFTitkw= X-Google-Smtp-Source: AOwi7QAitMdQeWWKJ1JbppBL7CpMH4B1Dr3hJytuwIkk85C3H8F0/AX4D039GjddBq8uH5HLhaZj2g== X-Received: by 10.223.146.37 with SMTP id 34mr5765158wrj.79.1506787389956; Sat, 30 Sep 2017 09:03:09 -0700 (PDT) Received: from localhost (5751dfa2.skybroadband.com. [87.81.223.162]) by smtp.gmail.com with ESMTPSA id x17sm4516091wrg.50.2017.09.30.09.03.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 30 Sep 2017 09:03:09 -0700 (PDT) From: Mark Walters To: Jani Nikula , William Casarin , notmuch@notmuchmail.org Subject: Re: [PATCH 0/6] Sort by from and subject In-Reply-To: <87o9psqk6k.fsf@nikula.org> References: <20170926053547.18564-1-jb55@jb55.com> <87r2uoqyy0.fsf@nikula.org> <871smome28.fsf@jb55.com> <87o9psqk6k.fsf@nikula.org> Date: Sat, 30 Sep 2017 17:03:02 +0100 Message-ID: <87d168kwcp.fsf@qmul.ac.uk> 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 16:03:12 -0000 Hi On Sat, 30 Sep 2017, Jani Nikula wrote: > 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. I agree with Jani that for thread based views sorting by from is a little odd -- sorting by subject less so as that is mostly constant in a thread. But allowing sorting by from in message based views could be useful. If we are looking at the notmuch-emacs frontend then that would be in tree view. This calls notmuch-show.c from the CLI, so that is the place I would suggest we do this. If notmuch-show.c returns each message as "if it were in its own thread" in the sense of the sexp output (see devel/schemata) I think notmuch-tree would just work. >>> 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. These are concerns, but I agree that we try some form of sorting first and then think about improving it. I think the above as an interface to notmuch-tree should work -- I had something similar in the very early days of notmuch-tree (when it was notmuch-pick) but dropped it when trying to keep the patch set small enough to be even vaguely manageable. Best wishes Mark