[PATCH] emacs: notmuch-search: fix faces

Michal Nazarewicz mpn at google.com
Mon Aug 27 17:51:49 PDT 2012


> 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 <amdragon at MIT.EDU> 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
<https://github.com/mina86/dot-files/blob/master/dot-emacs>.

> 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.

-- 
Best regards,                                         _     _
.o. | Liege of Serenely Enlightened Majesty of      o' \,=./ `o
..o | Computer Science,  Michał “mina86” Nazarewicz    (o o)
ooo +----<email/xmpp: mpn at google.com>--------------ooO--(_)--Ooo--
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20120828/d8da664d/attachment.pgp>


More information about the notmuch mailing list