emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Wanrong Lin <wrglin@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: Tag search and "invalid face" error from htmlize-buffer
Date: Mon, 12 Nov 2007 09:53:43 -0500	[thread overview]
Message-ID: <473868F7.3040109@gmail.com> (raw)
In-Reply-To: <87fxzc11fv.fsf@bzg.ath.cx>


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 ... "<html>\n  ") (plist-put places ... ...) (insert "<head>\n" 
"    <title>" ... "</title>\n" ... htmlize-head-tags) (htmlize-method 
insert-head buffer-faces face-map) (insert "  </head>") (plist-put 
places ... ...) (insert "\n  ") (plist-put places ... ...) (insert ... 
"\n    ") (plist-put places ... ...) (insert "<pre>\n")) (let (... 
next-change text face-list fstruct-list trailing-ellipsis) (goto-char 
...) (while ... ... ... ... ... ... ... ... ... ...)) 
(with-current-buffer htmlbuf (insert "</pre>") (plist-put places ... 
...) (insert "\n  </body>") (plist-put places ... ...) (insert 
"\n</html>\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 <wanrong.lin@gmail.com> 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)
>
>   

  reply	other threads:[~2007-11-12 14:53 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-11 17:06 Tag search and "invalid face" error from htmlize-buffer Wanrong Lin
2007-11-12  5:24 ` Bastien
2007-11-12 14:53   ` Wanrong Lin [this message]
2007-11-12 19:54   ` Wanrong Lin
2007-11-13 11:01     ` Bastien
2007-11-13 11:01 ` Carsten Dominik
2007-11-13 15:24   ` Wanrong Lin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=473868F7.3040109@gmail.com \
    --to=wrglin@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).