aboutsummaryrefslogtreecommitdiffhomepage
path: root/notmuch.el
diff options
context:
space:
mode:
authorGravatar Carl Worth <cworth@cworth.org>2009-11-03 13:16:40 -0800
committerGravatar Carl Worth <cworth@cworth.org>2009-11-03 13:38:05 -0800
commit3dc1507d15328499ee4526b2ee4d6988844f5d14 (patch)
tree52ff699ce3af6ea4f09a456aab682641388029eb /notmuch.el
parentaa34eb2a3761c770b485486d0f94564f5e925128 (diff)
notmuch.el: Don't try to remove an "unread" tag that's not there.
This optimization wouldn't be necessary if we had a nice fast "notmuch tag" command. But since it's currently fairly slow, (see Xapian defect 250: http://trac.xapian.org/ticket/250), we're willing to take some extra care to avoid calling "notmuch tag" unnecessarily.
Diffstat (limited to 'notmuch.el')
-rw-r--r--notmuch.el3
1 files changed, 2 insertions, 1 deletions
diff --git a/notmuch.el b/notmuch.el
index 89089c53..513b7d91 100644
--- a/notmuch.el
+++ b/notmuch.el
@@ -113,7 +113,8 @@
Before moving, also remove the \"unread\" tag from the current message."
(interactive)
- (notmuch-show-remove-tag "unread")
+ (if (member "unread" (notmuch-show-get-tags))
+ (notmuch-show-remove-tag "unread"))
; First, ensure we get off the current message marker
(if (not (eobp))
(forward-char))