diff options
author | Atheriel <atheriel@gmail.com> | 2016-07-14 23:13:52 -0400 |
---|---|---|
committer | Atheriel <atheriel@gmail.com> | 2016-07-14 23:27:40 -0400 |
commit | 755cdfc0aff064833e263af1df3ccc3661dafe83 (patch) | |
tree | 183986ce6076a9cf314b7b6c5b25d4ec1b701a14 /lisp | |
parent | 6dcb1444ea8ab2dcf074c3477b74f0482e0d097d (diff) | |
download | fork-ledger-755cdfc0aff064833e263af1df3ccc3661dafe83.tar.gz fork-ledger-755cdfc0aff064833e263af1df3ccc3661dafe83.tar.bz2 fork-ledger-755cdfc0aff064833e263af1df3ccc3661dafe83.zip |
Adds a "binary" format specifier to ledger-report.
This makes the current `ledger-binary-path' accessible to ledger
reports by using the %(binary) format specifier. It is intended to aid
users who may have different `ledger-binary-path' values on different
machines. It also means that the default `ledger-reports' will work
out of the box even if their ledger executable is not named "ledger"
--- for example, if they are using "hledger", and have otherwise set
their binary path appropriately.
[ci skip]
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/ledger-report.el | 9 |
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) |