&find - Find a file on the search path
&which - Find a program on the path
&find <basename> <extension>
&which <progname>
&find searches for a named file <basename><extension> on the MicroEmacs '99 search path defined by the variable $search-path(5) (initialized from the environment variable $MEPATH(5)). Each path component defined in $search-path is prepended to the constructed file name and it's existence is tested. If the file exists, then the FULL path name of the file is returned to the caller, otherwise ERROR.
<basename>
<extension>
&which searches for the given executable program <progname> on the system program search path defined the the environment variable $PATH.
&find is typically used with insert-file(2) and find-file(2) within macro scripts, and is used to locate user specific files.
The following example uses &find to locate the uses 'C' template file. Given a $search-path setting of /usr/bob/emacs:/usr/local/microemacs:-
insert-file &find "c" ".etf"
Would insert the file /usr/bob/emacs/c.etf if it existed, else the file /usr/local/microemacs/c.etf if it exists.
(c) Copyright JASSPA 1999
Last Modified: 1999/08/24
Generated On: 1999/12/01