From mboxrd@z Thu Jan 1 00:00:00 1970 From: Benny Simonsen Subject: Macro expansion in included files Date: Tue, 1 Mar 2011 22:59:16 +0100 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Return-path: Received: from [140.186.70.92] (port=42586 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PuXbC-0000Mn-8f for emacs-orgmode@gnu.org; Tue, 01 Mar 2011 16:59:19 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PuXbB-0001jL-2A for emacs-orgmode@gnu.org; Tue, 01 Mar 2011 16:59:18 -0500 Received: from mail-vw0-f41.google.com ([209.85.212.41]:55254) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PuXbA-0001jG-Vp for emacs-orgmode@gnu.org; Tue, 01 Mar 2011 16:59:17 -0500 Received: by vws13 with SMTP id 13so5822576vws.0 for ; Tue, 01 Mar 2011 13:59:16 -0800 (PST) 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 Hi I would like to use macros in files that I include in another file. The problem is that the macros don't expand in included files. Is there something I have missed or? Example main.org: = main.org START ======== #+TITLE: Mainpage #+MACRO: MacM @$1@ {{{MacM(Main)}}} #+INCLUDE: "sub.org" = main.org END ======== = sub.org START ======== #+TITLE: Subpage #+MACRO: Mac @$1@ {{{MacM(Sub)}}} {{{Mac(Sub)}}} * Subpage title content = sub.org END ======== I export to html e.g. via: org-export-as-html-to-buffer on main.org The result is {{{MacM(Main)}}} is expanded as expected but the {{{Mac*(Sub)}}} isn't expanded. Best regards Benny