> On 24 May 2015, at 11:53, Bjarte Johansen <bjarte.johan...@gmail.com> wrote: > > >> On 24 May 2015, at 11:49, Bjarte Johansen <bjarte.johan...@gmail.com> wrote: >> >> >>> On 23 May 2015, at 21:50, Nicolas Goaziou <m...@nicolasgoaziou.fr> wrote: >>> >>> Bjarte Johansen <bjarte.johan...@gmail.com> writes: >>> >>>> Fix a problem where a source block would return nil oif the result was >>>> cached and it was indented. >>> >>> Thank you. >>> >>> However, the test you provide fails. I suggest to create "test.txt" in >>> `temporary-file-directory' instead of `default-directory'. >>> >>> Regards, >> >> >> Ah, it was not supposed to actually run the code in the source block; only >> get the cached result. I might know an easier test of it. I’ll send a >> revised version later. > > Actually, I saw now that it should be (message “test.txt”), notice the added > extension. The hash is also therefore most likely wrong. I will fix it.
No, this was wrong. I have a more robust fix and do as you suggest. Create the file in temporary-file-directory and run the execution of the source block twice to get the cache. This way, if org-mode changes its hashing function later, the test will still work. Sending the patch shortly. Regards, Bjarte