From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wanrong Lin Subject: Re: Tag search and "invalid face" error from htmlize-buffer Date: Tue, 13 Nov 2007 10:24:57 -0500 Message-ID: <4739C1C9.806@gmail.com> References: <473736A8.90903@gmail.com> <2ECA6DA3-B719-4A8F-9604-7EC9CEBDCA02@science.uva.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Irxdc-0004VD-8Y for emacs-orgmode@gnu.org; Tue, 13 Nov 2007 10:25:16 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Irxda-0004Ux-6o for emacs-orgmode@gnu.org; Tue, 13 Nov 2007 10:25:15 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Irxda-0004Uu-14 for emacs-orgmode@gnu.org; Tue, 13 Nov 2007 10:25:14 -0500 Received: from py-out-1112.google.com ([64.233.166.183]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IrxdZ-0005lg-QG for emacs-orgmode@gnu.org; Tue, 13 Nov 2007 10:25:13 -0500 Received: by py-out-1112.google.com with SMTP id a73so2252869pye for ; Tue, 13 Nov 2007 07:25:11 -0800 (PST) In-Reply-To: <2ECA6DA3-B719-4A8F-9604-7EC9CEBDCA02@science.uva.nl> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Carsten Dominik wrote: > > On 11Nov2007, at 6:06 PM, Wanrong Lin wrote: > >> Hi, >> >> I wonder anyone has seen this: >> >> After I do a tag search (for TODO items), if I do "htmlize-buffer" on >> the search result, I will get an "invalid face" error. Since I have >> quite some customization on my org-mode, I am not quite sure whether >> this is my problem, or org-mode, or htmlize-buffer's problem. >> >> Thank you. > > Does this in .emacs fix the problem? > > > (eval-after-load "htmlize" > '(progn > (defadvice htmlize-faces-in-buffer (after org-no-nil-faces activate) > "Make sure there are no nil faces" > (setq ad-return-value (delq nil ad-return-value))))) > This does help! Thank you guys very much. I need this badly because most of time I run emacs on Windows and my emacs use htmlize-buffer to do printing. Logically, the problem probably should be solved in htmlize-buffer. After all, if a buffer can be displayed, it should be able to be htmlized. But I am happy with the workaround. :-) Wanrong