bug 219448

G. Milde g.milde@web.de
Wed, 4 May 2005 12:28:27 +0200


On  3.05.05, Jörg Sommer wrote:
> G. Milde schrieb am Mon 02. May, 11:06 (+0200) :
> > On  1.05.05, Jörg Sommer wrote:
> > > The problem is this:
> > > please allow /etc/jed-init.d/ to override global settings
> > > $ xjed -batch
> > > loading /usr/share/jed/lib/site.slc
> > > loading /usr/share/jed/lib/os.sl
> > > loading /usr/share/jed/lib/menus.slc
> > > loading /etc/jed.conf
> > > 
> > > Here a admin may make system wide setting
> > > 
> > > loading /etc/jed-init.d/00debian.sl
> > > 
      loading either (with home-lib.sl): 
        ~/.jedrc 
        ~/.jed/.jedrc
        ~/.jed/lib/jed.rc
        /usr/local/share/jed/lib/jed.rc
        /usr/share/jed/site-lib/jed.rc
        /usr/share/jed/lib/jed.rc

> > > and here they get eventually overwritten by jeds default settings.

Only the last variant overwrites something with jeds default settings. If
the sysadmin did his/her settings in e.g.
/usr/local/share/jed/lib/jed.rc, this problem would not occure.

IMHO, we should add Default_Jedrc_Startup_File = NULL to jed.conf:


% debian jed.conf (as suggested by John E. Davis)
% 
% Please do not change the code below, if you want the debian jed startup 
% system to function correctly. 
% (see /usr/share/doc/jed-common/README.Debian-startup).
%
% You can append site-wide settings.


$1 = listdir ("/etc/jed-init.d");
foreach ($1[array_sort($1)])
{
    $1 = ();
    if (path_extname ($1) == ".sl")
	() = evalfile (path_concat ("/etc/jed-init.d", $1));   
}
Default_Jedrc_Startup_File = NULL; 


 
> > > I would say, we should remove /usr/share/jed/lib/jed.rc 
> > 
> > I would not remove JED_ROOT/lib/jed.rc, as the original jed documentation
> > refers to it as a reference (a la "copy ... to ~/.jedrc and adapt to your
> > needs...").
> 
> So its an example and should be in doc/jed-common/examples/.

With Default_Jedrc_Startup_File == NULL, it doesnot harm in JED_ROOT/lib
and some documentation points to it there. My suggestion would be to
place a copy in examples/.


> > > Does anyone know, why a command_line_hook is necessary? 
> > 
> > Well, it allows the user (in .jedrc) or the site-administrator to
> > overwrite the command_line_hook. (Unfortunately, that this hook is
> > quite long.)
> 
> ,----[ hooks.txt ]---
> | This hook is called from within the editor to parse the command line
> | arguments, and it also loads the user's personal initialization file.
> | It is defined in the file `site.sl' and should not be customized by
> | the user.
> `----

... but maybe by someone who knows what he is doing.

Anyway, postponing the processing of command line arguments allows the
use of `jed -f something` with "something" defined in a users .jedrc.


Günter



-- 
G.Milde web.de