Joachim Schmitz <js@xxxxxxxxxxxxx> wrote:
The code looks quite ok to me. Any help is apreacheated.
Apparantly one of the functions is not preserving the current buffer.
You might try using the debugger, which is not yet fully integrated
into jed. Nevertheless, you can try the following to get an idea
about how it will eventually work:
1. Put the following code in your .jedrc file:
autoload ("sldb", "sldbsock");
define _line ()
{
variable beg, end;
push_spot ();
push_mark ();
bol ();
beg = bufsubstr ();
pop_spot ();
push_spot ();
push_mark ();
eol ();
end = bufsubstr ();
pop_spot ();
return strcat (beg, "^", end);
}
define debug (files)
{
if (NULL != getenv ("DISPLAY"))
{
variable pgm = path_concat (_slang_install_prefix, "share/slsh/scripts/sldb");
pgm = sprintf ("(sleep 1; xterm -e '%s' --pid %d) &", pgm, getpid ());
() = system (pgm);
}
sldb (files[0]);
}
2. Run jed via:
jed -hook debug svn.sl
3. At the (sldb) prompt, you can use
(sldb) p _line
to see the current line.