From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Schulte Subject: Re: [PATCH] * lisp/ob-core.el (org-babel-execute-src-block): insert hash for silent results Date: Fri, 08 Mar 2013 15:07:07 -0700 Message-ID: <87d2v9sfuw.fsf@gmail.com> References: <1362542863-25992-1-git-send-email-aaronecay@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:47244) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UE5US-0005X5-Q0 for emacs-orgmode@gnu.org; Fri, 08 Mar 2013 17:10:17 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UE5UL-0007zI-8G for emacs-orgmode@gnu.org; Fri, 08 Mar 2013 17:10:12 -0500 Received: from mail-da0-x22d.google.com ([2607:f8b0:400e:c00::22d]:46151) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UE5UL-0007x0-26 for emacs-orgmode@gnu.org; Fri, 08 Mar 2013 17:10:05 -0500 Received: by mail-da0-f45.google.com with SMTP id v40so217045dad.32 for ; Fri, 08 Mar 2013 14:10:03 -0800 (PST) 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: Aaron Ecay Cc: emacs-orgmode@gnu.org Aaron Ecay writes: > On Tue, Mar 5, 2013 at 11:07 PM, Aaron Ecay wrote: >> In order for the cache feature to work, the hash of a finished >> computation must be inserted. But, this is not currently done for src >> blocks which have the option :results none. Thus, we should insert a >> dummy empty result for these blocks, which will hold the hash. >> --- >> lisp/ob-core.el | 5 ++++- >> 1 file changed, 4 insertions(+), 1 deletion(-) >> >> diff --git a/lisp/ob-core.el b/lisp/ob-core.el >> index 3b7c463..eabfc05 100644 >> --- a/lisp/ob-core.el >> +++ b/lisp/ob-core.el >> @@ -576,7 +576,10 @@ block." >> (if (member "none" result-params) >> (progn >> (funcall cmd body params) >> - (message "result silenced")) >> + (message "result silenced") >> + (when cachep > > The above should be cache-p (with hyphen). > The hyphen should only be required for multi-word functions, e.g., `listp' has no hyphen but `hash-table-p' does have a hyphen. > >> + (org-babel-insert-result >> + "" result-params info new-hash indent lang))) >> (setq result >> ((lambda (result) >> (if (and (eq (cdr (assoc :result-type params)) 'value) >> -- >> 1.8.1.5 >> > -- Eric Schulte http://cs.unm.edu/~eschulte