Hi, Eric --

On Fri, 28 Oct 2011, Eric S Fraga wrote:
> Org mode has a sub-system known as babel which allows for literate
> programming.  This allows you to mix text and code within the same
> document and automatically execute code which may generate results which
> will then appear in the text.

Thanks for this message, Eric.

I've played around with babel a bit and I'd even worked through your
tutorial for using ledger with org mode. But I think I must be
misunderstanding something. When I put my ledger file (~30K lines) in a
src block, I can run the reports as you suggest. That's cool. But editing
the file is painfully slow -- as much as 3 or 4 seconds lag time between
key presses and characters appearing on the screen. Executing a
babel/ledger command also indents all of the ledger entries a couple of
spaces, and then commands run on the ledger file from the command line
don't recognize the entries as ledger entries. (Reports generated from
within src blocks are produced just fine.) I suspect it's operator error,
but I've not figured it out.

I spend virtually all of my time in emacs, too -- even though I'm a
humanities academic and definitely *not* a programmer -- but I input
ledger entries using ledger.el and generate reports from there using
report queries stored in my .emacs file. Here's an example from my .emacs:

("checking future" "ledger -d 'd>=[this month]' -F '%10(date) %6(code) 
%-.40(payee) %14(amount) %14(display_total)\n' reg checking") 

I also have bash scripts that generate daily emails with some budget
information and also a more complete budget report in a pdf. I'm intrigued
by TR's approach -- it hadn't occurred to me to put bash scripts in babel
src blocks. I'm playing around with that now.

-- 
John Rakestraw

Reply via email to