diff options
author | Craig Earls <enderw88@gmail.com> | 2016-07-16 12:59:25 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-07-16 12:59:25 -0700 |
commit | 67d21ed4b083424831e51a649060fbde7c2f735b (patch) | |
tree | a4c73de64acc1ba30352b7a53a07b94bb370f094 | |
parent | 19e638b00eb14df044bc2f12faebae1d7b719d01 (diff) | |
parent | 7de71e650717656d0b151dead8cbf12e53061f06 (diff) | |
download | fork-ledger-67d21ed4b083424831e51a649060fbde7c2f735b.tar.gz fork-ledger-67d21ed4b083424831e51a649060fbde7c2f735b.tar.bz2 fork-ledger-67d21ed4b083424831e51a649060fbde7c2f735b.zip |
Merge pull request #460 from atheriel/ledger-report-register-optional-prepend-format
Makes links in ledger-report "register" commands optional.
-rw-r--r-- | lisp/ledger-report.el | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lisp/ledger-report.el b/lisp/ledger-report.el index 67e738ab..a577e067 100644 --- a/lisp/ledger-report.el +++ b/lisp/ledger-report.el @@ -82,6 +82,12 @@ text that should replace the format specifier." :type 'boolean :group 'ledger-report) +(defcustom ledger-report-links-in-register t + "When non-nil, attempt to link transactions in \"register\" +reports to their location in the currrent ledger file buffer." + :type 'boolean + :group 'ledger-report) + (defvar ledger-report-buffer-name "*Ledger Report*") (defvar ledger-report-name nil) @@ -337,11 +343,12 @@ Optional EDIT the command." ;; --subtotal does not produce identifiable transactions, so don't ;; prepend location information for them (if (and register-report + ledger-report-links-in-register (not (string-match "--subtotal" cmd))) (concat cmd " --prepend-format='%(filename):%(beg_line):'") cmd) t nil) - (when register-report + (when (and register-report ledger-report-links-in-register) (goto-char data-pos) (while (re-search-forward "^\\(/[^:]+\\)?:\\([0-9]+\\)?:" nil t) (let ((file (match-string 1)) |