* lisp/org-lint.el (org-lint-invalid-macro-argument-and-template):
Ensure templates defined in org-export-global-macros are included
during macro initialization.

TINYCHANGE
---
 lisp/org-lint.el | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lisp/org-lint.el b/lisp/org-lint.el
index 7b18c408d..273c92ead 100644
--- a/lisp/org-lint.el
+++ b/lisp/org-lint.el
@@ -872,6 +872,8 @@ (defun org-lint-export-option-keywords
     reports))
 
 (defun org-lint-invalid-macro-argument-and-template (ast)
+  "Check for invalid macro arguments in AST."
+  (require 'ox)
   (let* ((reports nil)
          (extract-placeholders
          (lambda (template)
@@ -934,7 +936,7 @@ (defun org-lint-invalid-macro-argument-and-template
                                    name))
                      reports))))))))
     ;; Check arguments for macros.
-    (org-macro-initialize-templates)
+    (org-macro-initialize-templates org-export-global-macros)
     (let ((templates (append
                      (mapcar (lambda (m) (cons m "$1"))
                              '("author" "date" "email" "title" "results"))

base-commit: 5a4686915e568ace469f490c0606d2a016c1101c

Reply via email to