emacs-orgmode
[Top][All Lists]
Advanced

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

Re: Get =#+RESULTS= without re-evaluating source code block?


From: Nick Dokos
Subject: Re: Get =#+RESULTS= without re-evaluating source code block?
Date: Tue, 02 Feb 2021 15:02:08 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

John Kitchin <jkitchin@andrew.cmu.edu> writes:

> I discovered that it matters a lot which block you cache. You have to
> cache the long running block. I had put cache on the block with noweb
> expansion, and then the long running block still runs every time. That
> was a surprise to me, since nothing was changing in that block, so I
> thought it would just use the cached result.
>

Just to elaborate a bit: Org mode checks whether to reevaluate a cached block
by checksumming it and seeing if the sum is different from before. That's why
you have to mark the actual block for caching, not its callers.

-- 
Nick

"There are only two hard problems in computer science: cache
invalidation, naming things, and off-by-one errors." -Martin Fowler




reply via email to

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