[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] Macro expansion in included files
From: |
Sébastien Vauban |
Subject: |
Re: [O] Macro expansion in included files |
Date: |
Sat, 05 Mar 2011 15:07:38 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (windows-nt) |
Hi Benny,
Benny Simonsen wrote:
> 2011/3/2 Benny Simonsen <address@hidden>:
>> 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 @<strong>$1@</strong>
>>
>> {{{MacM(Main)}}}
>>
>> #+INCLUDE: "sub.org"
>> = main.org END ========
>>
>> = sub.org START ========
>> #+TITLE: Subpage
>> #+MACRO: Mac @<strong>$1@</strong>
>>
>> {{{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.
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
--
Sébastien Vauban