diff options
-rw-r--r-- | doc/ledger-mode.texi | 2 | ||||
-rw-r--r-- | lisp/ldg-post.el | 11 |
2 files changed, 2 insertions, 11 deletions
diff --git a/doc/ledger-mode.texi b/doc/ledger-mode.texi index e13610bc..001eb054 100644 --- a/doc/ledger-mode.texi +++ b/doc/ledger-mode.texi @@ -323,7 +323,7 @@ at point. @node Hiding Transactions, , Sorting Transactions, The Ledger Buffer @section Hiding Transactions -Often you will want to run Ledger register reports just to look at a +Often you will want to run Ledger register reports just to look at ax specific set of transactions. If you don't need the running total calculation handled by Ledger, Ledger-mode provides a rapid way of narrowing what is displayed in the buffer in a way that is simpler than diff --git a/lisp/ldg-post.el b/lisp/ldg-post.el index 6cba305b..e794f071 100644 --- a/lisp/ldg-post.el +++ b/lisp/ldg-post.el @@ -186,19 +186,10 @@ BEG, END, and LEN control how far it can align." (let ((end-of-amount (re-search-forward "[-.,0-9]+" (line-end-position) t))) ;; determine if there is an amount to edit (if end-of-amount - (let ((val (match-string 0))) + (let ((val (ledger-commodity-string-number-decimalize (match-string 0) :from-user))) (goto-char (match-beginning 0)) (delete-region (match-beginning 0) (match-end 0)) (calc) - (if ledger-use-decimal-comma - (progn - (while (string-match "\\." val) - (setq val (replace-match "" nil nil val))) ;; gets rid of periods - (while (string-match "," val) - (setq val (replace-match "." nil nil val)))) ;; switch to period separator - (progn - (while (string-match "," val) - (setq val (replace-match "" nil nil val))))) ;; gets rid of commas (calc-eval val 'push)) ;; edit the amount (progn ;;make sure there are two spaces after the account name and go to calc (if (search-backward " " (- (point) 3) t) |