Path: utzoo!attcan!uunet!yale!Ram-Ashwin From: Ram-Ashwin@cs.yale.edu (Ashwin Ram) Newsgroups: comp.emacs Subject: Re: Is a file loadable? Message-ID: <36722@yale-celray.yale.UUCP> Date: 30 Aug 88 14:33:39 GMT References: <5852@columbia.edu> Sender: root@yale.UUCP Reply-To: Ram-Ashwin@cs.yale.edu (Ashwin Ram) Organization: Computer Science, Yale University, New Haven, CT 06520-2158 Lines: 15 In-reply-to: agw@convent.columbia.edu (Art Werschulz) In article <5852@columbia.edu>, agw@convent.columbia.edu (Art Werschulz) writes: > Let us say that file "foo" is "loadable" if either foo.elc or foo.el > is in one of the directories in the load-path. [...] > The obvious thing would be to defun a predicate loadable-p, and > procede from there. Is there anything built-in that I can use, and so > avoid re-inventing the wheel? Clearly emacs itself has to search the > load-path whenever it has to do a load or autoload. To generalize this, it would be nice to have a command akin to the "which" command in Unix that would return the full pathname of the file that would be loaded were you to execute the load command. E.g., (where-is-file "rmail") might return "/usr/local/lib/emacs/lisp/rmail.elc", or nil if the file wasn't found in the load-path. -- Ashwin.