jed-users mailing list

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

Re: Configuration problem


Hallo G.,

"G. Milde" <milde@xxxxxxxxxxxxxxxxxxxxx> wrote:
> 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?

You've removed the fix for #446444 and the definition for the keys Home
and End. This is the patch:

diff --git a/debian/init.d/05jed-common.sl b/debian/init.d/05jed-common.sl
index ad5260d..07a3f56 100644
--- a/debian/init.d/05jed-common.sl
+++ b/debian/init.d/05jed-common.sl
@@ -7,14 +7,6 @@ x_set_keysym (0xFFFF, 0, "\e[3~");
 #endif
 setkey ("delete_char_cmd", "\e[3~");
 
-% fix rxvt-unicode bug (Debian bug #446444)
-% resulting in inkonsistent keydef error
-#ifndef XWINDOWS
-require("keydefs");
-if (Key_Shift_Ins == "\e2$")
-   Key_Shift_Ins = "\e[2$";
-#endif
-
 % Fallback emulation (if the user has no ~/.jedrc config file)
 %
 % Possible values are "brief", "cua", "emacs", "edt", "ide", "jed",
@@ -23,7 +15,7 @@ if (Key_Shift_Ins == "\e2$")
 
 % Override (obsolete) code in site.sl that calls JED_ROOT/lib/jed.rc as
 % fallback configuration file
-Default_Jedrc_Startup_File = NULL;
+Default_Jedrc_Startup_File = NULL; % eventually overwritten below
 
 % Jed_Home_Directory (defined in site.sl, defaulting to $HOME)
 %
@@ -31,16 +23,47 @@ Default_Jedrc_Startup_File = NULL;
 % 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) ) {
-   Jed_Home_Directory = $1;
-   % set the default jedrc file path to ~/.jed/jed.rc
-   $2 = path_concat(Jed_Home_Directory, "jed.rc");
+   % 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");
-
-setkey("beg_of_line",  "\e[1~");  % Home
-setkey("eol_cmd",      "\e[4~");  % End

Bye, Jörg.
-- 
Man soll Denken lehren, nicht Gedachtes.

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


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