[Pkg-jed-commit] r59 - in trunk/packages/jed/debian: . init.d
patches
G. Milde
g.milde at web.de
Wed Sep 14 08:35:01 UTC 2005
On 11.09.05, Jörg Sommer wrote:
> * added 40_site.sl-startup.dpatch to make the startup go the Debian way,
> i.e. the files in /etc/jed.d/ get evaluated by jed, the
> Default_Jedrc_Startup_File is set to NULL, which was done in jed.conf
> before.
Why not keep this setting in jed-init.d/05jed-common.sl?
> + added a function "register_libdir()", which *appends* a library dir
> to the corresponding variables. I think appending is better to make
> Jed behaves the same way before and after adding a new libdir (iow a
> new package is installed).
Appending will introduce incompatiblities. home-lib.sl has a function
register_libdir() that *prepends* the path for a reason. Drop-in
replacements (e.g. Jedmodes' (hyper)help.sl) and patched versions of
standard library files should be found first by evalfile() and friends
also if they are provided by a package or the sysadmin.
> + it is also checked for ~/.jed and it is *prependened* in the
> variables if it exist
If we leave register_libdir() as in home-lib.sl, it could be used here,
making the file a lot shorter.
IMHO, we should also register /usr/share/jed/site-lib/ so it is ready for
other packages to put their modes in.
A function definition should IMO not be in a config file. Setting up
/usr/share/jed/site-lib/ in jed-common will enable us to write
() = evalfile("/usr/share/jed/site-lib/home-lib.sl");
register_libdir("/usr/share/jed/site-lib/home-lib.sl");
% Jed_Home_Directory is defined in site.sl, defaulting to $HOME
% If Jed_Home_Directory/.jed/ exists, point Jed_Home_Directory there,
% and register Jed_Home_Directory/lib
$1 = path_concat(Jed_Home_Directory, ".jed");
if ( 2 == file_status($1) ) {
% backwards compatibility of jedrc-location
$2 = path_concat(Jed_Home_Directory, ".jedrc");
if ( 1 == file_status($2) )
Default_Jedrc_Startup_File = $2;
Jed_Home_Directory = $1;
register_libdir(path_concat(Jed_Home_Directory, "lib");
}
> * rules
> + we can't compress any files in /u/s/d/j/txt/, because jed does not
> support this (Menu->Help->Browse Docs misses files)
A patch to popups.sl should solve this. E.g. (untested!)
add_files_popup_with_callback ($1, "&Browse Docs",
dircat (JED_ROOT, "doc/txt"),
- "\\C^.*\\.txt$",
+ "\\C^.*\\.txt",
&browse_docs_callback);
> + now do not install jed.conf anymore and install the *.sl files in
> /etc/jed.d/
/etc/jed.d/README.Debian-startup needs to be updated to this change.
(actually, this info should be in /u/s/doc/jed-common/README.debian.)
> Added: trunk/packages/jed/debian/patches/40_site.sl-startup.dpatch
> ===================================================================
...
> ++if (BATCH != 2) { % do not evaluate if jed is started as jed-script
> ++ $1 = listdir("/etc/jed.d/");
...
While this test will solve the "build a new jed version" problem, it is
IMHO not flexible enough. What, if soemone wants to use jed-script with
a function provided by e.g. jed-extra?
Once we are at patching site.sl, we could easily care for an environment
variable or command line option, e.g.
if (getenv("SKIP_JED_D") != NULL) {
...
Guenter
--
G.Milde web.de
More information about the Pkg-jed-commit
mailing list