- Subject: Re: [Jed-users-l] slang function debugging?
- From: Ulli Horlacher <framstag@xxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 5 Jun 2013 08:49:38 +0200
On Tue 2013-06-04 (12:11), John E. Davis wrote:
> > 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));
This eliminates the error
Unable to typecast Integer_Type to String_Type
but I do not understand why it has occured?
Ok, there is a value on the stack left, but why does ot harm?
> 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 "";
> }
I get an error:
framstag@fex:/sw/share/jedlib-0.99-19/lib: jed -batch
loading /sw/ubuntu-10.04/jed-0.99-19/jed/lib/site.slc
loading /sw/ubuntu-10.04/jed-0.99-19/jed/lib/os.sl
loading /sw/ubuntu-10.04/jed-0.99-19/jed/lib/menus.slc
loading /sw/ubuntu-10.04/jed-0.99-19/jed/lib/defaults.sl
loading /sw/ubuntu-10.04/jed-0.99-19/jed/lib/emacs.slc
loading /sw/ubuntu-10.04/jed-0.99-19/jed/lib/edt.slc
loading /sw/ubuntu-10.04/jed-0.99-19/jed/lib/regexp.slc
loading /sw/ubuntu-10.04/slang-2.2.4/share/slsh/require.sl
loading /sw/ubuntu-10.04/jed-0.99-19/jed/lib/srchmisc.slc
loading /sw/ubuntu-10.04/jed-0.99-19/jed/lib/keys.sl
loading /sw/ubuntu-10.04/jed-0.99-19/jed/lib/keydefs.slc
loading /sw/ubuntu-10.04/jed-0.99-19/jed/lib/misc.slc
loading /sw/ubuntu-10.04/slang-2.2.4/share/slsh/process.sl
loading /sw/ubuntu-10.04/slang-2.2.4/share/slsh/fork.sl
loading /sw/ubuntu-10.04/slang-2.2.4/share/slsh/fcntl.sl
loading /sw/ubuntu-10.04/slang-2.2.4/share/slsh/sysconf.sl
pipe cannot be re-defined
/sw/ubuntu-10.04/jed-0.99-19/jed/lib/defaults.sl:779:<top-level>:Duplicate Definition
Traceback: evalfile
/sw/ubuntu-10.04/jed-0.99-19/jed/lib/site.sl:3304:<top-level>:Duplicate Definition
--
Ullrich Horlacher Informationssysteme und Serverbetrieb
Rechenzentrum IZUS/TIK E-Mail: horlacher@xxxxxxxxxxxxxxxxxxxx
Universitaet Stuttgart Tel: ++49-711-68565868
Allmandring 30a Fax: ++49-711-682357
70550 Stuttgart (Germany) WWW: http://www.tik.uni-stuttgart.de/
REF: <201306041611.r54GBVoo017982@xxxxxxxxxxxxxx>
_______________________________________________
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]