Ignacio Casso <[email protected]> writes: >> I do not think that always printing is a good idea. >> Imagine code block being called as a dependency from another file. >> This will be very surprising that evaluating a code in one file will >> lead to modifications in another file. > > Ok, but I still think that doing the change too early is risky without > understanding the code well, so I would discard my initial variable > proposal. Instead, what about a variable that already applies only to > cached blocks? If the value is nil (default) everything will behave as > usual. If the value is non-nil, org-babel will always print the results > of a block with :cache yes regardless or how it's executed. This will > cover the case where it's executed as a dependency of another block, > which is what we care about. I don't know what other cases could there > be, but I guess the DWIM argument from my previous email will apply for > them too, and as long as it's behind a custom variable it would not > really matter if we find some potential caveat later, right?
Maybe. I am looking into this again, and, while browsing through the code, I found 'org-babel-update-intermediate'. It is even more broad, but should cover your purposes, I think. -- Ihor Radchenko // yantar92, Org mode maintainer, Learn more about Org mode at <https://orgmode.org/>. Support Org development at <https://liberapay.com/org-mode>, or support my work at <https://liberapay.com/yantar92>
