jed-users mailing list

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

Re: Intention of jed-script


Joerg Sommer <joerg@xxxxxxxxxxxx> wrote:
>can anyone explain me what's the intention of jed-script? Is it a slang
>interpreter in jed?

It allows one to run jed scripts in batch mode with command line
parameters passed to the script.  For example, the jed and slang web
pages are constructed from a jed-script called `tmexpand`, which is
available from <http://www.jedsoft.org/jed/madewithjed.html>.

>If yes, I think it should not load site.sl, because there are not options
>to tell jed-script to not load user config, which leads to bizarre
>effects.

jed-script does not load your .jedrc file.  For example, put

  if (BATCH)
    message ("Running in batch-mode");

in your .jedrc file, and then run `jed --batch`.  Now create a script,
e.g., /tmp/foo that contains:

  #!/usr/bin/env jed-script
  vmessage ("jed-script running: BATCH=%d", BATCH);

and then run it using either `/tmp/foo` or `jed-script /tmp/foo`.
This test should show that your .jedrc file does not load.

If you want your jed-script to load your .jedrc file, then you must
load it from the script, e.g.,

   () = evalfile ("$HOME/.jedrc"$);   % slang-2 syntax

If you want to run a pure slang script that makes use of only slang
intrinsics then slsh should be used.

I hope this help clarify things a bit.
Thanks,
--John



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


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