Couldn't find obvious defaults... Again!

Glynn Clements glynn.clements at virgin.net
Thu Sep 23 06:44:26 EDT 2004


Steve Youngs wrote:

> I was talking with someone on IRC earlier today.  Talk came around to
> XEmacs (as is often the case with me).  This guy is a Slackware user
> and he had made himself a Slackware package of XEmacs 21.4.15 but
> hadn't gotten around to installing it.
> 
> He installed, ran, and got the infamous "Couldn't find obvious
> defaults for load-path exec-directory data-directory etc etc".
> 
> I've been able to find plenty of mentions of this problem in various
> places, but I can't find any mention anywhere of what the problem
> actually is or how to fix it.

The function normal-top-level (in startup.el) calls
startup-setup-paths to autodect the values of certain variables, then
calls startup-setup-paths-warning, which prints a warning if any of
those variables are nil.

Essentially, it starts by finding a list of potential roots for the
installation hierarchy based upon the full path to the xemacs
executable. E.g. if argv[0] is /usr/local/bin/xemacs, then /usr/local
will be a root, and it will look for directories in
/usr/local/lib/xemacs and /usr/local/lib/xemacs-21.4.15.

If argv[0] doesn't include a directory, it will look for a file
matching argv[0] in each of the directories in $PATH.

One thing which will confuse it is if you install it somewhere odd,
such that the bin subdirectory isn't in the path, and which is
somewhere other than the --prefix passed to configure (or you used
--without-prefix) then, so that you can actually run it, put a symlink
to the executable in a standard bin directory which has no relation to
the location of the rest of XEmacs. XEmacs does many things to try to
locate its files, but one thing it doesn't do is scan the entire
filesystem.

BTW, you can use the -debug-paths switch or set the environment
variable EMACSDEBUGPATHS to have various paths dumped to stderr at
startup.

-- 
Glynn Clements <glynn.clements at virgin.net>




More information about the XEmacs-Beta mailing list