From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Sebastien Vauban" Subject: org-program-exists vs executable-find Date: Wed, 18 Apr 2012 14:46:24 +0200 Message-ID: <80mx69us0v.fsf@somewhere.org> Mime-Version: 1.0 Content-Type: text/plain Return-path: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org-mXXj517/zsQ@public.gmane.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org-mXXj517/zsQ@public.gmane.org To: emacs-orgmode-mXXj517/zsQ@public.gmane.org Hello, While browsing the Org code, I've found the function `org-program-exists': #+begin_src emacs-lisp (defun org-program-exists (program-name) "Checks whenever we can locate program and launch it." (if (member system-type '(gnu/linux darwin)) (= 0 (call-process "which" nil nil nil program-name)))) #+end_src It is used 3 times in `org-clock.el', nowhere else. On the contrary, `executable-find' is used 10 times in the Org code base (in 4 different libraries). Shouldn't we better use `executable-find' everywhere, instead of `org-program-exists' (which, btw, fails on Windows systems, even when they have the Cygwin `which' at their disposal)? I'm ready to submit a patch for this. Best regards, Seb -- Sebastien Vauban