From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeffrey Brent McBeth Subject: Re: Tips for using orgmode + ledger to record events? Date: Fri, 1 Mar 2013 09:17:29 -0500 Message-ID: <20130301141728.GI14738@broggs.org> References: <87r4jzy09c.fsf@ucl.ac.uk> <87y5e72rj4.fsf@pinto.chemeng.ucl.ac.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([208.118.235.92]:49787) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UBQmY-00006z-IH for emacs-orgmode@gnu.org; Fri, 01 Mar 2013 09:17:57 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UBQmV-0003UK-Mp for emacs-orgmode@gnu.org; Fri, 01 Mar 2013 09:17:54 -0500 Received: from hrndva-omtalb.mail.rr.com ([71.74.56.122]:30080) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UBQmV-0003Te-Hy for emacs-orgmode@gnu.org; Fri, 01 Mar 2013 09:17:51 -0500 Received: from williwaw ([10.0.1.2]) by broggs.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.76) (envelope-from ) id 1UBQmR-00010O-4t for emacs-orgmode@gnu.org; Fri, 01 Mar 2013 09:17:49 -0500 Received: from mcbeth by williwaw with local (Exim 4.80) (envelope-from ) id 1UBQm9-0002cC-0o for emacs-orgmode@gnu.org; Fri, 01 Mar 2013 09:17:29 -0500 Content-Disposition: inline In-Reply-To: <87y5e72rj4.fsf@pinto.chemeng.ucl.ac.uk> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org On Fri, Mar 01, 2013 at 01:11:59PM +0000, Eric S Fraga wrote: > Harum Budi writes: > > > I was not being clear at all, sorry. Let me rephrase, but bear with me as > > English is my secondary language. > > That's fine! > > I think I understand what you want. My view would be to avoid having > two files, an org one and a ledger one, and instead combine them into an > org file. You could create log capture templates for different kinds of > activities and one of these could be financial. This latter one could > create a ledger src block that is automatically tangled to the full > ledger file consisting of all such entries. This is why I showed the > ledger src blocks in my previous email. > > A financial entry could be > > ,---- > | * [2013-03-01 Fri] Bought a sandwich :food: > | #+begin_src ledger :tangle "finances.ledger" > | 2013/03/01 Bought a sandwich > | expenses £3.50 > | cash > | #+end_src > `---- > > or something similar... You could still grep on headings but actually > tag searching would be better of course. I'm doing something rather similar with Ledger, and it all works really well unless I want to export to HTML, in which case I've had to increase the max lisp eval depth about once a week lately (setq max-lisp-eval-depth 2400) I'm assuming I'm doing something wrong there. The datetree is not exported, but reports are (I have an example of a report below): #+name: savingscheckingsummary #+begin_src ledger :cmdline balance esl:check savings -p "until tomorrow" :nowe$ <> <> <> <> <> #+end_src I find the noweb tangling to work really well for my purposes, and in particular subsetting which bits I want exported to Ledger. I've also included an example capture template (setq org-capture-templates (append '(("l" "Ledger entries") ("lc" "Bank:Checking" plain (file+datetree+prompt "~/Documents/Ledger.org") " #+name: checking #+begin_src ledger %(org-read-date) * %^{Payee} Expenses:%^{Account} %^{Amount} Assets:Bank:Checking #+end_src ")))) -- "The man who does not read good books has no advantage over the man who cannot read them." -- Mark Twain