From 440e952056ef2ce6e17a32423e05ba60b35b9a93 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 30 Apr 2025 03:44:44 -0400 Subject: [PATCH] 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). --- modules/lang/beancount/autoload.el | 9 ++++++--- modules/lang/beancount/config.el | 3 --- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/modules/lang/beancount/autoload.el b/modules/lang/beancount/autoload.el index 4053e3300..c43a1b5cc 100644 --- a/modules/lang/beancount/autoload.el +++ b/modules/lang/beancount/autoload.el @@ -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 () diff --git a/modules/lang/beancount/config.el b/modules/lang/beancount/config.el index 7ea1de2bf..fa98b3127 100644 --- a/modules/lang/beancount/config.el +++ b/modules/lang/beancount/config.el @@ -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