Auto-complete with Ledger.el in Emacs.

143 views
Skip to first unread message

Ian Barton

unread,
Mar 30, 2011, 1:34:22 PM3/30/11
to ledge...@googlegroups.com
One feature I very much like is the tab auto-completion of account names. I am guessing that this is accomplished by reading account names from the current file when it's loaded. I like to keep my accounts in a separate file for each month, as I find this make reconciling easier. However, this means that in January I might have:

  2011/03/25 Microsoft   *Xbox     Luxembourg            
    expenses:gifts   £8.50
    assets:bank:igb

In February I might buy another game for ,my son but was it expenses;gifts, or expenses:presents? Of course I could open my January file and check, but inevitably I end up with different labels for the same thing and need to go back and make corrections. Is it possible to define a list of accounts and somehow !Include it in a ledger file, so that I get the same tab completion options in all my ledger files. Hope I have explained that clearly.

Ian.

John Wiegley

unread,
Mar 30, 2011, 2:15:02 PM3/30/11
to ledge...@googlegroups.com
Ian Barton <i...@wilkesley.com> writes:

> In February I might buy another game for ,my son but was it expenses;gifts,
> or expenses:presents? Of course I could open my January file and check, but
> inevitably I end up with different labels for the same thing and need to go
> back and make corrections. Is it possible to define a list of accounts and
> somehow !Include it in a ledger file, so that I get the same tab completion
> options in all my ledger files. Hope I have explained that clearly.

Right now ledger.el only reads the text in the current file. You could put
a dummy transaction at the top which transfer zero dollars among a bunch of
accounts. But I'll make a note that it should follow file inclusions to
determine the complete set of account names.

John

Ian Barton

unread,
Mar 30, 2011, 4:55:10 PM3/30/11
to ledge...@googlegroups.com
Thanks John. I'll use the dummy postings for now.

Best wishes,

Ian.

Reply all
Reply to author
Forward
0 new messages