Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 075F1431FBF for ; Thu, 23 Aug 2012 05:59:33 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.8 X-Spam-Level: X-Spam-Status: No, score=-0.8 tagged_above=-999 required=5 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ue5EX36mbbRD for ; Thu, 23 Aug 2012 05:59:32 -0700 (PDT) Received: from mail-bk0-f53.google.com (mail-bk0-f53.google.com [209.85.214.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 212D9431FAE for ; Thu, 23 Aug 2012 05:59:31 -0700 (PDT) Received: by bkwj4 with SMTP id j4so295739bkw.26 for ; Thu, 23 Aug 2012 05:59:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:subject:date:message-id:x-mailer; bh=rdPODBsr+WMasicDr4zWZkarC04wPP7H9WSR9eT0tkg=; b=blrrFOU6QKEHfFCPzMV6+I7eRi92b8PCS6DoYoOod1JwjVV7qh+YbP+hHD7h78mTKn Dw+J6Oc1OMJvLeogGhlNq9wplwWzwUEaoN1U8aAE1DJlb4SR4CdjKt6w9/FUuOlCdswD +/0JHEWKMlurpbsdi2255Eg4vYTxNdKu/1VGFwO1sBinB9Y/5lf4OyYI0ah2j3sHBAVf 4N1L12XEgNfFdvCELgdxxdondsxiruRF0yRiN4jitvlIDKiB7lpaDZJVy4kwS0tGD8MO fJ72uU+DMXOYX0BQzOZ9IqP67FhV9CvDzXQrUcXe9UYIzgSTWHRgmgiSqSxBrkcQJALQ hn7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:subject:date:message-id:x-mailer:x-gm-message-state; bh=rdPODBsr+WMasicDr4zWZkarC04wPP7H9WSR9eT0tkg=; b=dUzYB9dFcEVSh58v0D0KbGF+yydnjI9993s/Iillbae1SCQ+P4ls4vsAjiOQZHAfRi 0ygXLKuc+ZZupAXWPqVG7tkivfP5159TI4OEET37irieFkuzg22ZVDK+CrUYnjvp7L0l PX5H67GGrmBzk0+RMNl51rsmbUMaVmaZvUWAGBjjgipkdYtAj9bSIzWL4xg9zx4NLEao rtUfVXNmO5TO4LSFazfIgCh0RUWB5z9XBtcysAG36e3FnYTjtGmYmwBP2N+sh5fH2mvD JN+39Ot34AHZ2v3/CqJmJpIRN/oXWbWdubQE09QbTN46h/aNJF2Gt1LJWBmvp+t7ruBB nF9g== Received: by 10.205.137.8 with SMTP id im8mr424918bkc.135.1345726770592; Thu, 23 Aug 2012 05:59:30 -0700 (PDT) Received: by 10.205.137.8 with SMTP id im8mr424902bkc.135.1345726770269; Thu, 23 Aug 2012 05:59:30 -0700 (PDT) Received: from mpn-glaptop.corp.google.com (dhcp-172-16-75-166.zrh.corp.google.com [172.16.75.166]) by mx.google.com with ESMTPS id 14sm4590735bkw.15.2012.08.23.05.59.28 (version=SSLv3 cipher=OTHER); Thu, 23 Aug 2012 05:59:29 -0700 (PDT) From: Michal Nazarewicz To: notmuch@notmuchmail.org Subject: [PATCH] emacs: notmuch-search: fix faces Date: Thu, 23 Aug 2012 14:59:21 +0200 Message-Id: <83882f4c8de5317e0184dc091a197b2341e5f015.1345725028.git.mina86@mina86.com> X-Mailer: git-send-email 1.7.7.3 X-Gm-Message-State: ALoCoQkDKhR1v4nMB3sCJujrsDe0vOmFr+SB0HlZd9lulPiIyfkXa1tKbTAyUruEHsgJNSx4obXEKlKehvVwiKRM2z+3IaXTauVNFdBNGcv++kO2tlnDe3/Co57qs2PcQHShaCBbRZiU2Cgr2KuOD66Iv8FIdARYr9dlPblLtsC7pZP9YbaCuOf3kZSZihERNJncWR2dqLaxSEnvCDrdMgZAYMqdkdCmxw== X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 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: Thu, 23 Aug 2012 12:59:33 -0000 From: Michal Nazarewicz For some reason the faces do not get applied when 'face property is used, but they work correctly with 'font-lock-face property. This commit changes notmuch-search to use the latter. --- emacs/notmuch.el | 23 +++++++++++++---------- 1 files changed, 13 insertions(+), 10 deletions(-) diff --git a/emacs/notmuch.el b/emacs/notmuch.el index 7b61e9b..44cbe28 100644 --- a/emacs/notmuch.el +++ b/emacs/notmuch.el @@ -692,10 +692,10 @@ propertize appropriately. If no boundary between authors and non-authors is found, assume that all of the authors match." (if (string-match "\\(.*\\)|\\(.*\\)" authors) (concat (propertize (concat (match-string 1 authors) ",") - 'face 'notmuch-search-matching-authors) + 'font-lock-face 'notmuch-search-matching-authors) (propertize (match-string 2 authors) - 'face 'notmuch-search-non-matching-authors)) - (propertize authors 'face 'notmuch-search-matching-authors))) + 'font-lock-face 'notmuch-search-non-matching-authors)) + (propertize authors 'font-lock-face 'notmuch-search-matching-authors))) (defun notmuch-search-insert-authors (format-string authors) ;; Save the match data to avoid interfering with @@ -741,11 +741,14 @@ non-authors is found, assume that all of the authors match." (setq visible-string (notmuch-search-author-propertize visible-string) ;; The invisible string must contain only non-matching ;; authors, as the visible-string contains both. - invisible-string (propertize invisible-string - 'face 'notmuch-search-non-matching-authors)) + invisible-string + (propertize invisible-string + 'font-lock-face + 'notmuch-search-non-matching-authors)) ;; The visible string contains only matching authors. (setq visible-string (propertize visible-string - 'face 'notmuch-search-matching-authors) + 'font-lock-face + 'notmuch-search-matching-authors) ;; The invisible string may contain both matching and ;; non-matching authors. invisible-string (notmuch-search-author-propertize invisible-string))) @@ -770,15 +773,15 @@ non-authors is found, assume that all of the authors match." (cond ((string-equal field "date") (insert (propertize (format format-string (plist-get result :date_relative)) - 'face 'notmuch-search-date))) + 'font-lock-face 'notmuch-search-date))) ((string-equal field "count") (insert (propertize (format format-string (format "[%s/%s]" (plist-get result :matched) (plist-get result :total))) - 'face 'notmuch-search-count))) + 'font-lock-face 'notmuch-search-count))) ((string-equal field "subject") (insert (propertize (format format-string (plist-get result :subject)) - 'face 'notmuch-search-subject))) + 'font-lock-face 'notmuch-search-subject))) ((string-equal field "authors") (notmuch-search-insert-authors format-string (plist-get result :authors))) @@ -786,7 +789,7 @@ non-authors is found, assume that all of the authors match." ((string-equal field "tags") (let ((tags-str (mapconcat 'identity (plist-get result :tags) " "))) (insert (propertize (format format-string tags-str) - 'face 'notmuch-tag-face)))))) + 'font-lock-face 'notmuch-tag-face)))))) (defun notmuch-search-show-result (result &optional pos) "Insert RESULT at POS or the end of the buffer if POS is null." -- 1.7.7.3