emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/org d2f4d4b: Merge branch 'bugfix'


From: ELPA Syncer
Subject: [elpa] externals/org d2f4d4b: Merge branch 'bugfix'
Date: Sat, 23 Oct 2021 08:57:31 -0400 (EDT)

branch: externals/org
commit d2f4d4b457a9fe7a7dbcfbd2d71c723ffa8c2726
Merge: 717a847 52e6f1c
Author: Nicolas Goaziou <mail@nicolasgoaziou.fr>
Commit: Nicolas Goaziou <mail@nicolasgoaziou.fr>

    Merge branch 'bugfix'
---
 lisp/org-macro.el              | 2 +-
 testing/lisp/test-org-macro.el | 9 +++++++++
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/lisp/org-macro.el b/lisp/org-macro.el
index 23e5ab4..5f253ad 100644
--- a/lisp/org-macro.el
+++ b/lisp/org-macro.el
@@ -127,7 +127,7 @@ previous one, unless VALUE is nil.  Return the updated 
list."
   "Collect macro definitions in current buffer and setup files.
 Return an alist containing all macro templates found."
   (let ((templates
-         `(("author" . ,(org-macro--find-keyword-value "AUTHOR"))
+         `(("author" . ,(org-macro--find-keyword-value "AUTHOR" t))
           ("email" . ,(org-macro--find-keyword-value "EMAIL"))
           ("title" . ,(org-macro--find-keyword-value "TITLE" t))
           ("date" . ,(org-macro--find-date)))))
diff --git a/testing/lisp/test-org-macro.el b/testing/lisp/test-org-macro.el
index 1b4b791..f1bc4f4 100644
--- a/testing/lisp/test-org-macro.el
+++ b/testing/lisp/test-org-macro.el
@@ -314,6 +314,15 @@
            (org-macro-replace-all org-macro-templates)
            (buffer-substring-no-properties
             (line-beginning-position) (point-max)))))
+  ;; Return AUTHOR keyword value.
+  (should
+   (equal "author 1 author 2"
+         (org-test-with-temp-text
+              "#+author: author 1\n#+author: author 2\n<point>{{{author}}}"
+           (org-macro-initialize-templates)
+           (org-macro-replace-all org-macro-templates)
+           (buffer-substring-no-properties
+            (line-beginning-position) (point-max)))))
   ;; When AUTHOR keyword is missing, return the empty string.
   (should
    (equal ""



reply via email to

[Prev in Thread] Current Thread [Next in Thread]