emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] Improved way to include some headlines from an external org file


From: Xavier Garrido
Subject: [O] Improved way to include some headlines from an external org file
Date: Thu, 11 Sep 2014 16:24:13 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.1.1

Dear Orgers,

By following discussions on this list, I think I have understood that the inclusion mechanism through =#+INCLUDE= directive is a bit rough and only allows a limited range of use. I know how to include only lines using =:lines= parameter but what I would like to achieve is to only include some headlines from an external org file. Is there a way using babel for example (like this function https://github.com/thesoftwarebin/the-emacs-software-bin/blob/master/include-many-files/include-many-files.org) to write something like that

#+BEGIN_SRC org
#+INCLUDE: "./base.org" :headline "First base chapter"
,* A more personal chapter
#+INCLUDE: "./base.org" :headline "Second base chapter"
,* Another personal chapter
#+END_SRC

Of course, I can achieve that by using =:lines= and calculating how many lines embeds the given headline. But every time the "First base chapter" length changes I will have to change all the subsequent =#INCLUDE:= commands. I do not know how hard it is to implement this but I think it will be a nice addition (at least one I will use a lot).

Thanks for your answer,
Xavier



reply via email to

[Prev in Thread] Current Thread [Next in Thread]