aboutsummaryrefslogtreecommitdiff
path: root/emacs/.emacs.d/lisp/my/my-ledger.el
diff options
context:
space:
mode:
authorYuchen Pei <id@ypei.org>2025-01-12 19:56:18 +1100
committerYuchen Pei <id@ypei.org>2025-01-12 19:56:18 +1100
commitf5a111de58af93660603c639043a514a4aeaa968 (patch)
tree1f667eec7550d01ff538d059f9d3ebc1b0eaf9dc /emacs/.emacs.d/lisp/my/my-ledger.el
parent672458a898250389444a4a41a8384b9a8e3ec942 (diff)
[emacs] Add compilation mode support for ledger modeHEADmaster
Diffstat (limited to 'emacs/.emacs.d/lisp/my/my-ledger.el')
-rw-r--r--emacs/.emacs.d/lisp/my/my-ledger.el9
1 files changed, 9 insertions, 0 deletions
diff --git a/emacs/.emacs.d/lisp/my/my-ledger.el b/emacs/.emacs.d/lisp/my/my-ledger.el
index 8c955c6..b1ad2ca 100644
--- a/emacs/.emacs.d/lisp/my/my-ledger.el
+++ b/emacs/.emacs.d/lisp/my/my-ledger.el
@@ -39,5 +39,14 @@
(call-interactively 'ledger-navigate-prev-xact-or-directive)
(call-interactively 'ledger-navigate-prev-xact-or-directive))
+;;; hledger: Error: /home/ycp/Documents/finance/huecu.ledger:1615:41:
+(defvar my-ledger-compilation-error-re
+ '(ledger "^hledger: Error: \\(.+\\):\\([0-9]+\\):\\([0-9]+\\):$" 1 2 3))
+
+(defun my-ledger-set-compile-command ()
+ (setq-local
+ compile-command
+ (format "%s bal -f %s" ledger-binary-path buffer-file-name)))
+
(provide 'my-ledger)
;;; my-ledger.el ends here