commit fa0c31f4b2f6d3502501c1f84bccfad079c3cb61 parent 3b01584cd442e10c93d87ed95fc9358b7a9d07cd Author: Alex Balgavy <alex@balgavy.eu> Date: Wed, 28 Sep 2022 16:35:51 +0200 emacs: fix ledger indentation with expression amounts Diffstat:
M | emacs/config.org | | | 18 | ++++++++++++++++++ |
1 file changed, 18 insertions(+), 0 deletions(-)
diff --git a/emacs/config.org b/emacs/config.org @@ -2181,6 +2181,24 @@ Like virtualenvwrapper.sh, but for Emacs. :custom (ledger-clear-whole-transactions t) (ledger-reconcile-default-commodity "eur") + (ledger-amount-regex + (rx (group (or (= 2 " ") ?\t (seq " " ?\t))) + (zero-or-more (any " " ?\t)) + (opt "-") + (opt "(") + (one-or-more (opt (group (one-or-more (any "A-Z" "$(_£€₹")) (zero-or-more " "))) + (group (opt "-") (or (one-or-more (any "0-9")) (+\? (any "0-9" ",.")))) + (opt (group (any ",.") (one-or-more (any "0-9" ")")))) + (opt (group (zero-or-more " ") (one-or-more (any "\"_£€₹" word)))) + (opt (zero-or-more (any " ")) (any "*+/-") (zero-or-more (any " ")))) + (opt ")") + (opt (group (zero-or-more (any " ")) + (any "=@{") + (opt "@") + (+? (not (any ?\xA ";"))))) + (opt (group (or (seq (one-or-more (any " ")) ";" (+\? nonl)) + (zero-or-more (any " "))))) + eol)) (ledger-reports '(("budget-last-month" "%(binary) -f %(ledger-file) --start-of-week=1 --period \"last month\" budget ^expenses") ("budget-this-month" "%(binary) -f %(ledger-file) --start-of-week=1 --period \"this month\" budget ^expenses")