summaryrefslogtreecommitdiff
path: root/lisp/ldg-report.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/ldg-report.el')
-rw-r--r--lisp/ldg-report.el20
1 files changed, 9 insertions, 11 deletions
diff --git a/lisp/ldg-report.el b/lisp/ldg-report.el
index 370117fc..944ae2e6 100644
--- a/lisp/ldg-report.el
+++ b/lisp/ldg-report.el
@@ -21,7 +21,7 @@
;;; Commentary:
-;;
+;; Provide facilities for running and saving reports in emacs
;;; Code:
@@ -51,7 +51,8 @@ specifier."
(defcustom ledger-report-format-specifiers
'(("ledger-file" . ledger-report-ledger-file-format-specifier)
("payee" . ledger-report-payee-format-specifier)
- ("account" . ledger-report-account-format-specifier))
+ ("account" . ledger-report-account-format-specifier)
+ ("value" . ledger-report-value-format-specifier))
"An alist mapping ledger report format specifiers to implementing functions.
The function is called with no parameters and expected to return the
@@ -59,15 +60,6 @@ text that should replace the format specifier."
:type 'alist
:group 'ledger)
-;;(define-key map [(control ?c) (control ?o) (control ?r)] 'ledger-report)
-;;(define-key map [(control ?c) (control ?o) (control ?g)] 'ledger-report-goto)
-;;(define-key map [(control ?c) (control ?o) (control ?a)] 'ledger-report-redo)
-;;(define-key map [(control ?c) (control ?o) (control ?s)] 'ledger-report-save)
-;;(define-key map [(control ?c) (control ?o) (control ?e)] 'ledger-report-edit)
-;;(define-key map [(control ?c) (control ?o) (control ?k)] 'ledger-report-kill)
-
-;; Ledger report mode
-
(defvar ledger-report-buffer-name "*Ledger Report*")
(defvar ledger-report-name nil)
@@ -128,6 +120,12 @@ text that should replace the format specifier."
(use-local-map map)))
+(defun ledger-report-value-format-specifier ()
+ "Return a valid meta-data tag name"
+ ;; It is intended completion should be available on existing account
+ ;; names, but it remains to be implemented.
+ (ledger-read-string-with-default "Value: " nil))
+
(defun ledger-report-read-name ()
"Read the name of a ledger report to use, with completion.