From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andreas Roehler Newsgroups: gmane.emacs.help Subject: system-command-exists-p Date: Mon, 07 Dec 2009 08:17:59 +0100 Message-ID: <4B1CAC27.4060802@online.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1260170335 24868 80.91.229.12 (7 Dec 2009 07:18:55 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 7 Dec 2009 07:18:55 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Dec 07 08:18:48 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1NHXrs-0008V1-9T for geh-help-gnu-emacs@m.gmane.org; Mon, 07 Dec 2009 08:18:48 +0100 Original-Received: from localhost ([127.0.0.1]:36690 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NHXrr-00006v-IP for geh-help-gnu-emacs@m.gmane.org; Mon, 07 Dec 2009 02:18:47 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NHXrQ-0008VY-96 for help-gnu-emacs@gnu.org; Mon, 07 Dec 2009 02:18:20 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NHXrL-0008Qp-HE for help-gnu-emacs@gnu.org; Mon, 07 Dec 2009 02:18:19 -0500 Original-Received: from [199.232.76.173] (port=48203 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NHXrL-0008QS-BN for help-gnu-emacs@gnu.org; Mon, 07 Dec 2009 02:18:15 -0500 Original-Received: from moutng.kundenserver.de ([212.227.17.8]:52613) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NHXrL-0006vf-22 for help-gnu-emacs@gnu.org; Mon, 07 Dec 2009 02:18:15 -0500 Original-Received: from [192.168.178.27] (p54BE9C24.dip0.t-ipconnect.de [84.190.156.36]) by mrelayeu.kundenserver.de (node=mrbap1) with ESMTP (Nemesis) id 0MLA1p-1NHoyT1lU9-000uF1; Mon, 07 Dec 2009 08:18:12 +0100 User-Agent: Thunderbird 2.0.0.19 (X11/20081227) X-Provags-ID: V01U2FsdGVkX191HfFH1Au6qiqaXI75Rg5CLXQvF/wVSYVMjY7 Yo57+p8/vH+9Ttx4LkhKBPeEhx+H7t/2czip3OdQvQ7r60khVs lMGv4ofDLnCCUpAxVc/PyrtbLH9hqS5Ax+YtmGxNqQ= X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:70467 Archived-At: 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/