summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorCraig Earls <enderw88@gmail.com>2016-07-15 21:11:45 -0700
committerGitHub <noreply@github.com>2016-07-15 21:11:45 -0700
commit19e638b00eb14df044bc2f12faebae1d7b719d01 (patch)
tree183986ce6076a9cf314b7b6c5b25d4ec1b701a14 /lisp
parent6dcb1444ea8ab2dcf074c3477b74f0482e0d097d (diff)
parent755cdfc0aff064833e263af1df3ccc3661dafe83 (diff)
downloadfork-ledger-19e638b00eb14df044bc2f12faebae1d7b719d01.tar.gz
fork-ledger-19e638b00eb14df044bc2f12faebae1d7b719d01.tar.bz2
fork-ledger-19e638b00eb14df044bc2f12faebae1d7b719d01.zip
Merge pull request #459 from atheriel/ledger-binary-format-specifier
Adds a "binary" format specifier to ledger-report. I should have done this years ago. Thank you.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ledger-report.el9
1 files changed, 5 insertions, 4 deletions
diff --git a/lisp/ledger-report.el b/lisp/ledger-report.el
index 6ef23115..67e738ab 100644
--- a/lisp/ledger-report.el
+++ b/lisp/ledger-report.el
@@ -39,10 +39,10 @@
:group 'ledger)
(defcustom ledger-reports
- '(("bal" "ledger -f %(ledger-file) bal")
- ("reg" "ledger -f %(ledger-file) reg")
- ("payee" "ledger -f %(ledger-file) reg @%(payee)")
- ("account" "ledger -f %(ledger-file) reg %(account)"))
+ '(("bal" "%(binary) -f %(ledger-file) bal")
+ ("reg" "%(binary) -f %(ledger-file) reg")
+ ("payee" "%(binary) -f %(ledger-file) reg @%(payee)")
+ ("account" "%(binary) -f %(ledger-file) reg %(account)"))
"Definition of reports to run.
Each element has the form (NAME CMDLINE). The command line can
@@ -60,6 +60,7 @@ specifier."
(defcustom ledger-report-format-specifiers
'(("ledger-file" . ledger-report-ledger-file-format-specifier)
+ ("binary" . (lambda () ledger-binary-path))
("payee" . ledger-report-payee-format-specifier)
("account" . ledger-report-account-format-specifier)
("tagname" . ledger-report-tagname-format-specifier)