emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Eric Schulte" <schulte.eric@gmail.com>
To: Giorgio Valoti <giorgio_v@me.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: Include files to be used in literate programming
Date: Fri, 17 Sep 2010 08:51:40 -0400	[thread overview]
Message-ID: <8762y45ujc.fsf@gmail.com> (raw)
In-Reply-To: 4A6B29B6-07EA-46F0-99E9-718F93DAE558@me.com

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 <giorgio_v@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

      parent reply	other threads:[~2010-09-17 14:11 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-12 17:02 Include files to be used in literate programming Giorgio Valoti
2010-09-13 12:47 ` Dan Davison
2010-09-13 15:17   ` Giorgio Valoti
2010-09-13 15:39   ` Rainer M Krug
2010-09-13 17:05   ` [OT] " Jambunathan K
2010-09-13 18:23     ` Dan Davison
2010-09-13 19:04       ` Jambunathan K
2010-09-17 12:51 ` Eric Schulte [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8762y45ujc.fsf@gmail.com \
    --to=schulte.eric@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=giorgio_v@me.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).