From mboxrd@z Thu Jan 1 00:00:00 1970 From: Benny Simonsen Subject: Macro expansion in included files Date: Mon, 14 Mar 2011 23:01:55 +0100 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary=20cf3054acc5c57bd9049e78755b Return-path: Received: from [140.186.70.92] (port=42517 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PzFpu-00043T-8j for emacs-orgmode@gnu.org; Mon, 14 Mar 2011 18:01:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PzFpt-0000cr-6w for emacs-orgmode@gnu.org; Mon, 14 Mar 2011 18:01:58 -0400 Received: from mail-vw0-f41.google.com ([209.85.212.41]:61878) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PzFpt-0000cn-4i for emacs-orgmode@gnu.org; Mon, 14 Mar 2011 18:01:57 -0400 Received: by vws4 with SMTP id 4so3586100vws.0 for ; Mon, 14 Mar 2011 15:01:56 -0700 (PDT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org --20cf3054acc5c57bd9049e78755b Content-Type: text/plain; charset=ISO-8859-1 Hi Some time ago I was posting about a problem with macros in included files - they will not expand. Example with two files top.org and sub.org: macro in the included file sub.org isn't expanded during export. See the content of the example files below. The patch fixes this so that the macro is expanded in both top.org and sub.org. Setup: org-mode: git master (head) export top.org with org-export-as-html I hope that the patch format is ok ("git diff" output) attached. Best regards Benny Simonsen ### top.org ############################################################ #+TITLE: Debug org file #+MACRO: testmacro Expanded {{{testmacro}}} #+INCLUDE: "sub.org" ######################################################################## ### sub.org ############################################################ #+TITLE: Included debug org file {{{testmacro}}} ######################################################################## --20cf3054acc5c57bd9049e78755b Content-Type: text/x-patch; charset=US-ASCII; name="macro-expansion-in-included-files.patch" Content-Disposition: attachment; filename="macro-expansion-in-included-files.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_gl9xnzmp0 ZGlmZiAtLWdpdCBhL2xpc3Avb3JnLWV4cC5lbCBiL2xpc3Avb3JnLWV4cC5lbAppbmRleCAzNGYx MDFkLi5kNmIyM2E5IDEwMDY0NAotLS0gYS9saXNwL29yZy1leHAuZWwKKysrIGIvbGlzcC9vcmct ZXhwLmVsCkBAIC0xMDgzLDYgKzEwODMsMTAgQEAgb24gdGhpcyBzdHJpbmcgdG8gcHJvZHVjZSB0 aGUgZXhwb3J0ZWQgdmVyc2lvbi4iCiAgICAgICA7OyBDYWxsIHRoZSBob29rCiAgICAgICAocnVu LWhvb2tzICdvcmctZXhwb3J0LXByZXByb2Nlc3MtaG9vaykKIAorICAgICAgOzsgSGFuZGxlIGlu Y2x1ZGUgZmlsZXMsIGFuZCBjYWxsIGEgaG9vaworICAgICAgKG9yZy1leHBvcnQtaGFuZGxlLWlu Y2x1ZGUtZmlsZXMtcmVjdXJzZSkKKyAgICAgIChydW4taG9va3MgJ29yZy1leHBvcnQtcHJlcHJv Y2Vzcy1hZnRlci1pbmNsdWRlLWZpbGVzLWhvb2spCisKICAgICAgIDs7IFByb2Nlc3MgdGhlIG1h Y3JvcwogICAgICAgKG9yZy1leHBvcnQtcHJlcHJvY2Vzcy1hcHBseS1tYWNyb3MpCiAgICAgICAo cnVuLWhvb2tzICdvcmctZXhwb3J0LXByZXByb2Nlc3MtYWZ0ZXItbWFjcm9zLWhvb2spCg== --20cf3054acc5c57bd9049e78755b--