mailing-list for TeXmacs Users

Text archives Help


Re: How to execute scheme code within TeXmacs ?


Chronological Thread 
  • From: Joris van der Hoeven <address@hidden>
  • To: Nicolas Girard <address@hidden>
  • Cc: address@hidden
  • Subject: Re: How to execute scheme code within TeXmacs ?
  • Date: Thu, 5 Dec 2002 15:07:50 +0100 (MET)


> 1. I tried to enter scheme expressions -- or what i thought to be scheme
> expressions -- directly within the editor after hitting M-x. For
> example if i enter:
>
> (section ("Aaa"))
>
> or
>
> (section (arg "Aaa"))
>
> i get the following message:
>
> (misc-error #f "Unbound variable: %S" (section) #f)
>
> What does it mean ? Are these expressions incorrect ? Should i use
> other string delimiters ?

Try the following (this works in the last version of TeXmacs):

1) Select "Tools -> Selections -> Import -> Scheme".

2) Cut (section "Introduction") from another application and
paste it inside TeXmacs.

In order to know how the scheme code looks like, you can export
a file to scheme, or copy and paste it as scheme.

> 2. In a test document, say 'toto.tm', i added the following:
>
> <extern|tm.sh>
>
> which supposely should execute the script file named 'tm.sh'.
> I also tried something like
>
> #!/bin/sh
> echo "(section (arg "Aaa"))"
> echo "\;"
>
> but encountered the same message:
>
> (misc-error #f "Unbound variable: %S" (tm.sh) #f)

Try the following:

1) Select "Edit -> Preferences -> Security -> Accept all scripts".

2) Type "M-e e" for starting an "extern".

3) Enter "string-append tab Hi tab there",
so that you have <extern|string-append|hi|there>,
and press return.

You should see the evaluation of (string-append "hi" "there"),
which is "hithere", on your screen. The extern commands are
scheme commands; you may use "eval-system" for evaluating
a shell command.




Archive powered by MHonArc 2.6.19.

Top of page