all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Re: Wrapper for the GNU 'which' command
       [not found] ` <325umcF3e4r0cU1@individual.net>
@ 2004-12-14  7:27   ` yonirabkin
  2004-12-14 17:12     ` Kevin Rodgers
  0 siblings, 1 reply; 2+ messages in thread
From: yonirabkin @ 2004-12-14  7:27 UTC (permalink / raw)


Kevin Rodgers wrote:
> Yoni Rabkin Katzenell wrote:
>  > This is a wrapper around the GNU 'which' command that I have found
>  > very useful when writing Emacs Lisp code which calls processes.
The
>  > function expects a name of a command as a string and returns true
if
>  > that command exists.
>
> ,----[ 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'.
> `----
> 
> -- 
> Kevin Rodgers

When does emacs create `exec-path'?

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Wrapper for the GNU 'which' command
  2004-12-14  7:27   ` Wrapper for the GNU 'which' command yonirabkin
@ 2004-12-14 17:12     ` Kevin Rodgers
  0 siblings, 0 replies; 2+ messages in thread
From: Kevin Rodgers @ 2004-12-14 17:12 UTC (permalink / raw)


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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-12-14 17:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <uwtvm2x5a.fsf@member.fsf.org>
     [not found] ` <325umcF3e4r0cU1@individual.net>
2004-12-14  7:27   ` Wrapper for the GNU 'which' command yonirabkin
2004-12-14 17:12     ` Kevin Rodgers

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.