diff options
-rw-r--r-- | lisp/ledger-mode.el | 1 | ||||
-rw-r--r-- | lisp/ledger-occur.el | 12 |
2 files changed, 6 insertions, 7 deletions
diff --git a/lisp/ledger-mode.el b/lisp/ledger-mode.el index 3d286c62..1a44554e 100644 --- a/lisp/ledger-mode.el +++ b/lisp/ledger-mode.el @@ -292,6 +292,7 @@ With a prefix argument, remove the effective date." "Ledger menu" '("Ledger" ["Narrow to REGEX" ledger-occur] + ["Show all transactions" ledger-occur-mode ledger-occur-mode] ["Ledger Statistics" ledger-display-ledger-stats ledger-works] "---" ["Show upcoming transactions" ledger-schedule-upcoming] diff --git a/lisp/ledger-occur.el b/lisp/ledger-occur.el index fc868334..0c1a07d7 100644 --- a/lisp/ledger-occur.el +++ b/lisp/ledger-occur.el @@ -57,9 +57,11 @@ ledger-occur-mode-map (if ledger-occur-mode (ledger-occur-refresh) - (ledger-occur-remove-overlays))) + (ledger-occur-remove-overlays) + (message "Showing all transactions"))) (define-key ledger-occur-mode-map (kbd "C-c C-g") 'ledger-occur-refresh) +(define-key ledger-occur-mode-map (kbd "C-c C-f") 'ledger-occur-mode) (defun ledger-occur-refresh () "Re-apply the current narrowing expression." @@ -78,14 +80,10 @@ This command hides all xact in the current buffer except those matching REGEX. If REGEX is nil or empty, turn off any narrowing currently active." (interactive - (if ledger-occur-mode - (list nil) - (list (read-regexp "Regexp" (ledger-occur-prompt) 'ledger-occur-history)))) + (list (read-regexp "Regexp" (ledger-occur-prompt) 'ledger-occur-history))) (if (or (null regex) (zerop (length regex))) ; empty regex, or already have narrowed, clear narrowing - (progn - (message "Showing all transactions") - (ledger-occur-mode -1)) + (ledger-occur-mode -1) (setq ledger-occur-current-regex regex) (ledger-occur-mode 1))) |