summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Goaziou <n.goaziou@gmail.com>2013-10-07 15:06:10 (GMT)
committer Nicolas Goaziou <n.goaziou@gmail.com>2013-10-07 15:06:10 (GMT)
commit21b11071d3d8caeaf6ad3e79c427b9e5088239cb (patch)
tree65a1f8a6f3043b81d376c91db96e3384c04747d5
parent8aaf3c9748b6ef8bd5782108ae382f59efef1903 (diff)
parent655f62dbbb7bacd88984ab2d206f3426e1cd2f18 (diff)
downloadorg-mode-21b11071d3d8caeaf6ad3e79c427b9e5088239cb.zip
org-mode-21b11071d3d8caeaf6ad3e79c427b9e5088239cb.tar.gz
Merge branch 'maint'
-rw-r--r--lisp/ox-beamer.el9
-rw-r--r--lisp/ox.el14
-rw-r--r--testing/lisp/test-ox.el13
3 files changed, 27 insertions, 9 deletions
diff --git a/lisp/ox-beamer.el b/lisp/ox-beamer.el
index f1dbe82..74d99ed 100644
--- a/lisp/ox-beamer.el
+++ b/lisp/ox-beamer.el
@@ -445,8 +445,7 @@ INFO is a plist used as a communication channel."
CONTENTS holds the contents of the headline. INFO is a plist
used as a communication channel."
(let ((latex-headline
- (org-export-data-with-backend
- headline
+ (org-export-with-backend
;; We create a temporary export back-end which behaves the
;; same as current one, but adds "\protect" in front of the
;; output of some objects.
@@ -461,8 +460,10 @@ used as a communication channel."
(if (org-string-nw-p code) (concat "\\protect" code)
code))))))
(mapcar #'(lambda (type) (cons type protected-output))
- '(bold footnote-reference italic strike-through
- timestamp underline))))
+ '(bold footnote-reference italic strike-through timestamp
+ underline))))
+ headline
+ contents
info))
(mode-specs (org-element-property :BEAMER_ACT headline)))
(if (and mode-specs
diff --git a/lisp/ox.el b/lisp/ox.el
index 343c4ef..d00bb17 100644
--- a/lisp/ox.el
+++ b/lisp/ox.el
@@ -3481,10 +3481,16 @@ the communication channel used for export, as a plist."
(org-export-barf-if-invalid-backend backend)
(let ((type (org-element-type data)))
(if (memq type '(nil org-data)) (error "No foreign transcoder available")
- (let ((transcoder
- (cdr (assq type (org-export-get-all-transcoders backend)))))
- (if (functionp transcoder) (funcall transcoder data contents info)
- (error "No foreign transcoder available"))))))
+ (let* ((all-transcoders (org-export-get-all-transcoders backend))
+ (transcoder (cdr (assq type all-transcoders))))
+ (if (not (functionp transcoder))
+ (error "No foreign transcoder available")
+ (funcall
+ transcoder data contents
+ (org-combine-plists
+ info (list :back-end backend
+ :translate-alist all-transcoders
+ :exported-data (make-hash-table :test 'eq :size 401)))))))))
;;;; For Export Snippets
diff --git a/testing/lisp/test-ox.el b/testing/lisp/test-ox.el
index 47c68d7..ee3a3b9 100644
--- a/testing/lisp/test-ox.el
+++ b/testing/lisp/test-ox.el
@@ -1115,7 +1115,18 @@ body\n")))
'((plain-text . (lambda (text contents info) "Failure"))))
(org-export-define-backend 'test2
'((plain-text . (lambda (text contents info) "Success"))))
- (org-export-with-backend 'test2 "Test")))))
+ (org-export-with-backend 'test2 "Test"))))
+ ;; Provide correct back-end if transcoder needs to use recursive
+ ;; calls anyway.
+ (should
+ (equal "Success"
+ (let (org-export--registered-backends)
+ (org-export-define-backend 'test
+ '((plain-text . (lambda (bold contents info) "Success"))
+ (headline . (lambda (headline contents info)
+ (org-export-data
+ (org-element-property :title headline))))))
+ (org-export-with-backend 'test "* Test")))))
(ert-deftest test-org-export/data-with-backend ()
"Test `org-export-data-with-backend' specifications."