mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-01 12:17:25 -05:00
fix(beancount): +beancount/balance: make v3 compliant
bean-report was removed in beancount v3+, so we defer to bean-query, which is present in both v2 and v3 (though it lives in a separate repo in v3).
This commit is contained in:
@ -123,10 +123,13 @@ If REVERSE (the prefix arg) is non-nil, sort the transactions in reverst order."
|
||||
(defun +beancount/balance (&optional all-accounts)
|
||||
"Display a balance report with bean-report (bean-report bal)."
|
||||
(interactive "P")
|
||||
(let ((args (unless all-accounts '("-e" "Assets|Liabilities")))
|
||||
compilation-read-command
|
||||
(let (compilation-read-command
|
||||
current-prefix-arg)
|
||||
(apply #'beancount--run "bean-report" buffer-file-name "balances" args)))
|
||||
(beancount--run "bean-query"
|
||||
buffer-file-name
|
||||
(format "balances WHERE NOT close_date(account)%s"
|
||||
(if all-accounts
|
||||
"" (format " AND account ~ \"^(Assets|Liabilities)\"" ))))))
|
||||
|
||||
;;;###autoload
|
||||
(defun +beancount/clone-transaction ()
|
||||
|
@ -28,9 +28,6 @@
|
||||
(browse-url (match-string 1 output))))))
|
||||
|
||||
(map! :map beancount-mode-map
|
||||
"TAB" (cmds! (and outline-minor-mode (outline-on-heading-p))
|
||||
#'beancount-outline-cycle
|
||||
#'indent-according-to-mode)
|
||||
:m "[[" #'+beancount/previous-transaction
|
||||
:m "]]" #'+beancount/next-transaction
|
||||
:localleader
|
||||
|
Reference in New Issue
Block a user