1 Return-Path: <markwalters1009@gmail.com>
\r
2 X-Original-To: notmuch@notmuchmail.org
\r
3 Delivered-To: notmuch@notmuchmail.org
\r
4 Received: from localhost (localhost [127.0.0.1])
\r
5 by olra.theworths.org (Postfix) with ESMTP id 248AA431FC9
\r
6 for <notmuch@notmuchmail.org>; Sat, 18 Jan 2014 15:31:25 -0800 (PST)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=0.201 tagged_above=-999 required=5
\r
12 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,
\r
13 FREEMAIL_ENVFROM_END_DIGIT=1, FREEMAIL_FROM=0.001,
\r
14 RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled
\r
15 Received: from olra.theworths.org ([127.0.0.1])
\r
16 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
17 with ESMTP id PhCqkH2iADZJ for <notmuch@notmuchmail.org>;
\r
18 Sat, 18 Jan 2014 15:31:20 -0800 (PST)
\r
19 Received: from mail-we0-f172.google.com (mail-we0-f172.google.com
\r
20 [74.125.82.172]) (using TLSv1 with cipher RC4-SHA (128/128 bits))
\r
21 (No client certificate requested)
\r
22 by olra.theworths.org (Postfix) with ESMTPS id 8560E431FBC
\r
23 for <notmuch@notmuchmail.org>; Sat, 18 Jan 2014 15:31:12 -0800 (PST)
\r
24 Received: by mail-we0-f172.google.com with SMTP id q58so5893134wes.17
\r
25 for <notmuch@notmuchmail.org>; Sat, 18 Jan 2014 15:31:11 -0800 (PST)
\r
26 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
\r
27 h=from:to:cc:subject:date:message-id:in-reply-to:references;
\r
28 bh=JilFrUBfOH6c5OhuD/HT7AR/Ixh90DR5aHN1maipx9Q=;
\r
29 b=MptqKIaUcEL3qPGEVonFILfCG/Jw5ncopfrsed3dlIHiNi6YNDXhiDFOkG/G469ids
\r
30 LEr6VvNoJ0NqVikFVgQY08P6E/tKe2De4D3q2iR2FAovQ+wD4z4BFLAMeddrqpkcQaun
\r
31 HAsbGmYj+NuCYjoy15pHb9dClfjDE7xfS9yTlGbOX5SjPabMpmtocT/fugVaYZdNBSsw
\r
32 Lj1Tg2Q705wVvI+/YZ+6a2GhUHonU315s6wYU3VhuuKvGg5jrnq+J+k6VvpwORM8FGrM
\r
33 6dB4t4lNa5fzxyBK/v3k3cJ+3I6tD3Qc9orq3kfmPrtWzSztr9MM1fs8QLM3G7mwCzfX
\r
35 X-Received: by 10.194.109.68 with SMTP id hq4mr8172079wjb.12.1390087871463;
\r
36 Sat, 18 Jan 2014 15:31:11 -0800 (PST)
\r
37 Received: from localhost (93-97-24-31.zone5.bethere.co.uk. [93.97.24.31])
\r
38 by mx.google.com with ESMTPSA id ea4sm10966525wib.7.2014.01.18.15.31.10
\r
39 for <multiple recipients>
\r
40 (version=TLSv1.2 cipher=RC4-SHA bits=128/128);
\r
41 Sat, 18 Jan 2014 15:31:10 -0800 (PST)
\r
42 From: Mark Walters <markwalters1009@gmail.com>
\r
43 To: notmuch@notmuchmail.org
\r
44 Subject: [PATCH 6/7] emacs: search: use orig-tags in search
\r
45 Date: Sat, 18 Jan 2014 23:30:54 +0000
\r
46 Message-Id: <1390087855-26194-7-git-send-email-markwalters1009@gmail.com>
\r
47 X-Mailer: git-send-email 1.7.9.1
\r
48 In-Reply-To: <1390087855-26194-1-git-send-email-markwalters1009@gmail.com>
\r
49 References: <1390087855-26194-1-git-send-email-markwalters1009@gmail.com>
\r
50 X-BeenThere: notmuch@notmuchmail.org
\r
51 X-Mailman-Version: 2.1.13
\r
53 List-Id: "Use and development of the notmuch mail system."
\r
54 <notmuch.notmuchmail.org>
\r
55 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
56 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
57 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
58 List-Post: <mailto:notmuch@notmuchmail.org>
\r
59 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
60 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
61 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
62 X-List-Received-Date: Sat, 18 Jan 2014 23:31:25 -0000
\r
64 This uses the recent functionality to show the tag changes in the
\r
65 search buffer. Currently this is only used to show changes the search
\r
66 buffer makes itself: i.e., it does not make display any changes
\r
67 reflecting tagging done by other notmuch-buffers.
\r
69 emacs/notmuch.el | 12 +++++++++---
\r
70 1 files changed, 9 insertions(+), 3 deletions(-)
\r
72 diff --git a/emacs/notmuch.el b/emacs/notmuch.el
\r
73 index 1436e5a..f0ea5d4 100644
\r
74 --- a/emacs/notmuch.el
\r
75 +++ b/emacs/notmuch.el
\r
76 @@ -753,14 +753,20 @@ non-authors is found, assume that all of the authors match."
\r
77 format-string (notmuch-sanitize (plist-get result :authors))))
\r
79 ((string-equal field "tags")
\r
80 - (let ((tags (plist-get result :tags)))
\r
81 - (insert (format format-string (notmuch-tag-format-tags tags tags)))))))
\r
82 + (let ((tags (plist-get result :tags))
\r
83 + (orig-tags (plist-get result :orig-tags)))
\r
84 + (insert (format format-string (notmuch-tag-format-tags tags orig-tags)))))))
\r
86 (defun notmuch-search-show-result (result &optional pos)
\r
87 "Insert RESULT at POS or the end of the buffer if POS is null."
\r
88 ;; Ignore excluded matches
\r
89 (unless (= (plist-get result :matched) 0)
\r
90 - (let ((beg (or pos (point-max))))
\r
91 + (let ((beg (or pos (point-max)))
\r
92 + ;; If we are inserting the result for the first time POS
\r
93 + ;; will be nil and we should set orig-tags.
\r
96 + (plist-put result :orig-tags (plist-get result :tags)))))
\r
99 (dolist (spec notmuch-search-result-format)
\r