help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

ELisp finding files in Path


From: Paulo J. Matos
Subject: ELisp finding files in Path
Date: Tue, 28 Sep 2010 11:10:12 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux)

Hi,

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? I couldn't find any way to either run a shell command
(through which I could run `which p4`), or read an environment variable
PATH, and then find all the files in it and see if p4 is there.

Any tips would be appreciated.

-- 
PMatos




reply via email to

[Prev in Thread] Current Thread [Next in Thread]