【问题标题】:Cryptic message on org-html-publish-to-htmlorg-html-publish-to-html 上的神秘消息
【发布时间】:2013-05-09 23:17:44
【问题描述】:

我正在尝试将 org 文件发布到 html,但在尝试发布我的 .org 文件时收到此错误:

org-export-dispatch: Wrong number of arguments: #[(&optional force) "

然后是一堆不会粘贴的奇怪符号……接着是

[wconfig force org-publish-use-timestamps-flag project current-window-configuration     ((setwindow-configuration wconfig)) org-publish-get-project-from-filename buffer-file-name up     error ...] 4 ("/usr/share/emacs/24.1/lisp/org/org-publish.elc" . 31315) "P"], 2

这是我的 .emacs 文件的相关部分的发布设置:

(require 'org-publish)
(setq org-publish-alist
  '(("org-html" 
 :base-directory "~/org/"
 :base-extension "org"
 :publishing-directory "~/public_html/"
 :recursive t
 :publishing-function org-html-publish-to-html
 :table-of-contents: nil
 :auto-postamble nil
 )
("org-static"
 :base-directory "~/org/"
 :base-extension "css\\|js\\|png\\|jpg\\|gif\\|pdf\\|mp3\\|ogg\\|swf"
 :publishing-directory "~/public_html/files"
 :recursive t
 :publishing-function org-publish-attachment
 )
   ("org" :components ("org-html" "org-static"))
   )
  )

关于为什么这不会发布的任何建议?

【问题讨论】:

    标签: html emacs org-mode


    【解决方案1】:

    由于最近对导出器的一些更改,我的语法发生了冲突。这是我的代码,现在可以正常运行了:

    (require 'ox-publish)
    (require 'ox-html)
    
    (setq org-publish-project-alist
      '(("org-html" 
     :base-directory "~/org/"
     :base-extension "org"
     :publishing-directory "~/public_html/"
     :recursive t
     :publishing-function org-html-publish-to-html
     :table-of-contents: nil
     :auto-postamble nil)
    ("org-static"
     :base-directory "~/org/"
     :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-html" "org-static"))))
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-11-09
      • 1970-01-01
      • 1970-01-01
      • 2022-07-08
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多