Disable jed.conf (was: Re: Intention of jed-script)

John E. Davis davis@space.mit.edu
Wed Jul 13 15:52:54 UTC 2005


G. Milde <g.milde@web.de> wrote:
>This solves much problems, but not the following example:
>
>  My jed.conf extends the jed-library-path by a private directory
>  "~/.jed/lib", where I store my private and modified modes.

  I do not believe that jed.conf should be doing things that can be
done in the .jedrc file.  The main idea behind jed.conf is that it is
to provide suitable defaults for all users on the system.  I do not
believe that it should be loading user-specific files.

  As a compromise, what do you feel about the following patch to
site.sl?  The idea is that if jed is installed in, e.g.,
/usr/local/bin, then jed will try to load /usr/local/etc/jed.conf and
not /etc/jed.conf.  Also, if the environment variable JED_CONF_DIR is
set, then it will be used as the directory containing jed.conf.

  To use this patch, simply replace the corresponding bit at the end of
site.sl with the following.  Thanks, --John

if (strlen(expand_jedlib_file("defaults.sl")))
  () = evalfile("defaults");
#ifdef UNIX
else 
  {
     % Map /install/prefix/bin/jed to /install/prefix/etc/
     $1 = getenv ("JED_CONF_DIR");
     if ($1 == NULL)
       {
	  $1 = path_concat (path_dirname (path_dirname (__argv[0])), "etc");
	  if (($1 == "/usr/etc") and (0 == file_status ($1)))
	    $1 = "/etc";
       }
     $1 = path_concat ($1, "jed.conf");
     if (1 == file_status ($1))
       {
	  () = evalfile ($1);
	  break;
       }
  }
#endif




More information about the Pkg-jed-devel mailing list