From 64efe505036594a9ec439fee0e6385ac5e3995ec Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Wed, 20 Jan 2016 15:02:44 +0100 Subject: Emacs: Add reports to ledger-mode configuration --- tag-emacs/emacs.d/init.org | 34 ++++++++++++++++++++++------------ 1 file changed, 22 insertions(+), 12 deletions(-) (limited to 'tag-emacs') diff --git a/tag-emacs/emacs.d/init.org b/tag-emacs/emacs.d/init.org index 40fa1731..c7ba94bc 100644 --- a/tag-emacs/emacs.d/init.org +++ b/tag-emacs/emacs.d/init.org @@ -1525,18 +1525,28 @@ I use [[http://ledger-cli.org/][=ledger=]] to manage my finances. It has an Ema works really nicely. #+BEGIN_SRC emacs-lisp -(use-package ledger-mode - :mode ("\\.ledger\\'" . ledger-mode) - :config (progn - (defun setup-ledger-mode () - (setq-local indent-tabs-mode nil)) - (add-hook 'ledger-mode-hook #'setup-ledger-mode) - (setq ledger-use-iso-dates t - ledger-post-use-completion-engine :built-in - ledger-reconcile-default-commodity "€" - ledger-clear-whole-transactions t - ledger-narrow-on-reconcile t - ledger-default-date-format "%Y-%m-%d"))) + (use-package ledger-mode + :mode ("\\.ledger\\'" . ledger-mode) + :config (progn + (defun setup-ledger-mode () + (setq-local indent-tabs-mode nil)) + (add-hook 'ledger-mode-hook #'setup-ledger-mode) + (setq ledger-use-iso-dates t + ledger-post-use-completion-engine :built-in + ledger-reconcile-default-commodity "€" + ledger-clear-whole-transactions t + ledger-narrow-on-reconcile t + ledger-default-date-format "%Y-%m-%d" + ledger-reports '(("Monthly Expenses" "ledger -f %(ledger-file) reg -M Expenses -l \"commodity == '€'\"") + ("Forecast:Next Month" "ledger -f %(ledger-file) bal --forecast 'format_date(d, \"%Y%m%d\")<(to_string(to_int(format_date(now, \"%Y%m01\"))+100))' --limit 'format_date(date, \"%Y%m%d\")>(to_string(to_int(format_date(now, \"%Y%m01\"))+200))' ^Expenses: ^Funds:") + ("Expenses:This Month" "ledger -f %(ledger-file) bal ^Expenses -p \"this month\"") + ("Asset & Liability Balances" "ledger -f %(ledger-file) bal --current -R :Budget: Assets:Receivable Liabilities:Personal") + ("Budget" "ledger -f %(ledger-file) bal ^Funds") + ("bal" "ledger -f %(ledger-file) bal") + ("reg" "ledger -f %(ledger-file) reg") + ("equity" "ledger -f %(ledger-file) equity") + ("payee" "ledger -f %(ledger-file) reg @%(payee)") + ("account" "ledger -f %(ledger-file) reg %(account)"))))) #+END_SRC ** Markdown -- cgit 1.4.1