Hi Giorgio, This is currently not possible as we're not currently expanding #+include links during tangling. I agree this would be useful behavior.
This seems to be related to a recent theme on the mailing list of unifying tangling with the rest of the Org-mode export functionality. Once/if tangling were treated as an export target, then things like the expansion of #+include lines would come for free. Thanks for bringing this up, this will be an important point to keep in mind while figuring out the future of tangling. Best -- Eric Giorgio Valoti <giorgi...@me.com> writes: > Hi all, > I’ve just switched from OmniFocus and began using Org mode. But I also > discovered that it can be used for literate programming and I’d like > to ask if is there a way to use an included file in the tangling > phase. In other words, I have a file which includes a commons.org > file, like this: > > === commons.org contents === > * Variabili comuni > :PROPERTIES: > :END: > #+SRCNAME: entity-name > #+BEGIN_SRC :noweb yes > nome_tabella > #+END_SRC > > > === main.org contents === > #+INCLUDE: "commons.org" > > * Sezione in SQL > :PROPERTIES: > :END: > #+SRCNAME: sql-module > #+BEGIN_SRC sql :tangle module.sql :noweb yes > select * > from table <<entity-name>>; > #+END_SRC > > <<entity-name>> should come from the commons but it’s not. > > Is there a way to expand values from included files? > > Thank you in advance. > > -- > 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 _______________________________________________ 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