From: Carl Worth Date: Tue, 3 Nov 2009 21:16:40 +0000 (-0800) Subject: notmuch.el: Don't try to remove an "unread" tag that's not there. X-Git-Tag: 0.1~605 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=3dc1507d15328499ee4526b2ee4d6988844f5d14;p=notmuch.git 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. --- 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))