Merge branch 'maint'

This commit is contained in:
Nicolas Goaziou 2014-11-18 19:46:44 +01:00
commit 78773315ee
2 changed files with 11 additions and 4 deletions

View File

@ -5698,7 +5698,7 @@ Providing it allows for quicker computation."
(if (not (member (org-element-property :key element)
org-element-document-properties))
(throw 'objects-forbidden element)
(beginning-of-line)
(goto-char (org-element-property :begin element))
(search-forward ":")
(if (and (>= pos (point)) (< pos (line-end-position)))
(narrow-to-region (point) (line-end-position))

View File

@ -3187,9 +3187,16 @@ Text
;; Find objects in document keywords.
(should
(eq 'macro
(org-test-with-temp-text "#+DATE: {{{macro}}}"
(progn (search-forward "{")
(org-element-type (org-element-context))))))
(org-test-with-temp-text "#+DATE: <point>{{{macro}}}"
(org-element-type (org-element-context)))))
(should-not
(eq 'macro
(org-test-with-temp-text "#+DATE: {{{macro}}}\n<point>"
(org-element-type (org-element-context)))))
(should-not
(eq 'macro
(org-test-with-temp-text "#+RANDOM_KEYWORD: <point>{{{macro}}}"
(org-element-type (org-element-context)))))
;; Do not find objects in table rules.
(should
(eq 'table-row