[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Orgmode] Re: disable automatic source block evaluation but allow ma
From: |
Eric Schulte |
Subject: |
Re: [Orgmode] Re: disable automatic source block evaluation but allow manual |
Date: |
Thu, 16 Dec 2010 07:54:21 -0700 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) |
Sébastien Vauban <address@hidden> writes:
>>> 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.
>>
>>
>
> 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)?
Yes, this should be possible through setting the :cache header argument
on a buffer-wide basis, and calling `org-babel-execute-buffer' with a
prefix argument (which forces re-evaluation in the face of caching).
(add-hook 'org-export-first-hook (lambda () (org-babel-execute-buffer t)))
Best -- Eric