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

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

Re: ELisp finding files in Path


From: Thierry Volpiatto
Subject: Re: ELisp finding files in Path
Date: Tue, 28 Sep 2010 12:22:57 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2.50 (gnu/linux)

address@hidden (Paulo J. Matos) writes:

> 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.
(when (executable-find ...) (load ...)

-- 
A+ Thierry
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997 




reply via email to

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