all repos — nixfiles @ 32c46b315483ec2f58f14acd5cc3d9145c65c65c

System and user configuration, managed by nix and home-manager

Emacs: add command to open budget
Alan Pearce alan@alanpearce.co.uk
Sat, 25 Jun 2016 22:51:26 +0200
commit

32c46b315483ec2f58f14acd5cc3d9145c65c65c

parent

6445538807f6a08316eed74fbee4c1daca188b49

1 files changed, 5 insertions(+), 0 deletions(-)

jump to
M tag-emacs/emacs.d/init.orgtag-emacs/emacs.d/init.org
@@ -1387,6 +1387,11 @@ :config (progn               (defun setup-ledger-mode ()
                 (setq-local indent-tabs-mode nil))
               (add-hook 'ledger-mode-hook #'setup-ledger-mode)
+              (defun open-budget ()
+                (interactive)
+                (projectile-persp-switch-project "~/Sync")
+                (find-file (expand-file-name "ledger/my.ledger" (projectile-project-root)))
+                (ledger-report "Budget (Cumulative)" nil))
               (setq ledger-use-iso-dates t
                     ledger-post-use-completion-engine :built-in
                     ledger-reconcile-default-commodity "€"