- Subject: Re: [Jed-users-l] slang function debugging?
- From: "John E. Davis" <davis@xxxxxxxxxxxxx>
- Date: Tue, 4 Jun 2013 12:11:31 -0400
Ulli Horlacher <framstag@xxxxxxxxxxxxxxxxxxxx> wrote:
> How can one debug an error in a slang function?
>
> I have substituted make_backup_filename() (from site.sl) with my own
> version:
>
> define make_backup_filename(dir,file) {
> variable f = dir + "/" + file;
> f = str_quote_string(f,"\"'`[](){}<>|;&$*? \t",'\\');
> system(sprintf("vv -s %s >/dev/null",f));
The system function returns a value that your are not handling. You
can change the above to:
() = system(sprintf("vv -s %s >/dev/null",f));
You might try using the process module to avoid escaping the filename:
require ("process");
define make_backup_filename (dir, file)
{
variable f = path_concat (dir, file);
() = new_process(["vv", "-s", f]; stdout="/dev/null").wait();
return "";
}
> It works well when I edit just one file, but when I edit more files and
> change their buffers, I get on exit :
>
> Unable to typecast Integer_Type to String_Type
You can add _traceback=1; to your .jedrc file. Then when an error
occurs, switch to the *traceback* buffer and look at the traceback
information.
I hope this helps.
--John
_______________________________________________
Jed-users-l mailing list
Jed-users-l@xxxxxxxx
http://mailman.jtan.com/mailman/listinfo/jed-users-l
[2013 date index]
[2013 thread index]
[Thread Prev] [Thread Next]
[Date Prev] [Date Next]