summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Goaziou <mail@nicolasgoaziou.fr>2014-10-12 22:47:48 +0200
committerNicolas Goaziou <mail@nicolasgoaziou.fr>2014-10-12 22:53:01 +0200
commita0ac1344fccc391abda4e5f5088a399e511b3607 (patch)
treea1244554aa56bc5055d4b6a8b5de4fe1ca4a286f
parent9c3d22f86449d284efd5126254e4c76e43c09f48 (diff)
downloadorg-mode-a0ac1344fccc391abda4e5f5088a399e511b3607.tar.gz
ox: Fix 88457acff411eca9b32c04b4bc100ef094a23c5c
* lisp/ox.el (org-export-async-start): Limit first argument to lambda expressions. * lisp/ox-publish.el (org-publish, org-publish-all, org-publish-current-file): Replace `ignore', per limit stated above. Due to a hack allowing to provide quasi-quoted lambda expressions, symbols are not allowed as result handler. This limitation is not much of a problem as `org-export-async-start' is only meant to be used internally.
-rw-r--r--lisp/ox-publish.el6
-rw-r--r--lisp/ox.el7
2 files changed, 7 insertions, 6 deletions
diff --git a/lisp/ox-publish.el b/lisp/ox-publish.el
index 1dc790d..efc70d2 100644
--- a/lisp/ox-publish.el
+++ b/lisp/ox-publish.el
@@ -881,7 +881,7 @@ publishing will be done asynchronously, in another process."
;; project is still a string here.
(list (assoc project org-publish-project-alist)))))
(if async
- (org-export-async-start 'ignore
+ (org-export-async-start (lambda (results) nil)
`(let ((org-publish-use-timestamps-flag
(if ',force nil ,org-publish-use-timestamps-flag)))
(org-publish-projects ',project-alist)))
@@ -899,7 +899,7 @@ optional argument ASYNC, publishing will be done asynchronously,
in another process."
(interactive "P")
(if async
- (org-export-async-start 'ignore
+ (org-export-async-start (lambda (results) nil)
`(progn
(when ',force (org-publish-remove-all-timestamps))
(let ((org-publish-use-timestamps-flag
@@ -921,7 +921,7 @@ asynchronously, in another process."
(interactive "P")
(let ((file (buffer-file-name (buffer-base-buffer))))
(if async
- (org-export-async-start 'ignore
+ (org-export-async-start (lambda (results) nil)
`(let ((org-publish-use-timestamps-flag
(if ',force nil ,org-publish-use-timestamps-flag)))
(org-publish-file ,file)))
diff --git a/lisp/ox.el b/lisp/ox.el
index 24d0c87..1327ae4 100644
--- a/lisp/ox.el
+++ b/lisp/ox.el
@@ -5479,8 +5479,9 @@ to `:default' encoding. If it fails, return S."
(defmacro org-export-async-start (fun &rest body)
"Call function FUN on the results returned by BODY evaluation.
-BODY evaluation happens in an asynchronous process, from a buffer
-which is an exact copy of the current one.
+FUN is an anonymous function of one argument. BODY evaluation
+happens in an asynchronous process, from a buffer which is an
+exact copy of the current one.
Use `org-export-add-to-stack' in FUN in order to register results
in the stack.
@@ -5532,7 +5533,7 @@ and `org-export-to-file' for more specialized functions."
;; Register running process in stack.
(org-export-add-to-stack (get-buffer ,proc-buffer) nil ,process)
;; Set-up sentinel in order to catch results.
- (let ((handler ',fun))
+ (let ((handler ,fun))
(set-process-sentinel
,process
`(lambda (p status)