[WIP Patch 7/7] emacs: tree: use orig-tags in search
authorMark Walters <markwalters1009@gmail.com>
Fri, 14 Feb 2014 09:15:19 +0000 (09:15 +0000)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 18:00:01 +0000 (10:00 -0800)
42/09e7adbeb5db4d9079a9288e6666ece1d3d562 [new file with mode: 0644]

diff --git a/42/09e7adbeb5db4d9079a9288e6666ece1d3d562 b/42/09e7adbeb5db4d9079a9288e6666ece1d3d562
new file mode 100644 (file)
index 0000000..11779f2
--- /dev/null
@@ -0,0 +1,109 @@
+Return-Path: <markwalters1009@gmail.com>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id 5A909431FC0\r
+       for <notmuch@notmuchmail.org>; Fri, 14 Feb 2014 01:16:10 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0.201\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0.201 tagged_above=-999 required=5\r
+       tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
+       FREEMAIL_ENVFROM_END_DIGIT=1, FREEMAIL_FROM=0.001,\r
+       RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id DzwkZrnkM5mE for <notmuch@notmuchmail.org>;\r
+       Fri, 14 Feb 2014 01:16:06 -0800 (PST)\r
+Received: from mail-wg0-f54.google.com (mail-wg0-f54.google.com\r
+ [74.125.82.54])       (using TLSv1 with cipher RC4-SHA (128/128 bits))        (No client\r
+ certificate requested)        by olra.theworths.org (Postfix) with ESMTPS id\r
+ EB91D431FBD   for <notmuch@notmuchmail.org>; Fri, 14 Feb 2014 01:15:39 -0800\r
+ (PST)\r
+Received: by mail-wg0-f54.google.com with SMTP id l18so186064wgh.21\r
+       for <notmuch@notmuchmail.org>; Fri, 14 Feb 2014 01:15:37 -0800 (PST)\r
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;\r
+       h=from:to:cc:subject:date:message-id:in-reply-to:references\r
+       :mime-version:content-type:content-transfer-encoding;\r
+       bh=fiqfOMYGawyOflOdOHDxirA+gtU+CjbHtynsr56gwMc=;\r
+       b=hh/Z1+Jkn823xxRarZu+htClbp8fOJRa4Z5v2j5fRkcqWWDDaJAk+W6MmvPMC+llT3\r
+       BBag4elnBsHToBNrCZ83Kag5RDyRNQ2ZW7OR0lNLmuJnOZtTkeJ3dHLQN3J7xk0ohQWQ\r
+       Vbrfu4bI1eeeZtd39vKp6Mg345oHhTSmNktAk8w5qJ8vedUI6OOd9hIGuF+r8o07PbYI\r
+       dngXmyKd/ETBxmD3+3k6OHeHSjUqJZo7Ob41xOz00YYhAtwOKq9JBl66UH+tsngU9Dss\r
+       2lCybVHY/wgcdi4F70ODNsy9a7ct2rEhLAWbGVIQBzBeIH+O5KhZaXDFK82HVNGQou0v\r
+       D+9w==\r
+X-Received: by 10.180.12.233 with SMTP id b9mr1287222wic.8.1392369337217;\r
+       Fri, 14 Feb 2014 01:15:37 -0800 (PST)\r
+Received: from localhost (93-97-24-31.zone5.bethere.co.uk. [93.97.24.31])\r
+       by mx.google.com with ESMTPSA id\r
+       br10sm11145696wjb.3.2014.02.14.01.15.36 for <multiple recipients>\r
+       (version=TLSv1.2 cipher=RC4-SHA bits=128/128);\r
+       Fri, 14 Feb 2014 01:15:36 -0800 (PST)\r
+From: Mark Walters <markwalters1009@gmail.com>\r
+To: notmuch@notmuchmail.org,\r
+       Austin Clements <amdragon@MIT.EDU>\r
+Subject: [WIP Patch 7/7] emacs: tree: use orig-tags in search\r
+Date: Fri, 14 Feb 2014 09:15:19 +0000\r
+Message-Id: <1392369319-24508-8-git-send-email-markwalters1009@gmail.com>\r
+X-Mailer: git-send-email 1.7.9.1\r
+In-Reply-To: <1392369319-24508-1-git-send-email-markwalters1009@gmail.com>\r
+References: <1392369319-24508-1-git-send-email-markwalters1009@gmail.com>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=UTF-8\r
+Content-Transfer-Encoding: 8bit\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Fri, 14 Feb 2014 09:16:10 -0000\r
+\r
+This uses the recent functionality to show the tag changes in the tree\r
+buffer. Currently this is only used to show changes the tree buffer\r
+makes itself: i.e., it does not make display any changes reflecting\r
+tagging done by other notmuch-buffers.\r
+---\r
+ emacs/notmuch-tree.el |    9 ++++++---\r
+ 1 files changed, 6 insertions(+), 3 deletions(-)\r
+\r
+diff --git a/emacs/notmuch-tree.el b/emacs/notmuch-tree.el\r
+index b37e2cd..0f4cd47 100644\r
+--- a/emacs/notmuch-tree.el\r
++++ b/emacs/notmuch-tree.el\r
+@@ -701,10 +701,11 @@ unchanged ADDRESS if parsing fails."\r
\r
+      ((string-equal field "tags")\r
+       (let ((tags (plist-get msg :tags))\r
++          (orig-tags (plist-get msg :orig-tags))\r
+           (face (if match\r
+                     'notmuch-tree-match-tag-face\r
+                   'notmuch-tree-no-match-tag-face)))\r
+-      (format format-string (notmuch-tag-format-tags tags tags face)))))))\r
++      (format format-string (notmuch-tag-format-tags tags orig-tags face)))))))\r
\r
+ (defun notmuch-tree-format-field-list (field-list msg)\r
+   "Format fields of MSG according to FIELD-LIST and return string"\r
+@@ -766,8 +767,10 @@ message together with all its descendents."\r
+       (push "├" tree-status)))\r
\r
+       (push (concat (if replies "┬" "─") "►") tree-status)\r
+-      (plist-put msg :first (and first (eq 0 depth)))\r
+-      (notmuch-tree-goto-and-insert-msg (plist-put msg :tree-status tree-status))\r
++      (setq msg (plist-put msg :first (and first (eq 0 depth))))\r
++      (setq msg (plist-put msg :tree-status tree-status))\r
++      (setq msg (plist-put msg :orig-tags (plist-get msg :tags)))\r
++      (notmuch-tree-goto-and-insert-msg msg)\r
+       (pop tree-status)\r
+       (pop tree-status)\r
\r
+-- \r
+1.7.9.1\r
+\r