From 2843e26c11686021df3256af7e685d90b4913d1d Mon Sep 17 00:00:00 2001 From: Mark Walters Date: Sat, 18 Jan 2014 23:30:55 +0000 Subject: [PATCH] [PATCH 7/7] emacs: tree: use orig-tags in search --- f3/ba21401e7f3888224cc4f806423936c9095822 | 108 ++++++++++++++++++++++ 1 file changed, 108 insertions(+) create mode 100644 f3/ba21401e7f3888224cc4f806423936c9095822 diff --git a/f3/ba21401e7f3888224cc4f806423936c9095822 b/f3/ba21401e7f3888224cc4f806423936c9095822 new file mode 100644 index 000000000..1843ba4ec --- /dev/null +++ b/f3/ba21401e7f3888224cc4f806423936c9095822 @@ -0,0 +1,108 @@ +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 84D70431FD4 + for ; Sat, 18 Jan 2014 15:31:39 -0800 (PST) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: 0.201 +X-Spam-Level: +X-Spam-Status: No, score=0.201 tagged_above=-999 required=5 + tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, + FREEMAIL_ENVFROM_END_DIGIT=1, FREEMAIL_FROM=0.001, + RCVD_IN_DNSWL_LOW=-0.7] 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 VSTtomw3mvE3 for ; + Sat, 18 Jan 2014 15:31:35 -0800 (PST) +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 + 4351C431FD7 for ; Sat, 18 Jan 2014 15:31:14 -0800 + (PST) +Received: by mail-wg0-f48.google.com with SMTP id x13so5675819wgg.3 + for ; Sat, 18 Jan 2014 15:31:13 -0800 (PST) +DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; + h=from:to:cc:subject:date:message-id:in-reply-to:references + :mime-version:content-type:content-transfer-encoding; + bh=fiqfOMYGawyOflOdOHDxirA+gtU+CjbHtynsr56gwMc=; + b=ODScDNiOvF72lBnzNZxe20qu5rWXNLMnk0KNcgBNcQJdEEDwGqlfI+Vz0IFge/I8wU + 6AFnLcC+Hfr/HUMVjwci9GEt60tZb4Tci+CBi1w4wDBJZveK8F8Wpg+7owRHPvMcfqIS + +O5jgIZGw7KEnMDz5/TFzYFSONV/AIe2osKXKBvr4v/rLFuTGEkABC2ODh6HJ4pSCfi9 + YwksR5lkwz1hCjyRfae6DLsbSm20ZQSeKfz3RUCTRNYKefSLtyXwgBu+PElvv/Iu6mgx + CVqnropJjyxtR8JSFqJ+x7cjW0s2vOPH4UT5brEYICRsB41f6FfRfOfne9pcnBod4lo+ + FnHQ== +X-Received: by 10.194.110.41 with SMTP id hx9mr8180849wjb.28.1390087873065; + Sat, 18 Jan 2014 15:31:13 -0800 (PST) +Received: from localhost (93-97-24-31.zone5.bethere.co.uk. [93.97.24.31]) + by mx.google.com with ESMTPSA id ea4sm10972696wib.7.2014.01.18.15.31.12 + for + (version=TLSv1.2 cipher=RC4-SHA bits=128/128); + Sat, 18 Jan 2014 15:31:12 -0800 (PST) +From: Mark Walters +To: notmuch@notmuchmail.org +Subject: [PATCH 7/7] emacs: tree: use orig-tags in search +Date: Sat, 18 Jan 2014 23:30:55 +0000 +Message-Id: <1390087855-26194-8-git-send-email-markwalters1009@gmail.com> +X-Mailer: git-send-email 1.7.9.1 +In-Reply-To: <1390087855-26194-1-git-send-email-markwalters1009@gmail.com> +References: <1390087855-26194-1-git-send-email-markwalters1009@gmail.com> +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +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: Sat, 18 Jan 2014 23:31:39 -0000 + +This uses the recent functionality to show the tag changes in the tree +buffer. Currently this is only used to show changes the tree buffer +makes itself: i.e., it does not make display any changes reflecting +tagging done by other notmuch-buffers. +--- + emacs/notmuch-tree.el | 9 ++++++--- + 1 files changed, 6 insertions(+), 3 deletions(-) + +diff --git a/emacs/notmuch-tree.el b/emacs/notmuch-tree.el +index b37e2cd..0f4cd47 100644 +--- a/emacs/notmuch-tree.el ++++ b/emacs/notmuch-tree.el +@@ -701,10 +701,11 @@ unchanged ADDRESS if parsing fails." + + ((string-equal field "tags") + (let ((tags (plist-get msg :tags)) ++ (orig-tags (plist-get msg :orig-tags)) + (face (if match + 'notmuch-tree-match-tag-face + 'notmuch-tree-no-match-tag-face))) +- (format format-string (notmuch-tag-format-tags tags tags face))))))) ++ (format format-string (notmuch-tag-format-tags tags orig-tags face))))))) + + (defun notmuch-tree-format-field-list (field-list msg) + "Format fields of MSG according to FIELD-LIST and return string" +@@ -766,8 +767,10 @@ message together with all its descendents." + (push "├" tree-status))) + + (push (concat (if replies "┬" "─") "►") tree-status) +- (plist-put msg :first (and first (eq 0 depth))) +- (notmuch-tree-goto-and-insert-msg (plist-put msg :tree-status tree-status)) ++ (setq msg (plist-put msg :first (and first (eq 0 depth)))) ++ (setq msg (plist-put msg :tree-status tree-status)) ++ (setq msg (plist-put msg :orig-tags (plist-get msg :tags))) ++ (notmuch-tree-goto-and-insert-msg msg) + (pop tree-status) + (pop tree-status) + +-- +1.7.9.1 + -- 2.26.2