emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* cached tangling
@ 2013-06-03 17:34 Jeffrey Brent McBeth
  0 siblings, 0 replies; only message in thread
From: Jeffrey Brent McBeth @ 2013-06-03 17:34 UTC (permalink / raw)
  To: emacs-orgmode

I have not been able to find a way to cache the results of a tangle.
I typically have a date+tree with lots of "code" snippets for ledger.  I'm giving an example code snippet below

* 2013 :noexport:
** 2013-05 May
*** 2013-05-23 Thursday
#+name: foo
#+begin_src ledger
2013-05-23 * Silly Stuff
 Expenses:Time Waster  $42
 Assets:Bank
#+end_src
*** 2013-05-24 Friday
#+name: foo
#+begin_src ledger
2013-05-24 * More Dumb Spending
 Expenses:Time Waster  $69
 Assets:Cash
#+end_src
#+name: bar
#+begin_src ledger
2013-05-24 * Business Stuff
 Expenses:BB Stacking  $11.38
 Assets:Business:Checking
#+end_src

* Results
** Nothing :noexport:
#+name: everything
#+begin_src ledger
<<foo>>
<<bar>>
#+end_src
** Balance
#+name: exampleBalance
#+begin_src ledger :cmdline balance :noweb yes :exports results
<<everything>>
#+end_src     
** Register
#+name: exampleRegister
#+begin_src ledger :cmdline reg :noweb yes :exports results
<<everything>>
#+end_src
** Just Bank
#+name: exampleBalanceBank
#+begin_src ledger :cmdline balance Bank :noweb yes :exports results
<<everything>>
#+end_src

What I'm wondering is if there is a way to get babel to tangle the named block "everything" once, and then run all the ledger commands on that one file.  Maybe it already does it, and I'm a fool, but it from a visceral timing perspective it feels like it is in serial tangling, running ledger, inserting the text, deleting the results of the tangle, then rinsing and repeating.

If the secret is to rearrange how I do things, I'm happy to do that a little bit.
-- 
"The man who does not read good books has no advantage over 
 the man who cannot read them."
 -- Mark Twain

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2013-06-03 17:45 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-03 17:34 cached tangling Jeffrey Brent McBeth

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).