Function: org-check-external-command

org-check-external-command is a byte-compiled function defined in org-macs.el.gz.

Signature

(org-check-external-command CMD &optional USE NO-ERROR)

Documentation

Check if external program CMD for USE exists, error if not.

When the program does exist, return its path. When it does not exist and NO-ERROR is set, return nil. Otherwise, throw an error. The optional argument USE can describe what this program is needed for, so that the error message can be more informative.

Source Code

;; Defined in /usr/src/emacs/lisp/org/org-macs.el.gz
(defsubst org-check-external-command (cmd &optional use no-error)
  "Check if external program CMD for USE exists, error if not.
When the program does exist, return its path.
When it does not exist and NO-ERROR is set, return nil.
Otherwise, throw an error.  The optional argument USE can describe what this
program is needed for, so that the error message can be more informative."
  (or (executable-find cmd)
      (if no-error
	  nil
	(error "Can't find `%s'%s" cmd
	       (if use (format " (%s)" use) "")))))