summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorCraig Earls <enderw88@gmail.com>2014-09-18 19:56:34 -0700
committerCraig Earls <enderw88@gmail.com>2014-09-18 19:56:34 -0700
commit3144ca87f4ea1d9ee8021f867ad7966260285dad (patch)
tree5bceb91ab34fd8c56cb96ed22dcbd2c160e05cef /lisp
parent61c3c19cf7e1eb5a735f5c5c936befd077032d81 (diff)
downloadfork-ledger-3144ca87f4ea1d9ee8021f867ad7966260285dad.tar.gz
fork-ledger-3144ca87f4ea1d9ee8021f867ad7966260285dad.tar.bz2
fork-ledger-3144ca87f4ea1d9ee8021f867ad7966260285dad.zip
Add ability to edit report command temporarily
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ledger-report.el11
1 files changed, 9 insertions, 2 deletions
diff --git a/lisp/ledger-report.el b/lisp/ledger-report.el
index f61576e3..134dbad5 100644
--- a/lisp/ledger-report.el
+++ b/lisp/ledger-report.el
@@ -98,7 +98,8 @@ text that should replace the format specifier."
(define-key map [(shift ?r)] 'ledger-report-reverse-lines)
(define-key map [?s] 'ledger-report-save)
(define-key map [?k] 'ledger-report-kill)
- (define-key map [?e] 'ledger-report-edit)
+ (define-key map [?e] 'ledger-report-edit-report)
+ (define-key map [( shift ?e)] 'ledger-report-edit-reports)
(define-key map [?q] 'ledger-report-quit)
(define-key map [?g] 'ledger-report-redo)
(define-key map [(control ?c) (control ?l) (control ?r)]
@@ -393,11 +394,17 @@ Optional EDIT the command."
(ledger-report-quit)
(kill-buffer (get-buffer ledger-report-buffer-name)))
-(defun ledger-report-edit ()
+(defun ledger-report-edit-reports ()
"Edit the defined ledger reports."
(interactive)
(customize-variable 'ledger-reports))
+(defun ledger-report-edit-report ()
+ (interactive)
+ "Edit the current report command in the mini buffer and re-run the report"
+ (setq ledger-report-cmd (ledger-report-read-command ledger-report-cmd))
+ (ledger-report-redo))
+
(defun ledger-report-read-new-name ()
"Read the name for a new report from the minibuffer."
(let ((name ""))