emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Sébastien Vauban" <wxhgmqzgwmuf-geNee64TY+gS+FvcfC7Uqw@public.gmane.org>
To: emacs-orgmode-mXXj517/zsQ@public.gmane.org
Subject: Re: disable automatic source block evaluation but allow manual
Date: Thu, 16 Dec 2010 15:43:46 +0100	[thread overview]
Message-ID: <801v5hvkv1.fsf@missioncriticalit.com> (raw)
In-Reply-To: 4D0A1D59.3080907@gmail.com

Hi Rainer and Eric,

Rainer M Krug wrote:
>> Here the distinction (or view) of what the org file is comes in: as you see
>> it, the org-file is a *usable result* in itself and already the *final
>> product*. Then, it *has* to reflect (and be identical to) the exported one.
>>
>> If, on the other hand, I see the org file as a *source*, equivalent to
>> source code, the final product is what I get when I export (or compile)
>> - then it is irrelevant if the results in the org file are up to date or
>> not - they could be seen as an *illustration* or an *example* on how the
>> final results will look. This is how I see it.
>>
>> But I can completely understand, why you would like to have your org-file
>> as an up-to-date document in its own right.

Yes, I view the Org as a result per se. "In situ execution" makes me think
that way: I always see the results blocks in the Org itself, and almost always
export "both" (the code and the results).


>> I guess one possibility would be to have a header argument
>> (update-results-when-exporting) which, if set, would update all results
>> in the org buffer and export then.
>
> This can also be accomplished using an export hook.  e.g.
>
> (add-hook 'org-export-first-hook 'org-babel-execute-buffer)

Thanks Eric for this. Though it is not yet *exactly* what I meant: here,
buffer is executed twice, once just before exporting (thru the hook) and once
when exporting.

Hence:

- The results still may defer: date example that I gave previously in this
  thread, but as well results of SQL code execution that would have
  side-effects, etc... Not completely in sync'.

- Regarding performance, it consumes twice as much time...

Would it be possible, then, to avoid executing the buffer when exporting (only
keeping it, once, in the export hook)?

Best regards,
  Seb

-- 
Sébastien Vauban


_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode-mXXj517/zsQ@public.gmane.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

  parent reply	other threads:[~2010-12-16 14:43 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-16  8:50 disable automatic source block evaluation but allow manual Andreas Leha
2010-12-16  9:48 ` Sébastien Vauban
2010-12-16 13:48   ` Andreas Leha
2010-12-16 14:08   ` Rainer M Krug
2010-12-16 14:16     ` Eric Schulte
2010-12-16 14:43     ` Sébastien Vauban [this message]
2010-12-16 14:54       ` Eric Schulte
2010-12-16 13:23 ` 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=801v5hvkv1.fsf@missioncriticalit.com \
    --to=wxhgmqzgwmuf-genee64ty+gs+fvcfc7uqw@public.gmane.org \
    --cc=emacs-orgmode-mXXj517/zsQ@public.gmane.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).