From c112122304cf101898a40b8a350f96a7edb92cf9 Mon Sep 17 00:00:00 2001 From: Mark Walters Date: Fri, 26 Jun 2015 23:50:31 +0100 Subject: [PATCH] [PATCH 0/4] Allow oldest-first view in tree view --- 98/25190896ec7e0b0532b450c9f1d2cf1fc68479 | 110 ++++++++++++++++++++++ 1 file changed, 110 insertions(+) create mode 100644 98/25190896ec7e0b0532b450c9f1d2cf1fc68479 diff --git a/98/25190896ec7e0b0532b450c9f1d2cf1fc68479 b/98/25190896ec7e0b0532b450c9f1d2cf1fc68479 new file mode 100644 index 000000000..b450abf56 --- /dev/null +++ b/98/25190896ec7e0b0532b450c9f1d2cf1fc68479 @@ -0,0 +1,110 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by arlo.cworth.org (Postfix) with ESMTP id 68A246DE14F2 + for ; Fri, 26 Jun 2015 15:50:52 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at cworth.org +X-Spam-Flag: NO +X-Spam-Score: 0.187 +X-Spam-Level: +X-Spam-Status: No, score=0.187 tagged_above=-999 required=5 tests=[AWL=0.757, + 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_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, + RCVD_IN_MSPIKE_WL=-0.01, 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 jw0wpfFiJtOL for ; + Fri, 26 Jun 2015 15:50:50 -0700 (PDT) +Received: from mail-wi0-f174.google.com (mail-wi0-f174.google.com + [209.85.212.174]) + by arlo.cworth.org (Postfix) with ESMTPS id 65E296DE0274 + for ; Fri, 26 Jun 2015 15:50:50 -0700 (PDT) +Received: by wiwl6 with SMTP id l6so56397109wiw.0 + for ; Fri, 26 Jun 2015 15:50:47 -0700 (PDT) +DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; + h=from:to:cc:subject:date:message-id; + bh=LmvLrbqhdd2r0RADbn/gnRd9hqoXvf1wsziDny4+cH4=; + b=B1iUmP9Gqtt7revZbBYUmKTwJ6VsiebbsN3KU0W74biQ1yR3b6lICpTBCs/nBpPOrI + 4pYFNNVRY37M+lyBvG0uuwuc3XrRTMK6WOQEVx5k0DBFNKz436fLoFrm2LKCW9nvnfFl + +ivb6uu/b2gmR0nRj68qb5xK5Dqm9mdlJIywHxXuVNgIGirboNrCeHIVvc7L2qfXkvpi + AjZljDZ/LMVl1NFEvD1U2tQV4ruUsh9ojG84n9C42ru+yE6p5CXB9X9HDoeA7Ay7nx1X + 150QO6yVnnH+DeEdK6Vyi8EY+fRvpRcAxaVNv7Xj4NJVmaooXvUfjzaroDR+jc8nK1Vd + PkuQ== +X-Received: by 10.180.189.201 with SMTP id gk9mr716105wic.53.1435359046049; + Fri, 26 Jun 2015 15:50:46 -0700 (PDT) +Received: from localhost (5751dfa2.skybroadband.com. [87.81.223.162]) + by mx.google.com with ESMTPSA id gw7sm392583wib.15.2015.06.26.15.50.44 + (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); + Fri, 26 Jun 2015 15:50:45 -0700 (PDT) +From: Mark Walters +To: notmuch@notmuchmail.org +Subject: [PATCH 0/4] Allow oldest-first view in tree view +Date: Fri, 26 Jun 2015 23:50:31 +0100 +Message-Id: <1435359035-6767-1-git-send-email-markwalters1009@gmail.com> +X-Mailer: git-send-email 2.1.4 +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.18 +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: Fri, 26 Jun 2015 22:50:52 -0000 + +This series allows the user to toggle the sort order in tree view and, +in particular, allows oldest first view. + +Note that in all cases messages within a thread are displayed in +thread order: the option only affects the order when multiple threads +are viewed. If you only use tree view for single threads then nothing +will change. + +Since tree view uses the notmuch-show command line as a backend this +means we need to add a --sort option tonotmuch show. This is the first +patch. + +The second patch implements the toggle sort order option bound to 'o' +(so the same as the corresponding command in search view). + +These third and fourth patches are more optional: they make notmuch +tree view inherit the notmuch search order when called via Z +(notmuch-tree-from-search-current-query), and use the default +notmuch-search sort order (notmuch-search-oldest-first) when called +interactively. The third patch does the code change and the fourth the +test update. + +I think these last two patches make sense for consistency but I have +no strong feelings otherwise. + +Best wishes + +Mark + + + + +Mark Walters (4): + cli: show: allow sort order to be specified + emacs: tree: bind o to toggle sort order + emacs: tree: add sort argument to notmuch-tree + test: tree: fix and a test for tree sort order changes + + doc/man1/notmuch-show.rst | 17 +++++++ + emacs/notmuch-tree.el | 44 +++++++++++++++--- + emacs/notmuch.el | 2 +- + notmuch-show.c | 8 ++++ + test/T460-emacs-tree.sh | 11 ++++- + .../notmuch-tree-tag-inbox-oldest-first | 53 ++++++++++++++++++++++ + 6 files changed, 126 insertions(+), 9 deletions(-) + create mode 100644 test/tree.expected-output/notmuch-tree-tag-inbox-oldest-first + +-- +2.1.4 + -- 2.26.2