diff options
Diffstat (limited to 'emacs/.emacs.d')
-rw-r--r-- | emacs/.emacs.d/init/ycp-markup.el | 7 | ||||
-rw-r--r-- | emacs/.emacs.d/lisp/my/my-ledger.el | 9 |
2 files changed, 15 insertions, 1 deletions
diff --git a/emacs/.emacs.d/init/ycp-markup.el b/emacs/.emacs.d/init/ycp-markup.el index 548461d..f3d92d0 100644 --- a/emacs/.emacs.d/init/ycp-markup.el +++ b/emacs/.emacs.d/init/ycp-markup.el @@ -87,7 +87,12 @@ (require 'my-ledger) (my-keybind ledger-mode-map "M-<down>" #'my-ledger-move-xact-down - "M-<up>" #'my-ledger-move-xact-up)) + "M-<up>" #'my-ledger-move-xact-up + "C-c C-c" #'compile) + (add-to-list 'compilation-error-regexp-alist 'ledger) + (add-to-list 'compilation-error-regexp-alist-alist my-ledger-compilation-error-re) + (add-hook 'ledger-mode-hook 'my-ledger-set-compile-command) + ) ;;; todo: open epub in emacs client with nov (my-package nov 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 |