Merge branch 'maint'

This commit is contained in:
Nicolas Goaziou 2016-01-29 00:53:58 +01:00
commit f8c5c4825e
2 changed files with 12 additions and 2 deletions

View File

@ -186,7 +186,7 @@ found in the buffer with no definition in TEMPLATES.
Optional argument KEYWORDS, when non-nil is a list of keywords,
as strings, where macro expansion is allowed."
(save-excursion
(org-with-wide-buffer
(goto-char (point-min))
(let ((properties-regexp
(format "\\`EXPORT_%s\\+?\\'" (regexp-opt keywords)))

View File

@ -107,7 +107,17 @@
(org-test-with-temp-text
"* H1\n:PROPERTIES:\n:A: 1\n:END:\n* H2\n{{{property(A,*???)}}}<point>"
(org-macro-initialize-templates)
(org-macro-replace-all org-macro-templates))))
(org-macro-replace-all org-macro-templates)))
;; Macro expansion ignores narrowing.
(should
(string-match
"expansion"
(org-test-with-temp-text
"#+MACRO: macro expansion\n{{{macro}}}\n<point>Contents"
(narrow-to-region (point) (point-max))
(org-macro-initialize-templates)
(org-macro-replace-all org-macro-templates)
(org-with-wide-buffer (buffer-string))))))
(ert-deftest test-org-macro/escape-arguments ()
"Test `org-macro-escape-arguments' specifications."