emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Bjarte Johansen <bjarte.johansen@gmail.com>
To: Nicolas Goaziou <mail@nicolasgoaziou.fr>
Cc: emacs-orgmode@gnu.org
Subject: Re: [PATCH] ob-core: Fix indented cached result returning nil
Date: Sun, 24 May 2015 13:41:43 +0200	[thread overview]
Message-ID: <5D24CB16-27B8-4958-8CF2-2379BB403884@gmail.com> (raw)
In-Reply-To: <097CB8A0-2986-41D5-A6E8-F188170606C7@gmail.com>


> On 24 May 2015, at 11:53, Bjarte Johansen <bjarte.johansen@gmail.com> wrote:
> 
> 
>> On 24 May 2015, at 11:49, Bjarte Johansen <bjarte.johansen@gmail.com> wrote:
>> 
>> 
>>> On 23 May 2015, at 21:50, Nicolas Goaziou <mail@nicolasgoaziou.fr> wrote:
>>> 
>>> Bjarte Johansen <bjarte.johansen@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

  reply	other threads:[~2015-05-24 11:41 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-21 10:38 [PATCH] ob-core: Fix indented cached result returning nil Bjarte Johansen
2015-05-23 19:50 ` Nicolas Goaziou
2015-05-24  9:49   ` Bjarte Johansen
2015-05-24  9:53     ` Bjarte Johansen
2015-05-24 11:41       ` Bjarte Johansen [this message]
  -- strict thread matches above, loose matches on Subject: below --
2015-05-24 11:42 Bjarte Johansen
2015-05-26  8:20 ` Nicolas Goaziou
2015-05-20 15:22 Bjarte Johansen
2015-05-20 22:19 ` Nicolas Goaziou
2015-05-21 10:34   ` Bjarte Johansen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5D24CB16-27B8-4958-8CF2-2379BB403884@gmail.com \
    --to=bjarte.johansen@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=mail@nicolasgoaziou.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).