Emacs: setup ledger and evil-ledger
Alan Pearce alan@alanpearce.eu
Tue, 19 Nov 2019 23:16:27 +0100
2 files changed, 19 insertions(+), 0 deletions(-)
M user/emacs/.emacs.d/init.el → user/emacs/.emacs.d/init.el
@@ -696,6 +696,24 @@ (use-package beancount :load-path "~/projects/bitbucket.org/blais/beancount/editors/emacs") +;;;; ledger + +(use-package ledger-mode + :config (progn + (setq ledger-reconcile-default-commodity "€" + ledger-narrow-on-reconcile t + ledger-reports `(("Monthly Expenses" "ledger -f %(ledger-file) reg -M \\^Flex --real -X EUR -l \"payee != 'Opening Balances'\"") + ("Average Monthly Expenses (Past 12 Months)" ,(concat "ledger -f %(ledger-file) -b " + (format-time-string "%Y-%m" (time-add (current-time) (days-to-time -365))) + " --monthly --average balance ^Flex")) + ("Expenses:This Month" "ledger -f %(ledger-file) bal \\^Flex -p \"this month\"") + ("All Account Balances" "ledger -f %(ledger-file) bal --current -R \\^Assets \\^Liabilities"))))) + + +(use-package evil-ledger + :after ledger-mode + :ghook '(ledger-mode-hook)) + ;;;; org (custom-set-variables '(org-ellipsis "…")
M user/settings/emacs.nix → user/settings/emacs.nix
@@ -68,6 +68,7 @@ eshell-up evil evil-collection evil-commentary + evil-ledger evil-magit evil-mu4e evil-org