From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Sebastien Vauban" Subject: Re: [PATCH] * lisp/ob-core.el (org-babel-execute-src-block): insert hash for silent results Date: Sun, 10 Mar 2013 21:14:13 +0100 Message-ID: <86d2v7108a.fsf@somewhere.org> References: <1362542863-25992-1-git-send-email-aaronecay@gmail.com> <87obetsgma.fsf@Rainer.invalid> <877glhsfus.fsf@gmail.com> <87k3phs84b.fsf@Rainer.invalid> <87ip50qv36.fsf@gmail.com> <87y5dvocw5.fsf@Rainer.invalid> Mime-Version: 1.0 Content-Type: text/plain Return-path: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org-mXXj517/zsQ@public.gmane.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org-mXXj517/zsQ@public.gmane.org To: emacs-orgmode-mXXj517/zsQ@public.gmane.org Achim, Eric, Achim Gratz wrote: > Eric Schulte writes: >> A hash marks a *result* with an indication of what was used to generate >> it (code block & parameters). The point of a hash is to allow the >> result to be returned without having to re-execute. For this reason, I >> think that the hash should live with the result. > > Here Babel is assuming a very specific execution model, namely a > functional one (a function with the same parameters always delivers the > same results, so if you see the same function invoked with the same > parameters you can just substitute the result from an earlier > invocation). Babel isn't a functional language however, so it is both > possible and done in practice to use it for side-effects or even > side-effects only. > > But back to my earlier remark about the hash value actually being a > signature of the source block and not the result. If I use noweb > references, the reference text is cached, not its expansion. Well seen... I wouldn't have thought of that... A more general question: shouldn't cache be unusable (generate an error) when there is a session? In the presence of a session, I've the impression that caching results is always wrong. Who knows its contents before executing the code, in the next Emacs session? Best regards, Seb -- Sebastien Vauban