emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Orgmode] Re: disable automatic source block evaluation but allow manual


From: Sébastien Vauban
Subject: [Orgmode] Re: disable automatic source block evaluation but allow manual
Date: Thu, 16 Dec 2010 15:43:46 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (windows-nt)

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]