Hello,

As the DOCSTRING of the function `org-macro--collect-macros' tells it,
it "collects macro definitions in current buffer and setup files", not
from INCLUDE files.

This patch ensures that the above does work.

>From a8737be0b12ce700cd348c47f91694bfc0fbe7b8 Mon Sep 17 00:00:00 2001
From: "Fabrice Niessen" <fni-n...@pirilampo.org>
Date: Wed, 5 Feb 2014 16:59:58 +0100
Subject: [PATCH] Collect macro definitions from INCLUDE files as well

* org-macro.el (org-macro--collect-macros): INCLUDE files are looked up
when searching for macro definitions.

---
 lisp/org-macro.el |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lisp/org-macro.el b/lisp/org-macro.el
index 50ce438..7f438ed 100644
--- a/lisp/org-macro.el
+++ b/lisp/org-macro.el
@@ -78,7 +78,7 @@ Return an alist containing all macro templates found."
              (org-with-wide-buffer
               (goto-char (point-min))
               (while (re-search-forward
-                      "^[ \t]*#\\+\\(MACRO\\|SETUPFILE\\):" nil t)
+                      "^[ \t]*#\\+\\(MACRO\\|SETUPFILE\\|INCLUDE\\):" nil t)
                 (let ((element (org-element-at-point)))
                   (when (eq (org-element-type element) 'keyword)
                     (let ((val (org-element-property :value element)))

-- 
Fabrice Niessen
Leuven, Belgium
http://www.pirilampo.org/


Reply via email to