emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: <tomas@tuxteam.de>
To: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: :cache and :results drawer don't get along?
Date: Thu, 6 Sep 2018 20:01:40 +0200	[thread overview]
Message-ID: <20180906180139.GB28172@tuxteam.de> (raw)

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

Hi, Org gurus

I'm using Org 9.1.9, as it comes with Emacs 27.0.50, freshly compiled
from sources.

I'm having a hard time referencing a cached result when it's in
a drawer (I like to wrap my results in a drawer).

Before I file a bug report, I'd make sure that I am not doing
something obviously stupid.

Best with an example:

* with drawer
  No cache, with drawer:

  #+NAME: with-drawer
  #+BEGIN_SRC emacs-lisp :results drawer
  42
  #+END_SRC

  #+RESULTS: with-drawer
  :RESULTS:
  42
  :END:

  #+NAME: check-with-drawer
  #+BEGIN_SRC emacs-lisp :var thing=with-drawer
  thing
  #+END_SRC

  #+RESULTS: check-with-drawer
  : 42

  So far, so good

* drawer and cache:
  Cached results in a drawer:

  #+NAME: cached-with-drawer
  #+BEGIN_SRC emacs-lisp :results drawer :cache yes
  42
  #+END_SRC

  #+RESULTS[4ba2e4b62c57298395b2f6f8d145dcc85264d192]: cached-with-drawer
  :RESULTS:
  42
  :END:

  #+NAME: check-cached-with-drawer
  #+BEGIN_SRC emacs-lisp :var thing=cached-with-drawer
  thing
  #+END_SRC

  #+RESULTS: check-cached-with-drawer
  : nil

Note how the variable is nil. I tested also :cache yes _without_ a
drawer, and then it works as expected.

Am I doing something stupid?

Thanks for any insights
-- tomás

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

                 reply	other threads:[~2018-09-06 18:01 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20180906180139.GB28172@tuxteam.de \
    --to=tomas@tuxteam.de \
    --cc=emacs-orgmode@gnu.org \
    /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).