From: Jeffrey Brent McBeth <mcbeth@broggs.org>
To: emacs-orgmode@gnu.org
Subject: cached tangling
Date: Mon, 3 Jun 2013 13:34:48 -0400 [thread overview]
Message-ID: <20130603173448.GM6567@broggs.org> (raw)
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
reply other threads:[~2013-06-03 17:45 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=20130603173448.GM6567@broggs.org \
--to=mcbeth@broggs.org \
--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).