[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Wrapper for the GNU 'which' command
From: |
Kevin Rodgers |
Subject: |
Re: Wrapper for the GNU 'which' command |
Date: |
Tue, 14 Dec 2004 10:12:58 -0700 |
User-agent: |
Mozilla Thunderbird 0.9 (X11/20041105) |
yonirabkin@gmail.com wrote:
> Kevin Rodgers wrote:
>>,----[ C-h f executable-find RET ]
>>| executable-find is a compiled Lisp function in `executable'.
>>| (executable-find COMMAND)
>>|
>>| Search for COMMAND in exec-path and return the absolute file name.
>>| Return nil if COMMAND is not found anywhere in `exec-path'.
>>`----
>
> When does emacs create `exec-path'?
At startup, it is initialized from the PATH and EMACSPATH (or a default
directory) environment variables.
You can get executable-find to search whatever path you want by
temporarily binding exec-path e.g.
(let ((exec-path (parse-colon-path (getenv "FOOPATH"))))
(executable-find "foo"))
--
Kevin Rodgers