emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Suhail Singh" <suhailsingh247@gmail.com>
To: emacs-orgmode@gnu.org
Subject: [PATCH] org-lint.el: Include org-export-global-macros in global templates
Date: Fri, 3 Jan 2025 22:23:09 -0500	[thread overview]
Message-ID: <87ed1jfebd.fsf@gmail.com> (raw)

* 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	other threads:[~2025-01-04  3:29 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-04  3:23 Suhail Singh [this message]
2025-01-04 14:04 ` [PATCH] org-lint.el: Include org-export-global-macros in global templates Ihor Radchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ed1jfebd.fsf@gmail.com \
    --to=suhailsingh247@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).