emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [PATCH] org-lint.el: Include org-export-global-macros in global templates
@ 2025-01-04  3:23 Suhail Singh
  2025-01-04 14:04 ` Ihor Radchenko
  0 siblings, 1 reply; 2+ messages in thread
From: Suhail Singh @ 2025-01-04  3:23 UTC (permalink / raw)
  To: emacs-orgmode

* 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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] org-lint.el: Include org-export-global-macros in global templates
  2025-01-04  3:23 [PATCH] org-lint.el: Include org-export-global-macros in global templates Suhail Singh
@ 2025-01-04 14:04 ` Ihor Radchenko
  0 siblings, 0 replies; 2+ messages in thread
From: Ihor Radchenko @ 2025-01-04 14:04 UTC (permalink / raw)
  To: Suhail Singh; +Cc: emacs-orgmode

"Suhail Singh" <suhailsingh247@gmail.com> writes:

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

Applied, onto main.
Thanks!
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=358eeb7ce8

-- 
Ihor Radchenko // yantar92,
Org mode maintainer,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-01-04 14:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-04  3:23 [PATCH] org-lint.el: Include org-export-global-macros in global templates Suhail Singh
2025-01-04 14:04 ` Ihor Radchenko

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).