File tree Expand file tree Collapse file tree 2 files changed +10
-3
lines changed
Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -331,8 +331,11 @@ Return the number of uncleared xacts found."
331331
332332When called interactively, prompt for DATE, then XACT."
333333 (interactive
334- (list (ledger-read-date " Date: " )
335- (read-string " Transaction: " nil 'ledger-minibuffer-history )))
334+ (let* ((date (ledger-read-date " Date: " ))
335+ (xact-text
336+ (with-current-buffer ledger-reconcile-ledger-buf
337+ (ledger-read-transaction-text date))))
338+ (list date xact-text)))
336339 (with-current-buffer ledger-reconcile-ledger-buf
337340 (ledger-add-transaction (concat date " " xact)))
338341 (ledger-reconcile-refresh))
Original file line number Diff line number Diff line change @@ -270,7 +270,11 @@ displayed."
270270 (delete-window window))))
271271
272272(defun ledger-read-transaction-text (date )
273- " Read the text of a transaction with date DATE."
273+ " Read the text of a transaction with date DATE.
274+
275+ The ledger buffer should be current when this function is called, since
276+ it will be used as input for \" ledger xact\" for the sake of previewing
277+ output."
274278 (let ((ledger-buf (current-buffer )))
275279 (minibuffer-with-setup-hook
276280 (lambda ()
You can’t perform that action at this time.
0 commit comments