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