unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Mark Walters <markwalters1009@gmail.com>
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	[thread overview]
Message-ID: <1392841212-8494-8-git-send-email-markwalters1009@gmail.com> (raw)
In-Reply-To: <1392841212-8494-1-git-send-email-markwalters1009@gmail.com>

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

  parent reply	other threads:[~2014-02-19 20:21 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-19 20:20 [PATCH v2 0/7] emacs: show tag changes in buffer Mark Walters
2014-02-19 20:20 ` [PATCH v2 1/7] Make keys of notmuch-tag-formats regexps and use caching Mark Walters
2014-03-11  2:06   ` Austin Clements
2014-02-19 20:20 ` [PATCH v2 2/7] emacs: tag split customise option for format-tags into a widget Mark Walters
2014-02-19 20:20 ` [PATCH v2 3/7] emacs: tag: add customize for deleted/added tag formats Mark Walters
2014-03-11  2:09   ` Austin Clements
2014-03-11  2:37   ` Austin Clements
2014-03-11 14:46     ` [PATCH] emacs: Combine notmuch-combine-face-text-property{,-string} Austin Clements
2014-02-19 20:20 ` [PATCH v2 4/7] emacs: show: mark tags changed since buffer loaded Mark Walters
2014-03-11  2:29   ` Austin Clements
2014-02-19 20:20 ` [PATCH v2 5/7] emacs: show: use orig-tags for tag display Mark Walters
2014-02-19 20:20 ` [PATCH v2 6/7] emacs: search: use orig-tags in search Mark Walters
2014-02-22 11:25   ` [PATCH v2.1 " Mark Walters
2014-03-11  2:41     ` Austin Clements
2014-02-19 20:20 ` Mark Walters [this message]
2014-03-06  6:37 ` [PATCH v2 0/7] emacs: show tag changes in buffer Jani Nikula

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1392841212-8494-8-git-send-email-markwalters1009@gmail.com \
    --to=markwalters1009@gmail.com \
    --cc=notmuch@notmuchmail.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).