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: Mon, 12 Nov 2007 09:53:43 -0500 Message-ID: <473868F7.3040109@gmail.com> References: <473736A8.90903@gmail.com> <87fxzc11fv.fsf@bzg.ath.cx> 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 1Irafh-0004iL-Os for emacs-orgmode@gnu.org; Mon, 12 Nov 2007 09:53:53 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Irafg-0004fu-P2 for emacs-orgmode@gnu.org; Mon, 12 Nov 2007 09:53:53 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Irafg-0004fd-K8 for emacs-orgmode@gnu.org; Mon, 12 Nov 2007 09:53:52 -0500 Received: from nz-out-0506.google.com ([64.233.162.225]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Irafg-0006OF-G9 for emacs-orgmode@gnu.org; Mon, 12 Nov 2007 09:53:52 -0500 Received: by nz-out-0506.google.com with SMTP id f1so886108nzc for ; Mon, 12 Nov 2007 06:53:51 -0800 (PST) In-Reply-To: <87fxzc11fv.fsf@bzg.ath.cx> 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 Thanks for the trace suggestion. Here it is: ----------------------- Debugger entered--Lisp error: (error "Invalid face") internal-get-lisp-face-attribute(nil :foreground nil) face-attribute(nil :foreground nil t) face-foreground(nil nil t) funcall(face-foreground nil nil t) (setq color (funcall function face nil t)) (if (>= emacs-major-version 22) (setq color (funcall function face nil t)) (setq color (funcall function face)) (when (and ... ... ... ...) (setq color ...))) (let* ((function ...) color) (if (>= emacs-major-version 22) (setq color ...) (setq color ...) (when ... ...)) (when (and ... ...) (setq color ...)) (when (or ... ... ...) (setq color nil)) (when (and ... ...) (setq color ...)) color) htmlize-face-color-internal(nil t) (cond (htmlize-running-xemacs (and ... ...)) (t (htmlize-face-color-internal face t))) htmlize-face-foreground(nil) (htmlize-color-to-rgb (htmlize-face-foreground face)) (make-htmlize-fstruct :foreground (htmlize-color-to-rgb (htmlize-face-foreground face)) :background (htmlize-color-to-rgb (htmlize-face-background face))) (let ((fstruct ...)) (cond (htmlize-running-xemacs ...) (... ... ...) (t ... ... ...)) (setf (htmlize-fstruct-css-name fstruct) (let ... ... ... ... ... ... ... name)) fstruct) htmlize-face-to-fstruct(nil) (if (symbolp face) (htmlize-face-to-fstruct face) (htmlize-attrlist-to-fstruct face)) (let ((fstruct ...)) (setf (gethash face face-map) fstruct) (let* (... ... ...) (while ... ...) (unless ... ...) (push new-name css-names))) (if (gethash face face-map) nil (let (...) (setf ... fstruct) (let* ... ... ... ...))) (unless (gethash face face-map) (let (...) (setf ... fstruct) (let* ... ... ... ...))) (while --cl-dolist-temp-- (setq face (car --cl-dolist-temp--)) (unless (gethash face face-map) (let ... ... ...)) (setq --cl-dolist-temp-- (cdr --cl-dolist-temp--))) (let ((--cl-dolist-temp-- faces) face) (while --cl-dolist-temp-- (setq face ...) (unless ... ...) (setq --cl-dolist-temp-- ...)) nil) (catch (quote --cl-block-nil--) (let (... face) (while --cl-dolist-temp-- ... ... ...) nil)) (cl-block-wrapper (catch (quote --cl-block-nil--) (let ... ... nil))) (block nil (let (... face) (while --cl-dolist-temp-- ... ... ...) nil)) (dolist (face faces) (unless (gethash face face-map) (let ... ... ...))) (let ((face-map ...) css-names) (dolist (face faces) (unless ... ...)) face-map) htmlize-make-face-map((default highlight nil org-tag org-todo org-warning org-agenda-structure)) (let* ((buffer-faces ...) (face-map ...) (htmlbuf ...) (places ...) (title ...)) (with-current-buffer htmlbuf (buffer-disable-undo) (insert ... 10 ... "\n ") (plist-put places ... ...) (insert "\n" " " ... "\n" ... htmlize-head-tags) (htmlize-method insert-head buffer-faces face-map) (insert " ") (plist-put places ... ...) (insert "\n ") (plist-put places ... ...) (insert ... "\n ") (plist-put places ... ...) (insert "
\n")) (let (... 
next-change text face-list fstruct-list trailing-ellipsis) (goto-char 
...) (while ... ... ... ... ... ... ... ... ... ...)) 
(with-current-buffer htmlbuf (insert "
") (plist-put places ... ...) (insert "\n ") (plist-put places ... ...) (insert "\n\n") (when htmlize-generate-hyperlinks ...) (htmlize-defang-local-variables) (when htmlize-replace-form-feeds ... ...) (goto-char ...) (when htmlize-html-major-mode ...) (set ... places) (run-hooks ...) (buffer-enable-undo)) htmlbuf) (save-excursion (save-excursion (run-hooks ...)) (htmlize-ensure-fontified) (clrhash htmlize-extended-character-cache) (clrhash htmlize-memoization-table) (let* (... ... ... ... ...) (with-current-buffer htmlbuf ... ... ... ... ... ... ... ... ... ... ... ...) (let ... ... ...) (with-current-buffer htmlbuf ... ... ... ... ... ... ... ... ... ... ... ... ...) htmlbuf)) htmlize-buffer-1() (save-current-buffer (set-buffer (or buffer ...)) (htmlize-buffer-1)) (with-current-buffer (or buffer (current-buffer)) (htmlize-buffer-1)) (let ((htmlbuf ...)) (when (interactive-p) (switch-to-buffer htmlbuf)) htmlbuf) htmlize-buffer() call-interactively(htmlize-buffer) execute-extended-command(nil) call-interactively(execute-extended-command) Bastien wrote: > Wanrong Lin writes: > > >> 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. >> > > Can you send a backtrace? > > (setq debug-on-error t) > >