about | blog | config | notes | github

1. Ledger: Double-Entry Accounting System

Ledger is a command line double-entry accounting tool for Plain Text Accounting.

2. Useful Resources

3. Tips and Tricks

4. Package Install

The following package provides a dedicated mode for editing ledger files with GNU/Emacs.

(use-package ledger-mode
  :mode ("\\.journal\\'")
  :hook (ledger-mode . outline-minor-mode)
  (ledger-clear-whole-transaction 1)
  (ledger-mode-should-check-version t)
  (ledger-report-use-header-line t))

Configure my default report views.

(setq ledger-reports
   `(("Balance Sheet"
      "%(binary) balance --real [[ledger-mode-flags]] -f %(ledger-file) ^assets ^liabilities ^equity")
     ("Net Worth"
      "%(binary) cleared --real [[ledger-mode-flags]] -f %(ledger-file) ^assets ^liabilities")
     ("Net Worth (Virtual)"
      "%(binary) cleared [[ledger-mode-flags]] -f %(ledger-file) ^assets ^liabilities ^virtual:budget ^virtual:savings")
      "%(binary) balance [[ledger-mode-flags]] -f %(ledger-file) ^virtual:budget")
      "%(binary) balance [[ledger-mode-flags]] -f %(ledger-file) ^virtual:savings")
     ("Uncleared Transactions"
      "%(binary) register --real [[ledger-mode-flags]] -f %(ledger-file) --uncleared")
     ("Account Statement"
      "%(binary) register --real [[ledger-mode-flags]] -f %(ledger-file) ^%(account)")
     ("Account Statement (Virtual)"
      "%(binary) register [[ledger-mode-flags]] -f %(ledger-file) ^%(account)")
     ("Payee Statement"
      "%(binary) register --real [[ledger-mode-flags]] -f %(ledger-file) ^%(payee)")

Make sure to provide the module.

(provide 'init-ledger)

Created: 2021-11-13

Emacs 26.1 (Org mode 9.5)