From 3dc1507d15328499ee4526b2ee4d6988844f5d14 Mon Sep 17 00:00:00 2001 From: Carl Worth Date: Tue, 3 Nov 2009 13:16:40 -0800 Subject: [PATCH] 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. --- notmuch.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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)) -- 2.43.0