From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id 718696DE0BBC for ; Sun, 18 Sep 2016 04:20:33 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: 0.55 X-Spam-Level: X-Spam-Status: No, score=0.55 tagged_above=-999 required=5 tests=[AWL=-0.102, SPF_NEUTRAL=0.652] autolearn=disabled Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id MwlpUlp1dcdU for ; Sun, 18 Sep 2016 04:20:32 -0700 (PDT) Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34]) by arlo.cworth.org (Postfix) with ESMTP id 298D56DE0BBB for ; Sun, 18 Sep 2016 04:20:31 -0700 (PDT) Received: from guru.guru-group.fi (localhost [IPv6:::1]) by guru.guru-group.fi (Postfix) with ESMTP id C2AAF10007F; Sun, 18 Sep 2016 14:20:46 +0300 (EEST) From: Tomi Ollila To: Mark Walters , notmuch@notmuchmail.org, marmstrong@google.com Subject: Re: [PATCH] emacs: tag deleted face bugfix In-Reply-To: <1474196252-31700-1-git-send-email-markwalters1009@gmail.com> References: <1471213062-13610-1-git-send-email-marmstrong@google.com> <1474196252-31700-1-git-send-email-markwalters1009@gmail.com> X-Face: HhBM'cA~ MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Sep 2016 11:20:33 -0000 On Sun, Sep 18 2016, Mark Walters wrote: > Commit d25d33ff cleaned up some of the tag face code. However, for the > face notmuch-tag-deleted it used the test > > ((class color) (supports :strike-through)) > > to decide whether to use red strikethrough or inverse-video (emacs in > a terminal typically doesn't support red strikethrough, but in X it does). > > However, it seems that test often returns true even though red > strikethrough is not supported. This breaks the tag update code -- the > wrong thing is displayed to the user. > > Thus we make the test explicitly more specific, changing the test to > > ((class color) (supports :strike-through "red")) > --- > > Tomi found this bug today, and narrowed it down to a recent notmuch > change. This seems to fix it, and the code now seems to work as > expected in terminals and in X. However I am not an expert on emacs > faces so there may be a better way. The change works for me and IMO it looks sensible >- '((((class color) (supports :strike-through)) :strike-through "red") >+ '((((class color) (supports :strike-through "red")) :strike-through "red") I tried to look documentation and grepped some emacs (lisp!) source to verify that this fix is exactly as it should be, but could not find any. Well, at least it looks better than what it used to be... +1 Tomi > > Best wishes > > Mark > > > > emacs/notmuch-tag.el | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/emacs/notmuch-tag.el b/emacs/notmuch-tag.el > index 644ce40..e59f148 100644 > --- a/emacs/notmuch-tag.el > +++ b/emacs/notmuch-tag.el > @@ -137,7 +137,7 @@ with images." > :type 'notmuch-tag-format-type) > > (defface notmuch-tag-deleted > - '((((class color) (supports :strike-through)) :strike-through "red") > + '((((class color) (supports :strike-through "red")) :strike-through "red") > (t :inverse-video t)) > "Face used to display deleted tags. > > -- > 2.1.4 > > _______________________________________________ > notmuch mailing list > notmuch@notmuchmail.org > https://notmuchmail.org/mailman/listinfo/notmuch