all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* system-command-exists-p
@ 2009-12-07  7:17 Andreas Roehler
  2009-12-07 16:30 ` system-command-exists-p Lennart Borgman
  0 siblings, 1 reply; 8+ messages in thread
From: Andreas Roehler @ 2009-12-07  7:17 UTC (permalink / raw)
  To: help-gnu-emacs


Hi,

needed a check if a command exists on system.
Employed the following:

(defun system-command-exists-p (command)
  "Return t if COMMAND is available on system. "
  (let* ((cmd (format "type %s" command)))
    (eq 0 (shell-command cmd))))

Any comments/suggestions?

Andreas

--
https://code.launchpad.net/s-x-emacs-werkstatt/
http://bazaar.launchpad.net/~a-roehler/python-mode/python-mode.el/





^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2009-12-07 18:57 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <mailman.12411.1260170302.2239.help-gnu-emacs@gnu.org>
2009-12-07 10:13 ` system-command-exists-p Pascal J. Bourguignon
2009-12-07 12:02   ` system-command-exists-p Andreas Röhler
     [not found]   ` <mailman.12419.1260187409.2239.help-gnu-emacs@gnu.org>
2009-12-07 13:44     ` system-command-exists-p Pascal J. Bourguignon
2009-12-07 16:22       ` system-command-exists-p Andreas Politz
2009-12-07 16:00 ` system-command-exists-p Stefan Monnier
2009-12-07 18:57   ` system-command-exists-p Andreas Röhler
2009-12-07  7:17 system-command-exists-p Andreas Roehler
2009-12-07 16:30 ` system-command-exists-p Lennart Borgman

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.