From: Mark Walters Date: Wed, 19 Feb 2014 20:20:12 +0000 (+0000) Subject: [PATCH v2 7/7] emacs: tree: use orig-tags in search X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=63e903db6624a99827fe721809d6f07bfa8a63eb;p=notmuch-archives.git [PATCH v2 7/7] emacs: tree: use orig-tags in search --- diff --git a/c4/6523364adb5631df471779d11021210350f333 b/c4/6523364adb5631df471779d11021210350f333 new file mode 100644 index 000000000..3b9824151 --- /dev/null +++ b/c4/6523364adb5631df471779d11021210350f333 @@ -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 5C5A7429E30 + for ; Wed, 19 Feb 2014 12:21:01 -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 qROF5QFVxSyQ for ; + Wed, 19 Feb 2014 12:20:55 -0800 (PST) +Received: from mail-wg0-f54.google.com (mail-wg0-f54.google.com + [74.125.82.54]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client + certificate requested) by olra.theworths.org (Postfix) with ESMTPS id + 2E3E2431FC7 for ; Wed, 19 Feb 2014 12:20:44 -0800 + (PST) +Received: by mail-wg0-f54.google.com with SMTP id l18so770625wgh.9 + for ; Wed, 19 Feb 2014 12:20:43 -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=naTFot0UsjTkMuxbjZl/TA4gHFtCQLF3EyC0+KUYm1Y=; + b=oKo6ZW5sOHOA1WC2OHHlA08HzMJPslmmoDAdpCmBFbGuz9MHX4zyGAS0+x2kTA99rt + 8NzOlXxb+NLhgqVfaPMSFbxz/ec7AOCAVd4VQ842AC1OGdGAE1MGqI+bBHpJpGDMInBq + +52Kh2z9O8OFepy/FO+mzN9jnXPol8HefHs7/+72VrDdZC6mx22OEaZMDTbi+vn9132e + SD0hV6s7Zq8v4oqkA4mpXhIYM7XmnXLgwvMNChnHqApppNexXjNbWac22ISA9rfiXadu + slhgkfel4Dt5kXBCUCY7eWPYflZJ0YTbnFAZFxEdNg+2VZQNJy6DAHeOS6jS3pNN7A+g + Pn+A== +X-Received: by 10.180.73.173 with SMTP id m13mr3434758wiv.52.1392841243090; + Wed, 19 Feb 2014 12:20:43 -0800 (PST) +Received: from localhost (93-97-24-31.zone5.bethere.co.uk. [93.97.24.31]) + by mx.google.com with ESMTPSA id fm3sm54847340wib.8.2014.02.19.12.20.42 + for + (version=TLSv1.2 cipher=RC4-SHA bits=128/128); + Wed, 19 Feb 2014 12:20:42 -0800 (PST) +From: Mark Walters +To: notmuch@notmuchmail.org +Subject: [PATCH v2 7/7] emacs: tree: use orig-tags in search +Date: Wed, 19 Feb 2014 20:20:12 +0000 +Message-Id: <1392841212-8494-8-git-send-email-markwalters1009@gmail.com> +X-Mailer: git-send-email 1.7.9.1 +In-Reply-To: <1392841212-8494-1-git-send-email-markwalters1009@gmail.com> +References: <1392841212-8494-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: Wed, 19 Feb 2014 20:21:01 -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 7080e6f..4de69c8 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 +