jed-users mailing list

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

Re: Configuration problem


On  5.11.08, Michele Dondi wrote:

> In my case, as a *user*, I just tend to copy the files in my home from 
> one account to another. In this case, I didn't even do so: the admins 
> just changed the underlying OS: users' homes are mounted via nfs. It is  
> obnoxious that my favourite editor just "stopped working" upon such a  
> change, given the the OS is of "the same breed" after all...

The attached version of /etc/jed.d/05jed-common.sl should fix this issue and
provide backwards compatibility.

Jörg, could we apply this fix to jed-common and adapt the documentation?

Günter
% debian 05jed-common.sl              -*- slang -*-

% make delete key delete the character under the cursor
% (section 10.8 of the Debian Policy)
#ifdef XWINDOWS
x_set_keysym (0xFFFF, 0, "\e[3~");
#endif
setkey ("delete_char_cmd", "\e[3~");

% Fallback emulation (if the user has no ~/.jedrc config file)
%
% Possible values are "brief", "cua", "emacs", "edt", "ide", "jed",
% "wordstar", and (with jed-extra) "vi".
%_Jed_Default_Emulation = "emacs";  % already set in site.sl

% Override (obsolete) code in site.sl that calls JED_ROOT/lib/jed.rc as
% fallback configuration file
Default_Jedrc_Startup_File = NULL; % eventually overwritten below

% Jed_Home_Directory (defined in site.sl, defaulting to $HOME)
%
% If a subdir ~/.jed/ exists, point Jed_Home_Directory there,
% so .jedrc and .jedrecent are not spoiling the $HOME dir (FHS 2.3)
$1 = path_concat(Jed_Home_Directory, ".jed");
if ( 2 == file_status($1) ) {
   % Adapt the user config file path:
   % a) command_line_hook() in site.sl tries with ~/.jed/.jedrc
   % b) recommended location: ~/.jed/jed.rc
   % c) backwards compatible: ~/.jedrc
   $2 = path_concat($1, "jed.rc");
   if (file_status($2) == 1)
     Default_Jedrc_Startup_File = $2;
   $2 = path_concat(Jed_Home_Directory, ".jedrc");
   if (file_status($2) == 1)
     Default_Jedrc_Startup_File = $2;
   % now set the variable:
   Jed_Home_Directory = $1;
}

% Add slsh library dir 
% (Bug in site.sl misses this if slsh/local-packages does not exist)
$1 = path_concat (_slang_install_prefix, "share/slsh/");
if (2 == file_status($1))
   set_jed_library_path(strcat(get_jed_library_path(), ",", $1));

% Add slsh documentation (site.sl misses this)
%
% You might add directories containing site-wide local help files to the array
foreach (["/usr/share/slsh/help",
          "/usr/share/slsh/local-packages/help"])
{
   $1 = ();
   if (file_status($1) != 2)
     continue;

   foreach (listdir($1))
     {
        $2 = ();
        if (path_extname($2) == ".hlp")
          % the doc path set with add_doc_file() is currently not
          % recognized by the standard help.sl
          % add_doc_file( path_concat($1, $2) );
          Jed_Doc_Files += "," + path_concat($1, $2);
     }
}

% do not call info_mode() for *.info files
% (as info_mode is no editing mode but an info reader mode!)
add_mode_for_extension("no", "info");

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