From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Fabrice Niessen" Subject: [PATCH] `org-macro--collect-macros' can collect macro definitions from include files Date: Wed, 05 Feb 2014 17:09:05 +0100 Message-ID: <86ob2la6e6.fsf@somewhere.org> Mime-Version: 1.0 Content-Type: text/plain Return-path: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org-mXXj517/zsQ@public.gmane.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org-mXXj517/zsQ@public.gmane.org To: emacs-orgmode-mXXj517/zsQ@public.gmane.org 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" 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/