Dan Davison <dandavis...@gmail.com> writes: > Loris Bennett <loris.benn...@fu-berlin.de> writes: > >> Erik Iverson <er...@ccbr.umn.edu> writes: >> >>> Loris Bennett wrote: >>>> Hi, >>>> >>>> I have an org file containing several src blocks which generate images >>>> using ditaa. When I publish to PDF via LaTeX, the images are all >>>> generated every time, which makes publishing rather slow. >>>> >>>> Is there some way to toggle the evaluation of the src blocks on and off >>>> when the file is published? >>>> >>> >>> You could try the :cache header argument, http://orgmode.org/org.html#cache >>> >> >> Ah, thanks. There is a slight gotcha here, though. >> >> I added :cache yes to the source headers and exported again, but nothing >> changed; all the images were generated again. Also, no SHA1 hash was >> added to the +results header. >> >> After some fruitless fiddling I was about to write to the list again and >> moan, when I did a slightly random C-c C-c in the begin_src line and, >> hey presto, the hash was added to the results header. I then did this >> for all the images and found that the image were no longer regenerated >> on export, as advertised. > > Hi Loris, > > Yes. It does seem that it would be nice if in this situation, the first > export added the SHA1s, and subsequent exports recognized that > evaluation wasn't required. I think the reason this does not happen is > that behind-the-scenes Org makes a copy of the buffer for export > preprocessing (including src block evaluation). But Eric S is the expert > -- he may have more to say here. >
Yes, this is exactly the case. Org-mode is very careful that the process of exporting does not make any permanent changes to the original org-mode file. I agree this should be mentioned in the :cache documentation. Best -- Eric _______________________________________________ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode