emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] [bug] "Invalid face" when exporting code block to HTML


From: Sebastien Vauban
Subject: Re: [O] [bug] "Invalid face" when exporting code block to HTML
Date: Fri, 06 Jan 2012 14:28:47 +0100
User-agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.92 (windows-nt)

Hi Nick,

Nick Dokos wrote:
> Sebastien Vauban <address@hidden> wrote:
>> Quite "simple": the following block generates an "Invalid face" error when
>> exported to HTML.
>>
>> #+begin_src sh
>> svn checkout http://svn/trunk/dev/ mydev
>> #+end_src
>>
>> This worked yesterday. Does it ring a bell to someone? Could some recent
>> commit be responsible of this?
>
> Can't reproduce it either with a slightly earlier version of org (.19)
> or latest (.44 - note that I'm ahead of origin/master by 3 commits).
>
> Try evaluating this expression which is the one that gave you the error:
>
> (htmlize-face-size 'default)
>
> I get 113 in my setup, so this looks like an htmlize error.

Indeed:

#+begin_src emacs-lisp
Debugger entered--Lisp error: (void-function htmlize-face-size)
  (htmlize-face-size (quote default))
  eval((htmlize-face-size (quote default)) nil)
  eval-last-sexp-1(nil)
  eval-last-sexp(nil)
  call-interactively(eval-last-sexp nil nil)
#+end_src

> I don't understand where the nil face (which is indeed invalid) comes from.
>
> Also htmlize-face-size wraps the face-attribute call inside an
> (ignore-errors ...)  form, so it should *not* blow up.

I don't understand, as I did not do any Emacs changes lately in that area.

> Are you using some old outdated htmlize code by any chance?

Library is file `~/Downloads/emacs/site-lisp/htmlize.el', where I have all
independent package files downloaded from the Web.

Wait... That should be `~/src/org-mode/contrib/lisp/htmlize.el', right?
                              ^^^^^^^^^^^^^^^^
So, I have 2 `htmlize' files, and the Org-compliant one is only located in the
second best place.

I have -- still! -- absolutely no idea why the original `htmlize' file worked
for me so far, and why it suddenly stopped working yesterday (I did no change
of load-paths, neither did I save that file there... it must be a very old
reminiscence).

I still have found out that -- with the original (non-Org) `htmlize' file --,
I need to have a declaration like this:

#+begin_src emacs-lisp
       (default ((t (nil))))
#+end_src

in my color theme.

With the Org flavor of `htmlize', that line is not needed.

For sure, yesterday, I played with that line, *after* things had gone wrong,
as I wondered whether such a line, with `nil', was good or not to have.

Now, there are 2 ways to solve my problem for sure:

- putting the original `htmlize' after the Org paths,
- removing it.

The first solution does not feel natural to me: I need having the proper
load-paths set up for Org in my stub .emacs (calling my tangled, huge file
full of Emacs customizations). It's because ~/Downloads/emacs/site-lisp/ is
added to the load-path in that huge .emacs file that it's finally in front of
Org git directories, as the append is done upfront -- no prepend.

Now, I really don't need to have conflicting versions of `htmlize', so I
simply deleted that file -- whose I ignored the existence up to now --, and
all is so far so good.

Thanks (a lot) for putting me right on track!

Best regards,
  Seb

-- 
Sebastien Vauban




reply via email to

[Prev in Thread] Current Thread [Next in Thread]