Enh918 Have occur mode searches stored in mini buffer history

This commit is contained in:
Craig Earls 2013-03-18 10:50:11 -07:00
parent 431d7e5b25
commit ea72ac29ea
3 changed files with 8 additions and 8 deletions

View file

@ -49,7 +49,7 @@
(defvar ledger-occur-history nil
"History of previously searched expressions for the prompt.")
(make-variable-buffer-local 'ledger-occur-history)
;;(make-variable-buffer-local 'ledger-occur-history)
(defvar ledger-occur-last-match nil
"Last match found.")
@ -95,8 +95,7 @@ When REGEX is nil, unhide everything, and remove higlight"
(if ledger-occur-mode
(list nil)
(list (read-string (concat "Regexp<" (ledger-occur-prompt)
">: ") "" 'ledger-occur-history ))))
(if (string-equal "" regex) (setq regex (ledger-occur-prompt)))
">: ") nil 'ledger-occur-history (ledger-occur-prompt)))))
(ledger-occur-mode regex (current-buffer)))
(defun ledger-occur-prompt ()

View file

@ -73,7 +73,7 @@ text that should replace the format specifier."
(defvar ledger-report-cmd-prompt-history nil)
(defvar ledger-original-window-cfg nil)
(defvar ledger-report-saved nil)
(defvar ledger-minibuffer-history nil)
(defvar ledger-report-mode-abbrev-table)
(defun ledger-report-reverse-lines ()
@ -236,7 +236,7 @@ used to generate the buffer, navigating the buffer, etc."
(if default
(concat " (" default "): ")
": "))))
(read-string default-prompt nil nil default)))
(read-string default-prompt nil 'ledger-minibuffer-history default)))
(defun ledger-report-payee-format-specifier ()
"Substitute a payee name.

View file

@ -99,9 +99,10 @@ within the transaction."
(ignore (goto-char here))))))
(defun ledger-copy-transaction-at-point (date)
"Ask for a new DATE and copy the transaction under point to that date. Leave point on the first amount."(interactive (list
(read-string "Copy to date: "
(concat ledger-year "/" ledger-month "/"))))
"Ask for a new DATE and copy the transaction under point to that date. Leave point on the first amount."
(interactive (list
(read-string "Copy to date: "
(concat ledger-year "/" ledger-month "/") 'ledger-minibuffer-history)))
(let* ((here (point))
(extents (ledger-find-xact-extents (point)))
(transaction (buffer-substring (car extents) (cadr extents)))