all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* code blocks: update cache hash on export
@ 2016-10-18 12:00 Ulrich J. Herter
  2016-10-18 16:01 ` Charles C. Berry
  0 siblings, 1 reply; 4+ messages in thread
From: Ulrich J. Herter @ 2016-10-18 12:00 UTC (permalink / raw)
  To: emacs-orgmode

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.

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?


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


Thanks a lot,
Ulrich

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

* Re: code blocks: update cache hash on export
  2016-10-18 12:00 code blocks: update cache hash on export Ulrich J. Herter
@ 2016-10-18 16:01 ` Charles C. Berry
  2016-10-19  7:33   ` Ulrich J. Herter
  2016-10-19 10:59   ` Ulrich J. Herter
  0 siblings, 2 replies; 4+ messages in thread
From: Charles C. Berry @ 2016-10-18 16:01 UTC (permalink / raw)
  To: Ulrich J. Herter; +Cc: emacs-orgmode

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

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

* Re: code blocks: update cache hash on export
  2016-10-18 16:01 ` Charles C. Berry
@ 2016-10-19  7:33   ` Ulrich J. Herter
  2016-10-19 10:59   ` Ulrich J. Herter
  1 sibling, 0 replies; 4+ messages in thread
From: Ulrich J. Herter @ 2016-10-19  7:33 UTC (permalink / raw)
  To: emacs-orgmode

Am Dienstag, den 18.10.2016, 09:01 -0700 schrieb Charles C. Berry:
> 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
> 
Thanks Chuck, that helps.

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

* Re: code blocks: update cache hash on export
  2016-10-18 16:01 ` Charles C. Berry
  2016-10-19  7:33   ` Ulrich J. Herter
@ 2016-10-19 10:59   ` Ulrich J. Herter
  1 sibling, 0 replies; 4+ messages in thread
From: Ulrich J. Herter @ 2016-10-19 10:59 UTC (permalink / raw)
  To: emacs-orgmode

One more thing:

Am Dienstag, den 18.10.2016, 09:01 -0700 schrieb Charles C. Berry:
> 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)
M-: (org-babel-current-result-hash) returns the hash from the previous
run. What I would need is the new hash which would be inserted after a
new run.

On source block I can get the new hash with M-x org-babel-sha1-hash or
C-c C-c a, but this isn't working on CALL lines. Is there a function
that could do that?

Thanks
Ulrich

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

end of thread, other threads:[~2016-10-19 10:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-18 12:00 code blocks: update cache hash on export Ulrich J. Herter
2016-10-18 16:01 ` Charles C. Berry
2016-10-19  7:33   ` Ulrich J. Herter
2016-10-19 10:59   ` Ulrich J. Herter

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.