summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Worth <cworth@cworth.org>2009-12-10 10:35:18 -0800
committerCarl Worth <cworth@cworth.org>2009-12-10 10:35:18 -0800
commit4aff2ca55bfe285ced36e9fe02c907d8b4120672 (patch)
treea7de9600345171d0b0db919da14147d280651903
parent0a53a1d1d7ca3732e9711a718dabca56425df2d4 (diff)
emacs: Fix '+' and '-' in case of thread no longer matching current search.
Similar to the way thread-viewing was broken after a thread was archived, (and recently fixed), tag manipulation has also been broken when the thread no longer matches the current search. This also means that the behavior of '+' and '-' are now different than that of '*'. The '+' and '-' bindings now return to the previous behavior old affecting all messages in the thread, (and not simply those matching the search). I actually prefer this behavior, since otherwise a '-' operation on a thread might not actually remove the tag from the thread, (since it could operate on a subset of the thread and not hit all messages with the given tag). So I'd now like to fix '*' to be consistent with '+' and '-', for which we add an item to TODO.
-rw-r--r--TODO6
-rw-r--r--notmuch.el4
2 files changed, 8 insertions, 2 deletions
diff --git a/TODO b/TODO
index d2a1aa4..4395669 100644
--- a/TODO
+++ b/TODO
@@ -8,6 +8,12 @@ Fix the things that are causing the most pain to new users
Emacs interface (notmuch.el)
----------------------------
+Enhance '+' and '-' in the search view to operate on an entire region
+if set.
+
+Fix '*' to work by simply calling '+' or '-' on a region consisting of
+the entire buffer.
+
Add a global keybinding table for notmuch, and then view-specific
tables that add to it.
diff --git a/notmuch.el b/notmuch.el
index fa83d40..fb112f9 100644
--- a/notmuch.el
+++ b/notmuch.el
@@ -1184,7 +1184,7 @@ The tag is added to messages in the currently selected thread
which match the current search terms."
(interactive
(list (notmuch-select-tag-with-completion "Tag to add: ")))
- (notmuch-call-notmuch-process "tag" (concat "+" tag) (notmuch-search-find-thread-id) " and " notmuch-search-query-string)
+ (notmuch-call-notmuch-process "tag" (concat "+" tag) (notmuch-search-find-thread-id))
(notmuch-search-set-tags (delete-dups (sort (cons tag (notmuch-search-get-tags)) 'string<))))
(defun notmuch-search-remove-tag (tag)
@@ -1194,7 +1194,7 @@ The tag is removed from messages in the currently selected thread
which match the current search terms."
(interactive
(list (notmuch-select-tag-with-completion "Tag to remove: " (notmuch-search-find-thread-id))))
- (notmuch-call-notmuch-process "tag" (concat "-" tag) (notmuch-search-find-thread-id) " and " notmuch-search-query-string)
+ (notmuch-call-notmuch-process "tag" (concat "-" tag) (notmuch-search-find-thread-id))
(notmuch-search-set-tags (delete tag (notmuch-search-get-tags))))
(defun notmuch-search-archive-thread ()