浏览代码

Docbook export: Improve formatting of xslt command

Patch by Dale Smith.
Carsten Dominik 15 年之前
父节点
当前提交
b7793bd54a
共有 2 个文件被更改,包括 12 次插入6 次删除
  1. 5 0
      lisp/ChangeLog
  2. 7 6
      lisp/org-docbook.el

+ 5 - 0
lisp/ChangeLog

@@ -1,3 +1,8 @@
+2010-05-13  Carsten Dominik  <carsten.dominik@gmail.com>
+
+	* org-docbook.el (org-export-as-docbook-pdf): Improve
+	formatting of the xslt command.
+
 2010-05-13  Sebastian Rose  <sebastian_rose@gmx.de>
 2010-05-13  Sebastian Rose  <sebastian_rose@gmx.de>
 
 
 	* org-publish.el (org-publish-cache): Use one big hashmap for
 	* org-publish.el (org-publish-cache): Use one big hashmap for

+ 7 - 6
lisp/org-docbook.el

@@ -76,6 +76,7 @@
 (require 'org)
 (require 'org)
 (require 'org-exp)
 (require 'org-exp)
 (require 'org-html)
 (require 'org-html)
+(require 'format-spec)
 
 
 ;;; Variables:
 ;;; Variables:
 
 
@@ -333,10 +334,10 @@ in a window.  A non-interactive call will only return the buffer."
   "Export as DocBook XML file, and generate PDF file."
   "Export as DocBook XML file, and generate PDF file."
   (interactive "P")
   (interactive "P")
   (if (or (not org-export-docbook-xslt-proc-command)
   (if (or (not org-export-docbook-xslt-proc-command)
-	  (not (string-match "%s.+%s" org-export-docbook-xslt-proc-command)))
+	  (not (string-match "%[io].+%[io]" org-export-docbook-xslt-proc-command)))
       (error "XSLT processor command is not set correctly"))
       (error "XSLT processor command is not set correctly"))
   (if (or (not org-export-docbook-xsl-fo-proc-command)
   (if (or (not org-export-docbook-xsl-fo-proc-command)
-	  (not (string-match "%s.+%s" org-export-docbook-xsl-fo-proc-command)))
+	  (not (string-match "%[io].+%[io]" org-export-docbook-xsl-fo-proc-command)))
       (error "XSL-FO processor command is not set correctly"))
       (error "XSL-FO processor command is not set correctly"))
   (message "Exporting to PDF...")
   (message "Exporting to PDF...")
   (let* ((wconfig (current-window-configuration))
   (let* ((wconfig (current-window-configuration))
@@ -348,10 +349,10 @@ in a window.  A non-interactive call will only return the buffer."
 	 (pdffile (concat base ".pdf")))
 	 (pdffile (concat base ".pdf")))
     (and (file-exists-p pdffile) (delete-file pdffile))
     (and (file-exists-p pdffile) (delete-file pdffile))
     (message "Processing DocBook XML file...")
     (message "Processing DocBook XML file...")
-    (shell-command (format org-export-docbook-xslt-proc-command
-			   fofile (shell-quote-argument filename)))
-    (shell-command (format org-export-docbook-xsl-fo-proc-command
-			   fofile pdffile))
+    (shell-command (format-spec org-export-docbook-xslt-proc-command
+				(format-spec-make ?o fofile ?i (shell-quote-argument filename))))
+    (shell-command (format-spec org-export-docbook-xsl-fo-proc-command
+				(format-spec-make ?i fofile ?o pdffile)))
     (message "Processing DocBook file...done")
     (message "Processing DocBook file...done")
     (if (not (file-exists-p pdffile))
     (if (not (file-exists-p pdffile))
 	(error "PDF file was not produced")
 	(error "PDF file was not produced")