From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?utf-8?Q?S=C3=A9bastien_Vauban?= Subject: Re: Macro expansion in included files Date: Sat, 05 Mar 2011 15:07:38 +0100 Message-ID: <80oc5plkyd.fsf@somewhere.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: 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-mXXj517/zsQ@public.gmane.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org-mXXj517/zsQ@public.gmane.org To: emacs-orgmode-mXXj517/zsQ@public.gmane.org Hi Benny, Benny Simonsen wrote: > 2011/3/2 Benny Simonsen : >> 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 >> >> =3D main.org START =3D=3D=3D=3D=3D=3D=3D=3D >> #+TITLE: Mainpage >> #+MACRO: MacM @$1@ >> >> {{{MacM(Main)}}} >> >> #+INCLUDE: "sub.org" >> =3D main.org END =3D=3D=3D=3D=3D=3D=3D=3D >> >> =3D sub.org START =3D=3D=3D=3D=3D=3D=3D=3D >> #+TITLE: Subpage >> #+MACRO: Mac @$1@ >> >> {{{MacM(Sub)}}} >> >> {{{Mac(Sub)}}} >> >> * Subpage title >> content >> =3D sub.org END =3D=3D=3D=3D=3D=3D=3D=3D >> >> 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 e= xpanded. Your example looks wrong to me: you say Mac* is not working, but only MacM = and Mac are defined. What about the trailing the star? Best regards, Seb --=20 S=C3=A9bastien Vauban