无法使用org-mode ox-publish将HTML发布到服务器

时间:2013-05-10 21:21:04

标签: html emacs org-mode

我的.emacs的相关代码是:

(require 'ox-publish)
(require 'ox-html)
(setq org-publish-project-alist
  '(("org-html"
     :base-directory "~/org/"
     :base-extension "org"
     :publishing-directory "/ssh:user@server:/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 "/ssh:user@server:/public_html/"
     :recursive t
     :publishing-function org-publish-attachment
     )
   ("org" :components ("org-html" "org-static"))
   )
  )

我收到一条错误消息,说明如下:

byte-code: Couldn't find exit status of `test -e /public_html/'

如果我发布到本地计算机上的目录并且它工作了一分钟但随后停止了,它导出正常。有线索吗?

1 个答案:

答案 0 :(得分:0)

由于您的ssh:远程文件位置规范,我认为问题来自Tramp。

首先尝试使用Tramp对抗该远程目录,并检查一切是否正常运行。