From d0bcb383a7e66fdd97654ce76fadb2b9f76e6d40 Mon Sep 17 00:00:00 2001 From: David Edmondson Date: Fri, 24 Oct 2014 18:44:00 +0100 Subject: [PATCH] [PATCH v2 0/3] Improve the display of matching/non-matching authors. --- 0a/739831e433357ae0a6fb2c4cb15af01b523664 | 103 ++++++++++++++++++++++ 1 file changed, 103 insertions(+) create mode 100644 0a/739831e433357ae0a6fb2c4cb15af01b523664 diff --git a/0a/739831e433357ae0a6fb2c4cb15af01b523664 b/0a/739831e433357ae0a6fb2c4cb15af01b523664 new file mode 100644 index 000000000..70b795028 --- /dev/null +++ b/0a/739831e433357ae0a6fb2c4cb15af01b523664 @@ -0,0 +1,103 @@ +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 78DBA431FD8 + for ; Fri, 24 Oct 2014 10:44:14 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: -0.699 +X-Spam-Level: +X-Spam-Status: No, score=-0.699 tagged_above=-999 required=5 + tests=[RCVD_IN_DNSWL_LOW=-0.7, UNPARSEABLE_RELAY=0.001] + autolearn=disabled +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 D3yqhBailyEW for ; + Fri, 24 Oct 2014 10:44:08 -0700 (PDT) +Received: from mail-wg0-f48.google.com (mail-wg0-f48.google.com + [74.125.82.48]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client + certificate requested) by olra.theworths.org (Postfix) with ESMTPS id + 1C220431FBD for ; Fri, 24 Oct 2014 10:44:07 -0700 + (PDT) +Received: by mail-wg0-f48.google.com with SMTP id k14so1600531wgh.7 + for ; Fri, 24 Oct 2014 10:44:06 -0700 (PDT) +X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; + d=1e100.net; s=20130820; + h=x-gm-message-state:user-agent:from:to:subject:date:message-id; + bh=Y3082OgZeet+5MgUX+FAAWgPA20VnVqtqL7Sz32dt9Q=; + b=TxIfhm1yzI90ZYCFmwlV+7FEmaayr917leu6lGdw8Bq3Azjv8CgdlochvM4I8H2yws + AhfiIJBpyBT1zqA6fqhPCvmcYvMk1j9Lu6AGW24e/Ia6wkJH1AFsWG5kZ1zelTEVMVLX + LhB+ywuGhRI6guh1OFbWmzxQXYGekKN3e5QhFV2OR7eMhQR4bSQ14TLPomKuFBDpSKsB + lwuSLHm4BUYjcw5HbHIF6YbHrP82TjFadYZOVPbJpZUU35rCt3DB4+ZuBQJrhJg2re8G + YS5CvKPe9yY8CfvoICw8TvLz9/KZgQuo4uhPshfjOtZGIB12ls1VsYnfGE9UnfeYuZQZ + v7jQ== +X-Gm-Message-State: + ALoCoQlPlEtCIAC1WiWw5/fJApHnmGwOXxZLnll4wN4lwyGYwAS+gvzca/OUZ1EdPVIYeO4HpROp +X-Received: by 10.194.189.82 with SMTP id gg18mr4623208wjc.115.1414172646593; + Fri, 24 Oct 2014 10:44:06 -0700 (PDT) +Received: from disaster-area.hh.sledj.net + ([2a01:348:1a2:1:ea39:35ff:fe2c:a227]) + by mx.google.com with ESMTPSA id u8sm2718196wiz.14.2014.10.24.10.44.04 + for + (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); + Fri, 24 Oct 2014 10:44:05 -0700 (PDT) +Received: from localhost (30000@localhost [local]); + by localhost (OpenSMTPD) with ESMTPA id cf884ad2; + for ; Fri, 24 Oct 2014 17:44:03 +0000 (UTC) +User-Agent: OpenSMTPD enqueuer (Demoostik) +From: David Edmondson +To: notmuch@notmuchmail.org +Subject: [PATCH v2 0/3] Improve the display of matching/non-matching authors. +Date: Fri, 24 Oct 2014 18:44:00 +0100 +Message-Id: <1414172643-28270-1-git-send-email-dme@dme.org> +X-Mailer: git-send-email 2.1.1 +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.13 +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, 24 Oct 2014 17:44:14 -0000 + + +Improve the display of matching/non-matching authors. + +Distinguishing between matching and non-matching authors in the emacs +interface is currently done by parsing the :authors attribute of a +search result. If one of the authors uses the pipe symbol (|) in their +'From' address this parsing incorrectly determines the matching and +non-matching authors. + +Address this by adding explicit matching and non-matching authors +attributes to the structured output formats. + +v2: +- Return the matching/non-matching authors as a list. +- More improvements to the code that renders the authors are possible + (to improve the chosen break between visible and invisible), but a + planned re-write of the `notmuch-search-result-format' code would + render that irrelevant. + + +David Edmondson (3): + search: Separately report matching and non-matching authors. + emacs: Improved display of matching/non-matching authors. + test: Update tests for 'authors_matched' and authors_non_matched'. + + emacs/notmuch.el | 64 ++++++++++++++------------ + notmuch-search.c | 105 +++++++++++++++++++++++++++++++++++++++++++ + test/T160-json.sh | 9 ++++ + test/T170-sexp.sh | 4 +- + test/T470-missing-headers.sh | 8 ++++ + 5 files changed, 159 insertions(+), 31 deletions(-) + +-- +2.1.1 + -- 2.26.2