all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Issue with :cache yes
@ 2016-10-26  5:49 Dushyant Juneja
  2016-10-26  7:37 ` Ulrich J. Herter
  0 siblings, 1 reply; 3+ messages in thread
From: Dushyant Juneja @ 2016-10-26  5:49 UTC (permalink / raw)
  To: emacs-orgmode@gnu.org

[-- Attachment #1: Type: text/plain, Size: 1770 bytes --]

Hi,

I have an org file (as below) with pre-computed outputs already available
in the RESULTS drawer:

######################################################
#+OPTIONS: ':t *:t -:t ::t <:t H:3 \n:nil ^:{} arch:headline author:t
#+OPTIONS: c:nil creator:nil d:(not "LOGBOOK") date:t e:t email:nil
#+OPTIONS: f:t inline:t num:t p:nil pri:nil prop:nil stat:t tags:t
#+OPTIONS: tasks:t tex:t timestamp:t title:t toc:nil todo:t |:t
#+TITLE: Using cache in org-babel
#+DATE: <2016-10-26 Wed>
#+AUTHOR: Dushyant.Juneja
#+EMAIL: djuneja@djuneja-vd1
#+LANGUAGE: en
#+SELECT_TAGS: export
#+EXCLUDE_TAGS: noexport
#+CREATOR: Emacs 25.1.1 (Org mode 8.3.6)
# PROPERTY: cache yes

Trying to use cache in org mode.
#+name: execBlk1
#+BEGIN_SRC sh :shebang #!/bin/sh :var args="defVal" :exports results
:results verbatim :cache yes
date
sleep 30
echo $args
date

#+END_SRC

#+RESULTS[69b2da29c266b8bb5157905519c7afe157575196]: execBlk1
: Wed Oct 26 11:10:11 IST 2016
: defVal
: Wed Oct 26 11:10:41 IST 2016

* New Heading
#+call: execBlk1( "newHeading" ) :cache yes

#+RESULTS[b49b6acbaa204c4bff632070f1e0a1b686b7a8e2]:
: Wed Oct 26 11:12:01 IST 2016
: newHeading
: Wed Oct 26 11:12:31 IST 2016
######################################################

However, when I try to export it to ascii (C-c C-e t A), I get the
following error:

######################################################
org-babel-exp process sh at line 16...
mapcar: Wrong type argument: listp, "args=\"newHeading\""
######################################################

Is there something wrong in my use-model? I am basically trying to avoid
re-evaluating code blocks during export, if I already have them evaluated
in my buffer.

This happens with #+PROPERTY: cache yes as well as in-line :cache yes

Dushyant

[-- Attachment #2: Type: text/html, Size: 2587 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Issue with :cache yes
  2016-10-26  5:49 Issue with :cache yes Dushyant Juneja
@ 2016-10-26  7:37 ` Ulrich J. Herter
  2016-10-26  9:17   ` Dushyant Juneja
  0 siblings, 1 reply; 3+ messages in thread
From: Ulrich J. Herter @ 2016-10-26  7:37 UTC (permalink / raw)
  To: emacs-orgmode

Hi,

Am Mittwoch, den 26.10.2016, 05:49 +0000 schrieb Dushyant Juneja:
> * New Heading
> #+call: execBlk1( "newHeading" ) :cache yes

Shouldn't it be #+call: execBlk1( args="newHeading" ) at this point?

> 
> However, when I try to export it to ascii (C-c C-e t A), I get the
> following error:
> 
> ######################################################  
> org-babel-exp process sh at line 16...
> mapcar: Wrong type argument: listp, "args=\"newHeading\""
> ######################################################  
> 
> Is there something wrong in my use-model? I am basically trying to
> avoid re-evaluating code blocks during export, if I already have them
> evaluated in my buffer.

I cannot reproduce your issue on org release_8.3.6-1246-g359afa.dirty.
May be you can try running M-x org-babel-execute-buffer before export
to make sure all results are up-to-date.


HTH Uli

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Issue with :cache yes
  2016-10-26  7:37 ` Ulrich J. Herter
@ 2016-10-26  9:17   ` Dushyant Juneja
  0 siblings, 0 replies; 3+ messages in thread
From: Dushyant Juneja @ 2016-10-26  9:17 UTC (permalink / raw)
  To: Ulrich J. Herter, emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 1570 bytes --]

Thanks for the quick response, Uli!

On Wed, Oct 26, 2016 at 1:09 PM Ulrich J. Herter <ujh@posteo.de> wrote:

> Hi,
>
> Am Mittwoch, den 26.10.2016, 05:49 +0000 schrieb Dushyant Juneja:
> > * New Heading
> > #+call: execBlk1( "newHeading" ) :cache yes
>
> Shouldn't it be #+call: execBlk1( args="newHeading" ) at this point?
>

I now get the following error:
mapcar: Wrong type argument: listp, "args=\"newHeading\""

In fact, the error is now stubborn till I remove :cache yes. Where is it
storing the cache?


>
> >
> > However, when I try to export it to ascii (C-c C-e t A), I get the
> > following error:
> >
> > ######################################################
> > org-babel-exp process sh at line 16...
> > mapcar: Wrong type argument: listp, "args=\"newHeading\""
> > ######################################################
> >
> > Is there something wrong in my use-model? I am basically trying to
> > avoid re-evaluating code blocks during export, if I already have them
> > evaluated in my buffer.
>
> I cannot reproduce your issue on org release_8.3.6-1246-g359afa.dirty.
> May be you can try running M-x org-babel-execute-buffer before export
> to make sure all results are up-to-date.
>

My org mode version: Org-mode version 8.3.6 (8.3.6-7-g4d7d52-elpaplus @
/.../.emacs.d/elpa/org-plus-contrib-20161024/)

I see that this is the latest as per my recent package list fetch.

Any ideas?

Further, now I see that this gets evaluated even while export, irrespective
of whether it is already eval'ed or not in the buffer.

Dushyant


>
>
> HTH Uli
>
>
>

[-- Attachment #2: Type: text/html, Size: 3205 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-10-26  9:17 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-26  5:49 Issue with :cache yes Dushyant Juneja
2016-10-26  7:37 ` Ulrich J. Herter
2016-10-26  9:17   ` Dushyant Juneja

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.