problems publishing org files

I am following the directions given in a worg for publishing org files to HTML. This looks like the most vanilla org to HTML publication exercise. As suggested, I eval'ed the following block:

    (require 'org-publish)
(setq org-publish-project-alist
      '(
    ("org-notes"
     :base-directory "~/www/"
     :base-extension "org"
     :publishing-directory "~/public_html/"
     :recursive t
     :publishing-function org-publish-org-to-html
     :headline-levels 4             ; Just the default for this project.
     :auto-preamble t
     )
    ("org-static"
     :base-directory "~/www/"
     :base-extension "css|js|png|jpg|gif|pdf|mp3|ogg|swf"
     :publishing-directory "~/public_html/"
     :recursive t
     :publishing-function org-publish-attachment
     )
    ("org" :components ("org-notes" "org-static"))
       ;; ... add all the components here (see below)...
      ))

But when I run Mx org-publish-project RET org RET , I get the following error:

Symbol's value as variable is void: org-export-html-special-string-regexps

Some Googling suggests that this could be due to multiple versions of org installed. I think this isn't the case with me. I have a fresh (1 day old) installation of GNU Emacs on Mac OS X and I subsequently updated to the most recent org-mode using Mx package-install .

Any advice?

edit 1: Here is the output for Mx org-version :

Org-mode version 8.2.5h (8.2.5h-19-g0ceb68-elpa @ /Users/krishnan/.emacs.d/elpa/org-20140210/)

edit 2: Debug info added:

Debugger entered--Lisp error: (void-variable org-export-html-special-string-regexps)
  org-export-html-convert-special-strings("Kaushik Krishnan")
  org-html-do-expand("Kaushik Krishnan")
  org-html-expand("Kaushik Krishnan")
  org-export-as-html(4 (:buffer-will-be-killed t :base-directory "~/www/" :base-extension "org" :publishing-directory "~/public_html/" :recursive t :publishing-function org-publish-org-to-html :headline-levels 4 :auto-preamble t) nil nil "/Users/krishnan/public_html/")
  org-publish-org-to("html" (:base-directory "~/www/" :base-extension "org" :publishing-directory "~/public_html/" :recursive t :publishing-function org-publish-org-to-html :headline-levels 4 :auto-preamble t) "/Users/krishnan/www/index.org" "/Users/krishnan/public_html/")
  org-publish-org-to-html((:base-directory "~/www/" :base-extension "org" :publishing-directory "~/public_html/" :recursive t :publishing-function org-publish-org-to-html :headline-levels 4 :auto-preamble t) "/Users/krishnan/www/index.org" "/Users/krishnan/public_html/")
  org-publish-file("/Users/krishnan/www/index.org" ("org-notes" :base-directory "~/www/" :base-extension "org" :publishing-directory "~/public_html/" :recursive t :publishing-function org-publish-org-to-html :headline-levels 4 :auto-preamble t) t)
  #[(project) "306@!210A307  310"307  311"307  312"206313307  314"206#315307 316"206- 307    317"2068!"307  320"307  321"322n"#323$203X324325!210203a
f"210#211A#@211$203x326$327#210202a307   330"203222331307  332"!210326333334307 332""327#210203233324335!210336 .207" [project project-plist exclude-regexp sitemap-p sitemap-filename sitemap-function org-publish-initialize-cache plist-get :exclude :auto-sitemap :sitemap-filename "sitemap.org" :sitemap-function org-publish-org-sitemap :sitemap-date-format :sitemap-file-entry-format :preparation-function :completion-function org-publish-get-base-files nil run-hooks preparation-function org-publish-file t :makeindex org-publish-index-generate-theindex :base-directory expand-file-name "theindex.org" completion-function org-publish-write-cache-file org-publish-sitemap-date-format org-sitemap-date-format org-publish-sitemap-file-entry-format org-sitemap-file-entry-format files file] 6](("org-notes" :base-directory "~/www/" :base-extension "org" :publishing-directory "~/public_html/" :recursive t :publishing-function org-publish-org-to-html :headline-levels 4 :auto-preamble t))
  mapc(#[(project) "306@!210A307 310"307  311"307  312"206313307  314"206#315307 316"206- 307    317"2068!"307  320"307  321"322n"#323$203X324325!210203a
f"210#211A#@211$203x326$327#210202a307   330"203222331307  332"!210326333334307 332""327#210203233324335!210336 .207" [project project-plist exclude-regexp sitemap-p sitemap-filename sitemap-function org-publish-initialize-cache plist-get :exclude :auto-sitemap :sitemap-filename "sitemap.org" :sitemap-function org-publish-org-sitemap :sitemap-date-format :sitemap-file-entry-format :preparation-function :completion-function org-publish-get-base-files nil run-hooks preparation-function org-publish-file t :makeindex org-publish-index-generate-theindex :base-directory expand-file-name "theindex.org" completion-function org-publish-write-cache-file org-publish-sitemap-date-format org-sitemap-date-format org-publish-sitemap-file-entry-format org-sitemap-file-entry-format files file] 6] (("org-notes" :base-directory "~/www/" :base-extension "org" :publishing-directory "~/public_html/" :recursive t :publishing-function org-publish-org-to-html :headline-levels 4 :auto-preamble t) ("org-static" :base-directory "~/www/" :base-extension "css|js|png|jpg|gif|pdf|mp3|ogg|swf" :publishing-directory "~/public_html/" :recursive t :publishing-function org-publish-attachment)))
  org-publish-projects((("org" :components ("org-notes" "org-static"))))
  org-publish-project(("org" :components ("org-notes" "org-static")) nil)
  call-interactively(org-publish-project record nil)
  command-execute(org-publish-project record)
  execute-extended-command(nil "org-publish-project")
  call-interactively(execute-extended-command nil nil)

From the comments: changing

 :publishing-function org-publish-org-to-html

to

 :publishing-function org-html-publish-to-html

solves the problem. org-publish-org-to-html is an obsolete name.

链接地址: http://www.djcxy.com/p/30536.html

上一篇: 如何改变基于网址的CSS

下一篇: 发布组织文件的问题