From 393acf0df8ba662745f9fd012bf9f519ff5548b9 Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Sun, 23 Sep 2012 09:49:32 +0200 Subject: [PATCH] org-element: Fix for affiliated keywords parsing * lisp/org-element.el (org-element--collect-affiliated-keywords): Fix return value. * testing/lisp/test-org-element.el: Add test. --- lisp/org-element.el | 2 +- testing/lisp/test-org-element.el | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/lisp/org-element.el b/lisp/org-element.el index 27fd9d9f6..06065fe9a 100644 --- a/lisp/org-element.el +++ b/lisp/org-element.el @@ -3547,7 +3547,7 @@ position of point and CDR is nil." ;; They will be parsed as a paragraph. (when (looking-at "[ \t]*$") (goto-char origin) (setq output nil)) ;; Return value. - (cons (point) output)))) + (cons origin output)))) diff --git a/testing/lisp/test-org-element.el b/testing/lisp/test-org-element.el index 98faff4d0..8c724d555 100644 --- a/testing/lisp/test-org-element.el +++ b/testing/lisp/test-org-element.el @@ -165,6 +165,12 @@ Some other text :name (org-test-with-temp-text "#+NAME: para\nParagraph" (org-element-at-point))))) + (should + (= 1 + (org-element-property + :begin + (org-test-with-temp-text "#+NAME: para\nParagraph" + (org-element-at-point))))) ;; Parse multiple keywords. (should (equal