diff options
author | Nicolas Goaziou <n.goaziou@gmail.com> | 2012-06-30 10:01:28 +0200 |
---|---|---|
committer | Nicolas Goaziou <n.goaziou@gmail.com> | 2012-06-30 10:01:28 +0200 |
commit | ab82a9dcfeab4b997cd684a368885e6ddbd10e8e (patch) | |
tree | 882b5e1752d69cd5d7507e7f66d261e831a51e06 | |
parent | 2e38ed36cb2f46df2d84e0566d0a5ddb9b90d7fe (diff) | |
download | org-mode-ab82a9dcfeab4b997cd684a368885e6ddbd10e8e.tar.gz |
Update tests and comments for new snippet syntax
* contrib/lisp/org-export.el (org-export-snippet-translation-alist):
Fix docstring.
(org-export-as): Fix code comment.
* testing/lisp/test-org-element.el: Update tests.
* testing/lisp/test-org-export.el: Update tests.
-rw-r--r-- | contrib/lisp/org-export.el | 12 | ||||
-rw-r--r-- | testing/lisp/test-org-element.el | 6 | ||||
-rw-r--r-- | testing/lisp/test-org-export.el | 2 |
3 files changed, 9 insertions, 11 deletions
diff --git a/contrib/lisp/org-export.el b/contrib/lisp/org-export.el index 7e82050..da491ee 100644 --- a/contrib/lisp/org-export.el +++ b/contrib/lisp/org-export.el @@ -641,9 +641,9 @@ confirm the use of these lines." This variable allows to provide shortcuts for export snippets. -For example, with a value of '\(\(\"h\" . \"html\"\)\), the HTML -back-end will recognize the contents of \"@h{<b>}\" as HTML code -while every other back-end will ignore it." +For example, with a value of '\(\(\"h\" . \"e-html\"\)\), the +HTML back-end will recognize the contents of \"@@h:<b>@@\" as +HTML code while every other back-end will ignore it." :group 'org-export-general :type '(repeat (cons @@ -2320,10 +2320,8 @@ Return code as a string." (goto-char (point-min)) (forward-line) (narrow-to-region (point) (point-max)))) - ;; 1. Get export environment from original buffer. Store - ;; original footnotes definitions in communication channel as - ;; they might not be accessible anymore in a narrowed parse - ;; tree. Also install user's and developer's filters. + ;; 1. Get export environment from original buffer. Also install + ;; user's and developer's filters. (let ((info (org-export-install-filters (org-export-get-environment backend subtreep ext-plist))) ;; 2. Get parse tree. Buffer isn't parsed directly. diff --git a/testing/lisp/test-org-element.el b/testing/lisp/test-org-element.el index 4fffaa6..cb6b1f5 100644 --- a/testing/lisp/test-org-element.el +++ b/testing/lisp/test-org-element.el @@ -470,7 +470,7 @@ CLOCK: [2012-01-01 sun. 00:01]--[2012-01-01 sun. 00:02] => 0:01" (should (equal '("back-end" . "contents") - (org-test-with-temp-text "<back-end@contents>" + (org-test-with-temp-text "@@back-end:contents@@" (org-element-map (org-element-parse-buffer) 'export-snippet (lambda (snippet) (cons (org-element-property :back-end snippet) @@ -1758,8 +1758,8 @@ CLOSED: <2012-01-01> DEADLINE: <2012-01-01> SCHEDULED: <2012-01-01>\n")))) (ert-deftest test-org-element/export-snippet-interpreter () "Test export snippet interpreter." - (should (equal (org-test-parse-and-interpret "<back-end@contents>") - "<back-end@contents>\n"))) + (should (equal (org-test-parse-and-interpret "@@back-end:contents@@") + "@@back-end:contents@@\n"))) (ert-deftest test-org-element/footnote-reference-interpreter () "Test footnote reference interpreter." diff --git a/testing/lisp/test-org-export.el b/testing/lisp/test-org-export.el index e0bfa77..01bf396 100644 --- a/testing/lisp/test-org-export.el +++ b/testing/lisp/test-org-export.el @@ -295,7 +295,7 @@ Paragraph" (ert-deftest test-org-export/export-snippet () "Test export snippets transcoding." - (org-test-with-temp-text "<test@A><t@B>" + (org-test-with-temp-text "@@test:A@@@@t:B@@" (org-test-with-backend test (flet ((org-test-export-snippet (snippet contents info) |