From: Austin Clements Date: Tue, 28 Aug 2012 02:19:17 +0000 (+2000) Subject: Re: [PATCH] emacs: notmuch-search: fix faces X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=947a7f728e8318ba1410640a24c991d0c24c3250;p=notmuch-archives.git Re: [PATCH] emacs: notmuch-search: fix faces --- diff --git a/b2/510800747f54e9135cb0194bfc5b3bf3a92c88 b/b2/510800747f54e9135cb0194bfc5b3bf3a92c88 new file mode 100644 index 000000000..344a631b6 --- /dev/null +++ b/b2/510800747f54e9135cb0194bfc5b3bf3a92c88 @@ -0,0 +1,128 @@ +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 480D4431FBC + for ; Mon, 27 Aug 2012 19:19:22 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: -0.7 +X-Spam-Level: +X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5 + tests=[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 fF72-gr0aVq7 for ; + Mon, 27 Aug 2012 19:19:21 -0700 (PDT) +Received: from dmz-mailsec-scanner-3.mit.edu (DMZ-MAILSEC-SCANNER-3.MIT.EDU + [18.9.25.14]) + by olra.theworths.org (Postfix) with ESMTP id 9AD5D431FAE + for ; Mon, 27 Aug 2012 19:19:21 -0700 (PDT) +X-AuditID: 1209190e-b7fc36d00000399b-ca-503c2aa8f34d +Received: from mailhub-auth-1.mit.edu ( [18.9.21.35]) + by dmz-mailsec-scanner-3.mit.edu (Symantec Messaging Gateway) with SMTP + id DD.2F.14747.8AA2C305; Mon, 27 Aug 2012 22:19:20 -0400 (EDT) +Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103]) + by mailhub-auth-1.mit.edu (8.13.8/8.9.2) with ESMTP id q7S2JJFn028900; + Mon, 27 Aug 2012 22:19:20 -0400 +Received: from awakening.csail.mit.edu (awakening.csail.mit.edu [18.26.4.91]) + (authenticated bits=0) + (User authenticated as amdragon@ATHENA.MIT.EDU) + by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id q7S2JHPt019763 + (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT); + Mon, 27 Aug 2012 22:19:18 -0400 (EDT) +Received: from amthrax by awakening.csail.mit.edu with local (Exim 4.77) + (envelope-from ) + id 1T6BOf-0001ha-MC; Mon, 27 Aug 2012 22:19:17 -0400 +Date: Mon, 27 Aug 2012 22:19:17 -0400 +From: Austin Clements +To: Michal Nazarewicz +Subject: Re: [PATCH] emacs: notmuch-search: fix faces +Message-ID: <20120828021917.GC11179@mit.edu> +References: + <83882f4c8de5317e0184dc091a197b2341e5f015.1345725028.git.mina86@mina86.com> + <87ipc4jcfv.fsf@servo.finestructure.net> + <20120828002215.GB11179@mit.edu> +MIME-Version: 1.0 +Content-Type: text/plain; charset=utf-8 +Content-Disposition: inline +Content-Transfer-Encoding: 8bit +In-Reply-To: +User-Agent: Mutt/1.5.21 (2010-09-15) +X-Brightmail-Tracker: + H4sIAAAAAAAAA+NgFprDKsWRmVeSWpSXmKPExsUixCmqrLtCyybA4PBWEYtX3/vYLa7fnMns + wOSxYFOpx7NVt5gDmKK4bFJSczLLUov07RK4Mg48uMtScF+44unuacwNjO/4uxg5OSQETCT+ + X+pihrDFJC7cW8/WxcjFISSwj1Hixpm1LBDOBkaJ6bfOMEE4J5kkmq4cgsosYZSYOWkZO0g/ + i4CqxLKvj1lBbDYBDYlt+5czgtgiAmoSF/88ZgKxmQWkJb79bgazhQVMJebNXM0CYvMK6Ehc + vLgXasNTRonNs74xQiQEJU7OfMIC0awu8WfeJaBjOcAGLf/HARGWl2jeOhvsB04BLYlDT5eA + 3SAqoCIx5eQ2tgmMwrOQTJqFZNIshEmzkExawMiyilE2JbdKNzcxM6c4NVm3ODkxLy+1SNdY + LzezRC81pXQTIzgSJPl2MH49qHSIUYCDUYmH98VK6wAh1sSy4srcQ4ySHExKoryT1WwChPiS + 8lMqMxKLM+KLSnNSiw8xSnAwK4nwsggC5XhTEiurUovyYVLSHCxK4rxXUm76CwmkJ5akZqem + FqQWwWRlODiUJHgVgREvJFiUmp5akZaZU4KQZuLgBBnOAzT8gybI8OKCxNzizHSI/ClGRSlx + 3j8gCQGQREZpHlwvLFG9YhQHekWYlx1kBQ8wycF1vwIazAQ0eL+iNcjgkkSElFQD43zDyqDG + 3fEWOoWMTst/Vn6tOGwap6m2ynzHsnWLZ74uucKRYDhL5s88x0PfphV8n/EgJ7R/TSHbLyF+ + gSct0dqPPnT8/LqtpNru44Xcg9qLQ+QYPyw7UbL/d0jpo4sxKfFNi9eEWllKVWm8emyYf6dv + pebXLzYf3s98yGOmv9//4CIp5pXH7imxFGckGmoxFxUnAgCFc9zQLwMAAA== +Cc: notmuch@notmuchmail.org +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: Tue, 28 Aug 2012 02:19:22 -0000 + +Quoth Michal Nazarewicz on Aug 28 at 2:51 am: +> > Quoth Michal Nazarewicz on Aug 28 at 1:11 am: +> >> I'm not an expert either, but with this patch applied I see colours, +> >> without this patch, I don't see colours, ie. everything is rendered +> >> using the default face. +> >> +> >> I'm also not entirely sure if that's the correct way of doing things +> >> since 'face seems to be working in other modes (most notably +> >> notmuch-show). By posting, I'm also hoping that someone more +> >> experienced will maybe take a look to see what's going on here... ;) +> >> +> >> For some more info, in notmuch-show mode, I get-text-property of nil for +> >> both 'face and 'font-lock-face, but in message-mode or in *scratch* +> >> buffer I'm getting nil for 'font-lock-face but non-nil for 'face. With +> >> the patch, I'm getting the same non-nil for both 'face and +> >> 'font-lock-face; without the patch, I'm getting nil for both. +> +> Austin Clements writes: +> > This is odd. Could you give more details about your environment? In +> > particular, what Emacs version are you running and might you have any +> > unusual Emacs packages installed or customizations set? +> +> I'm running Emacs compiled from a week old bzr head, emacs-version +> reports: “GNU Emacs 24.2.50.1 (x86_64-unknown-linux-gnu) of 2012-08-21 +> on mpn-glaptop”. +> +> I don't think I have any “unusual” packages, but I do have quite a bit +> of customization, which you might find at +> . + +I think the culprit is your "Show blanks and FIXME" +font-lock-mode-hook. + +> > The unusual thing about font-lock-face is that it only gets applied if +> > font-lock is enabled; otherwise it's ignored. One theory is that the +> > nil font-lock-face (without your patch) is causing font-lock to +> > *override* the face property that we set. I don't think font-lock +> > usually does that, but perhaps in some situations, it will? +> +> Ha! That could be the cause. I've disabled global-font-lock-mode, and +> the colours appeared. Getting property returns non-nil for 'face and +> nil for 'font-lock-face. When I enable font-lock-mode the property seem +> to disappear and disabling font-lock-mode again does not help. + +It's possible we should use font-lock-face. I'm not sure. Poking +around the standard elisp, it looks like some things use 'face and +some things use 'font-lock-face. I think 'face is more common, but +it's hard to grep for.