From 87699e11218343104c3126918017b95f0b00b1d0 Mon Sep 17 00:00:00 2001 From: Mark Walters Date: Fri, 14 Feb 2014 09:15:19 +0000 Subject: [PATCH] [WIP Patch 7/7] emacs: tree: use orig-tags in search --- 42/09e7adbeb5db4d9079a9288e6666ece1d3d562 | 109 ++++++++++++++++++++++ 1 file changed, 109 insertions(+) create mode 100644 42/09e7adbeb5db4d9079a9288e6666ece1d3d562 diff --git a/42/09e7adbeb5db4d9079a9288e6666ece1d3d562 b/42/09e7adbeb5db4d9079a9288e6666ece1d3d562 new file mode 100644 index 000000000..11779f261 --- /dev/null +++ b/42/09e7adbeb5db4d9079a9288e6666ece1d3d562 @@ -0,0 +1,109 @@ +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 5A909431FC0 + for ; Fri, 14 Feb 2014 01:16:10 -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 DzwkZrnkM5mE for ; + Fri, 14 Feb 2014 01:16:06 -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 + EB91D431FBD for ; Fri, 14 Feb 2014 01:15:39 -0800 + (PST) +Received: by mail-wg0-f54.google.com with SMTP id l18so186064wgh.21 + for ; Fri, 14 Feb 2014 01:15:37 -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=hh/Z1+Jkn823xxRarZu+htClbp8fOJRa4Z5v2j5fRkcqWWDDaJAk+W6MmvPMC+llT3 + BBag4elnBsHToBNrCZ83Kag5RDyRNQ2ZW7OR0lNLmuJnOZtTkeJ3dHLQN3J7xk0ohQWQ + Vbrfu4bI1eeeZtd39vKp6Mg345oHhTSmNktAk8w5qJ8vedUI6OOd9hIGuF+r8o07PbYI + dngXmyKd/ETBxmD3+3k6OHeHSjUqJZo7Ob41xOz00YYhAtwOKq9JBl66UH+tsngU9Dss + 2lCybVHY/wgcdi4F70ODNsy9a7ct2rEhLAWbGVIQBzBeIH+O5KhZaXDFK82HVNGQou0v + D+9w== +X-Received: by 10.180.12.233 with SMTP id b9mr1287222wic.8.1392369337217; + Fri, 14 Feb 2014 01:15:37 -0800 (PST) +Received: from localhost (93-97-24-31.zone5.bethere.co.uk. [93.97.24.31]) + by mx.google.com with ESMTPSA id + br10sm11145696wjb.3.2014.02.14.01.15.36 for + (version=TLSv1.2 cipher=RC4-SHA bits=128/128); + Fri, 14 Feb 2014 01:15:36 -0800 (PST) +From: Mark Walters +To: notmuch@notmuchmail.org, + Austin Clements +Subject: [WIP Patch 7/7] emacs: tree: use orig-tags in search +Date: Fri, 14 Feb 2014 09:15:19 +0000 +Message-Id: <1392369319-24508-8-git-send-email-markwalters1009@gmail.com> +X-Mailer: git-send-email 1.7.9.1 +In-Reply-To: <1392369319-24508-1-git-send-email-markwalters1009@gmail.com> +References: <1392369319-24508-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: Fri, 14 Feb 2014 09:16:10 -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