Disable jed.conf

G. Milde g.milde at web.de
Fri Sep 2 09:55:30 UTC 2005

Dear John, dear Jed-users,

I am afraid my last response to this mail went off unheard, so please
apologize my trying again.

On 13.07.05, John E. Davis wrote:

> The main idea behind jed.conf is that it is to provide suitable
> defaults for all users on the system.  

I fully agree with you on this.

> I do not believe that it should be loading user-specific files.

(The only exception would be setting the default path of the .jedrc file
for all users on the system e.g. to ~/.jed/.jedrc in order to keep the
home directory clean.)

However, in some cases it is desirable to start jed without these
site-wide defaults.

Example: One site-wide default in the jed Debian package is the
/etc/jed-init.d/ directory, allowing other packages to store their setup
files independently. In case of debugging or during setup, it could be
necessary not to evaluate all the files in /etc/jed-init.d/. 
For me, the most straighgtforward approach would be a command line option
to disable evaluating jed.conf (similar to -n for not evaluating .jedrc).

>   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.  

This is different feature. We discussed such a scenario in the
pkg-jed-devel list and came to the conclusion that it is not really
needed. System-wide configuration for one of several installed
jed-versions can be done with defaults.sl (with an empty defaults.sl as
an easy means to disable the evaluation of /etc/jed.conf.)

> Also, if the environment variable JED_CONF_DIR is set, then it will be
> used as the directory containing jed.conf.

I like this extension, as it adds flexibility and could even be used as a
substitute for a --no-conf-file option on the command line like

  JED_CONF_DIR=""; jed

My suggestion for the end of site.sl is simply

if (strlen(expand_jedlib_file("defaults.sl")))
  () = evalfile("defaults");
#ifdef UNIX
     $1 = getenv ("JED_CONF_DIR");
     if ($1 == NULL)
	$1 = "/etc";
     $1 = path_concat ($1, "jed.conf");
     if (1 == file_status ($1))
	() = evalfile ($1);



G.Milde web.de

More information about the Pkg-jed-devel mailing list