From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.help Subject: Re: ELisp finding files in Path Date: Tue, 28 Sep 2010 06:22:02 -0400 Message-ID: References: NNTP-Posting-Host: lo.gmane.org X-Trace: dough.gmane.org 1285669375 11556 80.91.229.12 (28 Sep 2010 10:22:55 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 28 Sep 2010 10:22: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 Tue Sep 28 12:22:54 2010 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.69) (envelope-from ) id 1P0XKj-0005eo-QS for geh-help-gnu-emacs@m.gmane.org; Tue, 28 Sep 2010 12:22:49 +0200 Original-Received: from localhost ([127.0.0.1]:50499 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P0XKi-0008Ow-KC for geh-help-gnu-emacs@m.gmane.org; Tue, 28 Sep 2010 06:22:48 -0400 Original-Received: from [140.186.70.92] (port=42439 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P0XK3-0008Or-2i for help-gnu-emacs@gnu.org; Tue, 28 Sep 2010 06:22:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1P0XJy-0003g7-Nf for help-gnu-emacs@gnu.org; Tue, 28 Sep 2010 06:22:07 -0400 Original-Received: from fencepost.gnu.org ([140.186.70.10]:42244) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1P0XJy-0003g0-L6 for help-gnu-emacs@gnu.org; Tue, 28 Sep 2010 06:22:02 -0400 Original-Received: from eliz by fencepost.gnu.org with local (Exim 4.69) (envelope-from ) id 1P0XJy-0002eT-H2 for help-gnu-emacs@gnu.org; Tue, 28 Sep 2010 06:22:02 -0400 In-reply-to: (pocmatos@gmail.com) X-detected-operating-system: by eggs.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:75027 Archived-At: > From: pocmatos@gmail.com (Paulo J. Matos) > Date: Tue, 28 Sep 2010 11:10:12 +0100 > > I would like to execute some commands in my .emacs only if there are > some files in the current PATH. The specific example is, I only want to > load a perforce library (p4.el) if I can find the executable p4 in the > path. > > How can I do this? Check out the executable-find function, it will return nil if it doesn't find an executable program on PATH.