From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bjarte Johansen Subject: Re: [PATCH] ob-core: Fix indented cached result returning nil Date: Sun, 24 May 2015 13:41:43 +0200 Message-ID: <5D24CB16-27B8-4958-8CF2-2379BB403884@gmail.com> References: <1432204686-41096-1-git-send-email-bjarte.johansen@gmail.com> <878ucff4za.fsf@nicolasgoaziou.fr> <61C96A28-0057-418A-A7AE-300A78A5C8E9@gmail.com> <097CB8A0-2986-41D5-A6E8-F188170606C7@gmail.com> Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2098\)) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:36340) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YwUHv-0002Ul-Pq for emacs-orgmode@gnu.org; Sun, 24 May 2015 07:41:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YwUHq-0001z2-Q0 for emacs-orgmode@gnu.org; Sun, 24 May 2015 07:41:51 -0400 Received: from mail-la0-x236.google.com ([2a00:1450:4010:c03::236]:36314) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YwUHq-0001yw-I6 for emacs-orgmode@gnu.org; Sun, 24 May 2015 07:41:46 -0400 Received: by lagv1 with SMTP id v1so35389720lag.3 for ; Sun, 24 May 2015 04:41:45 -0700 (PDT) In-Reply-To: <097CB8A0-2986-41D5-A6E8-F188170606C7@gmail.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Nicolas Goaziou Cc: emacs-orgmode@gnu.org > On 24 May 2015, at 11:53, Bjarte Johansen = wrote: >=20 >=20 >> On 24 May 2015, at 11:49, Bjarte Johansen = wrote: >>=20 >>=20 >>> On 23 May 2015, at 21:50, Nicolas Goaziou = wrote: >>>=20 >>> Bjarte Johansen writes: >>>=20 >>>> Fix a problem where a source block would return nil oif the result = was >>>> cached and it was indented. >>>=20 >>> Thank you.=20 >>>=20 >>> However, the test you provide fails. I suggest to create "test.txt" = in >>> `temporary-file-directory' instead of `default-directory'. >>>=20 >>> Regards, >>=20 >>=20 >> 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=E2=80=99l= l send a revised version later. >=20 > Actually, I saw now that it should be (message =E2=80=9Ctest.txt=E2=80=9D= ), 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=