From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?utf-8?Q?S=C3=A9bastien_Vauban?= Subject: Re: disable automatic source block evaluation but allow manual Date: Thu, 16 Dec 2010 15:43:46 +0100 Message-ID: <801v5hvkv1.fsf@missioncriticalit.com> References: <4D09D2EF.8070309@med.uni-goettingen.de> <807hfaaw14.fsf@missioncriticalit.com> <4D0A1D59.3080907@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org-mXXj517/zsQ@public.gmane.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org-mXXj517/zsQ@public.gmane.org To: emacs-orgmode-mXXj517/zsQ@public.gmane.org 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 o= ne. >> >> 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 alw= ays 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 on= ce 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 (o= nly keeping it, once, in the export hook)? Best regards, Seb --=20 S=C3=A9bastien 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