From: "Fabrice Niessen" <fni-news-TA4HMoP+1wHrZ44/DZwexQ@public.gmane.org>
To: emacs-orgmode-mXXj517/zsQ@public.gmane.org
Subject: [PATCH] `org-macro--collect-macros' can collect macro definitions from include files
Date: Wed, 05 Feb 2014 17:09:05 +0100 [thread overview]
Message-ID: <86ob2la6e6.fsf@somewhere.org> (raw)
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-news-TA4HMoP+1wHrZ44/DZwexQ@public.gmane.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/
next reply other threads:[~2014-02-05 16:09 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-05 16:09 Fabrice Niessen [this message]
2014-02-05 16:17 ` [PATCH] `org-macro--collect-macros' can collect macro definitions from include files Bastien
2014-02-05 16:27 ` Nicolas Goaziou
[not found] ` <8738jx34p1.fsf-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-02-05 20:11 ` Fabrice Niessen
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=86ob2la6e6.fsf@somewhere.org \
--to=fni-news-ta4hmop+1whrz44/dzwexq@public.gmane.org \
--cc=emacs-orgmode-mXXj517/zsQ@public.gmane.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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.