emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Orgmode] Orgmode for budgeting/expense recording


From: Eric S Fraga
Subject: Re: [Orgmode] Orgmode for budgeting/expense recording
Date: Fri, 02 Oct 2009 14:21:35 +0100
User-agent: Wanderlust/2.15.6 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (Gojō) APEL/10.7 Emacs/23.1 (i486-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO)

At Fri, 02 Oct 2009 11:55:22 +0100,
Eric S Fraga wrote:
> It would be interesting to see a org-babel interface to ledger...
> what ledger is missing, in the context of emacs, is an easy way to see
> the actual output of the ledger command (e.g. bal or reg) while
> looking at the ledger file.

okay, interesting enough that I've done a first attempt (good enough
for what I need but probably incredibly clumsy elisp code as I'm
really not an elisp programmer...).  Attached is org-babel-ledger.el
which works with this simple example ledger:

--8<---------------cut here---------------start------------->8---
#+begin_src ledger :results output :cmdline -s bal
2009/09/30 salary
  account:bank       £2000.00
  income:salary
2009/10/01 rent
  payee:landlord     £ 500.00
  account:bank
#+end_src ledger
--8<---------------cut here---------------end--------------->8---

If you change "-s bal" to "reg" you get a register output, for
instance.  I have no idea what happens if you try some of the esoteric
ledger commands but I only tend to use bal and reg with various
arguments...

Works on Debian linux with emacs 23 and most recent org and org-babel.

The definitely clumsy code is in extracting the output of the ledger
command so any input would be more than welcome!

Oh, use by (require 'org-babel-ledger) as per the other languages...

Thanks,
eric

Attachment: org-babel-ledger.el
Description: Binary data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]