Include an .org file and lower the level of all its headers
commit249ae99b183958f698ed279034cf834f64e604bd
authorPuneeth Chaganti <punchagan@gmail.com>
Sun, 14 Nov 2010 12:01:05 +0000 (14 12:01 +0000)
committerCarsten Dominik <carsten.dominik@gmail.com>
Mon, 15 Nov 2010 10:15:53 +0000 (15 11:15 +0100)
treebf878c7699b53580005283f4f7efe814bdbac3d1
parent0adcd5d619647c947011ff8b1d9da3d5f5ae5068
Include an .org file and lower the level of all its headers

* doc/org.texi (Include files): Document :minlevel.
* lisp/org-exp.el (org-export-handle-include-files): Support :minlevel
property.
(org-get-file-contents): New argument minlevel to demote included
content.

On Sat, Nov 13, 2010 at 1:12 AM, Carsten Dominik
<carsten.dominik@gmail.com> wrote:
>
> On Nov 10, 2010, at 3:46 AM, Jianshi Huang wrote:
>
>> Hi,
>>
>> I know I can include any file using #+INCLUDE.
>>
>> I need to include several org files, but they were edited
>> independently as a complete document.
>>
>> Now I want to lower the levels of headers in these org files
>> automatically during inclusion. Is there a way to do that?
>
> No.  But since #+include accepts arguments, it could be implemented,
> something like
>
> #+include "aaa.org" :minlevel 4
>
> or so.  I would accept a good patch to this effect.

Here's a patch. I tested it with a simple document and works fine.

Thanks,
Puneeth
doc/org.texi
lisp/org-exp.el