jed-users mailing list

[2005 Date Index] [2005 Thread Index] [Other years]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]

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


G. Milde <g.milde@xxxxxx> 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

--------------------------
To unsubscribe send email to <jed-users-request@xxxxxxxxxxx> with
the word "unsubscribe" in the message body.
Need help? Email <jed-users-owner@xxxxxxxxxxx>.


[2005 date index] [2005 thread index]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]