emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Giorgio Valoti <giorgio_v@me.com>
To: emacs-orgmode@gnu.org
Subject: Re: Re: Include files to be used in literate programming
Date: Mon, 13 Sep 2010 17:17:52 +0200	[thread overview]
Message-ID: <EBF0B47D-4CC4-4E53-9231-8F23DF3A9941@me.com> (raw)
In-Reply-To: <87fwxdhktn.fsf@stats.ox.ac.uk>


Il giorno 13/set/2010, alle ore 14.47, Dan Davison ha scritto:

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

  reply	other threads:[~2010-09-13 15:18 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 [this message]
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

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=EBF0B47D-4CC4-4E53-9231-8F23DF3A9941@me.com \
    --to=giorgio_v@me.com \
    --cc=emacs-orgmode@gnu.org \
    /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).