Il giorno 13/set/2010, alle ore 14.47, Dan Davison ha scritto: > Giorgio Valoti <giorgi...@me.com> writes: > […] >> >> Is there a way to expand values from included files? > > Hi Giorgio, > > I don't know of a way currently but I agree that it is desirable. It > does seem temtping to want to use #+INCLUDE for this purpose; > however #+INCLUDE is an /export/ construct, and tangling is not > (technically at least) an Org-mode export method.
Ah, here’s why. > So some options that > come to my mind are: > > 1. I am overlooking an existing way of doing this. > > 2. Implement #+INCLUDE when tangling, optionally or by default. > > 3. Implement a general way of including blocks of code from other files > in such a way that they behave as 'normal' code blocks. This would > have several potentially useful consequences. What’s the difference between options 2 and 3? I mean, if we #+INCLUDE when tangling how is it different from including code blocks? Or do you see option 3 as a more granular way to refer to external entities, something comparable to a programming language import statement? > > 4. It seems that it should be possible to get what you want by first > using `org-export-as-org' followed by `org-babel-tangle'. However, > `org-export-as-org' doesn't currently include #+INCLUDE'd files. I > wonder if it should. A hack to do what you want is below (You'll be > prompted for a file name to save the Org export buffer to.): Thank you, Dan. It could be a good enough interim solution. Ciao -- Giorgio Valoti _______________________________________________ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode