renard / o-blog

Standalone orgmode blog exporter. DEPECATED, NOT MAINTAINED
http://renard.github.com/o-blog-v2
260 stars 58 forks source link

Lisp error in nil: (void-function ob:post-language) #17

Closed exaos closed 12 years ago

exaos commented 12 years ago

I try to re-generate zh-example pages, but the index file contains errors:

<html lang="Lisp error in nil: (void-function ob:post-language)">
...
      <div class="nav-collapse">
        Lisp error in nil: (error ob:post-content-html accessing a non-ob:post)
exaos commented 12 years ago

In org-mode, elisp codes can be executed. So I define my own sanitizer in the header:

#+begin_src emacs-lisp
(defun el-sanitizer(s)
  "Sanitize string S"
  (if (equal (ob-sanitize-string s) "")
      (md5 s)
    (ob-sanitize-string s)))
#+end_src

#+CALL: my-sanitizer()
#+FILENAME_SANITIZER: el-sanitizer

Unfortunately, it messes up while org-publish-blog.

exaos commented 12 years ago

I fount: Lisp error in nil: (void-function ob:post-language), it's the problem in the page_header.html file, it should be: <html lang="<lisp>(ob:blog-language POST)</lisp>">. The (error ob:post-content-html accessing a non-ob:post) is the problem of (ob:post-content-html (ob:get-snippet "Navigation")): the Navigation has been translated into Chinese in my sample-zh.org.