From 3d1ab0e4e7ebf87d811572e43ef0dda42696a0d4 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Thu, 17 Jul 2008 22:09:26 -0400 Subject: Changed the default value of ledger-binary-path to just "ledger", since there's no need to require an absolute pathname. --- ledger.el | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'ledger.el') diff --git a/ledger.el b/ledger.el index 450f0e8e..6f6abbf9 100644 --- a/ledger.el +++ b/ledger.el @@ -79,7 +79,7 @@ "Interface to the Ledger command-line accounting program." :group 'data) -(defcustom ledger-binary-path (executable-find "ledger") +(defcustom ledger-binary-path "ledger" "Path to the ledger executable." :type 'file :group 'ledger) @@ -798,15 +798,10 @@ If name exists, returns the object naming the report, otherwise returns nil." (defun ledger-run-ledger (buffer &rest args) "run ledger with supplied arguments" + ;; Let's try again, just in case they moved it while we were sleeping. (cond ((null ledger-binary-path) (error "The variable `ledger-binary-path' has not been set")) - ((not (file-exists-p ledger-binary-path)) - (error "The file `ledger-binary-path' (\"%s\") does not exist" - ledger-binary-path)) - ((not (file-executable-p ledger-binary-path)) - (error "The file `ledger-binary-path' (\"%s\") cannot be executed" - ledger-binary-path)) (t (let ((buf (current-buffer))) (with-current-buffer buffer -- cgit v1.2.3