From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andreas Politz Newsgroups: gmane.emacs.help Subject: Re: system-command-exists-p Date: Mon, 07 Dec 2009 17:22:29 +0100 Message-ID: <87ljhewy7u.fsf@fh-trier.de> References: <87bpibf5xl.fsf@galatea.local> <87vdgiew67.fsf@galatea.local> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1260207709 16554 80.91.229.12 (7 Dec 2009 17:41:49 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 7 Dec 2009 17:41:49 +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 18:41:42 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 1NHhaf-0008PM-UO for geh-help-gnu-emacs@m.gmane.org; Mon, 07 Dec 2009 18:41:42 +0100 Original-Received: from localhost ([127.0.0.1]:35283 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NHhaf-0003vx-KW for geh-help-gnu-emacs@m.gmane.org; Mon, 07 Dec 2009 12:41:41 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NHgMc-0003rY-0f for help-gnu-emacs@gnu.org; Mon, 07 Dec 2009 11:23:06 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NHgMW-0003nU-58 for help-gnu-emacs@gnu.org; Mon, 07 Dec 2009 11:23:04 -0500 Original-Received: from [199.232.76.173] (port=53503 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NHgMU-0003mP-Dq for help-gnu-emacs@gnu.org; Mon, 07 Dec 2009 11:22:58 -0500 Original-Received: from lo.gmane.org ([80.91.229.12]:49499) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NHgMU-0007S3-Ez for help-gnu-emacs@gnu.org; Mon, 07 Dec 2009 11:22:58 -0500 Original-Received: from list by lo.gmane.org with local (Exim 4.50) id 1NHgMR-00056V-4H for help-gnu-emacs@gnu.org; Mon, 07 Dec 2009 17:22:55 +0100 Original-Received: from dslb-084-059-211-031.pools.arcor-ip.net ([84.59.211.31]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 07 Dec 2009 17:22:55 +0100 Original-Received: from politza by dslb-084-059-211-031.pools.arcor-ip.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 07 Dec 2009 17:22:55 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 23 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: dslb-084-059-211-031.pools.arcor-ip.net User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:FC6Vn5XPbCNPqB63pY+20PLmh7o= X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) 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:70477 Archived-At: pjb@informatimago.com (Pascal J. Bourguignon) writes: > Andreas Röhler writes: > >> Pascal J. Bourguignon wrote: >>> Andreas Roehler writes: >>> >>>> 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? >>> `executable-find' ? -ap