From mboxrd@z Thu Jan 1 00:00:00 1970 From: Benny Simonsen Subject: Macro expansion in included files Date: Wed, 2 Mar 2011 17:26:11 +0100 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Return-path: Received: from [140.186.70.92] (port=44998 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Puose-0006By-Cs for emacs-orgmode@gnu.org; Wed, 02 Mar 2011 11:26:29 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Puosd-0004gN-7E for emacs-orgmode@gnu.org; Wed, 02 Mar 2011 11:26:28 -0500 Received: from mail-vw0-f41.google.com ([209.85.212.41]:63581) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Puosd-0004gH-0p for emacs-orgmode@gnu.org; Wed, 02 Mar 2011 11:26:27 -0500 Received: by vws13 with SMTP id 13so100006vws.0 for ; Wed, 02 Mar 2011 08:26:26 -0800 (PST) In-Reply-To: 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 with two files, main.org and sub.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