emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Charles C. Berry" <ccberry@ucsd.edu>
To: "Ulrich J. Herter" <ujh@posteo.de>
Cc: emacs-orgmode@gnu.org
Subject: Re: code blocks: update cache hash on export
Date: Tue, 18 Oct 2016 09:01:03 -0700	[thread overview]
Message-ID: <alpine.OSX.2.20.1610180848030.605@charles-berrys-macbook.local> (raw)
In-Reply-To: <1476792042.1576.15.camel@posteo.de>

On Tue, 18 Oct 2016, Ulrich J. Herter wrote:

> Hi everybody!
>
> Two questions I'd like to ask the Org-community:
??
> First:
> When I export my document, the source blocks with outdated cache hashes
>     run, but no new hashes are put in the document.

Right. The exporter runs in a buffer copy, so the original is not modified.

>
> I would like to have the hashes updated when the run on export, so next
> time I export the don't need to be evaluated. This would save a lot
> quite some time!
>
> Is there a switch I missed, or any way to get this behaviour?

Run org-babel-execute-buffer (or org-babel-execute-subtree) before you 
export.

>
>
> Second:
> Is there a function to get the hash of a #+CALL:-block? C-c C-v a ()
> doesn't work there.
>

`org-babel-current-result-hash' does this. It is not interactive, so if 
you want to query the value interactively, you need

  M-: (org-babel-current-result-hash)

with point in the CALL line. Or roll it into an interactive function of 
your own.

`org-ctrl-c-ctrl-c' will get the value if point is just before the hash.

HTH,

Chuck

  reply	other threads:[~2016-10-18 16:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-18 12:00 code blocks: update cache hash on export Ulrich J. Herter
2016-10-18 16:01 ` Charles C. Berry [this message]
2016-10-19  7:33   ` Ulrich J. Herter
2016-10-19 10:59   ` Ulrich J. Herter

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=alpine.OSX.2.20.1610180848030.605@charles-berrys-macbook.local \
    --to=ccberry@ucsd.edu \
    --cc=emacs-orgmode@gnu.org \
    --cc=ujh@posteo.de \
    /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).