simple example fails

4 views
Skip to first unread message

Roger Mason

unread,
May 7, 2010, 11:07:28 AM5/7/10
to amrita...@googlegroups.com
Hello,

I'm playinng with a simple example:

fold::amrita {
set str = filename
set str .= .tex
fold::print {
fold> file = $str
fold> print fold::context []
fold::context { do something interesting
\starttext
Hello, world!
fold::context { and so on
\stoptext
}
}
}
}

but it fails with:

Error at line 19 of file context2.amrita:
missing '}' from line 1!

Line 19 is:


error near:
end of line

I have verified that the fold:: and brackets line up (although it may
not appear so in e-mail).

Thanks,
Roger

--
You received this message because you are subscribed to the Google Groups "amrita-ebook" group.
To post to this group, send email to amrita...@googlegroups.com.
To unsubscribe from this group, send email to amrita-ebook...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/amrita-ebook?hl=en.

James Quirk

unread,
May 7, 2010, 11:15:25 AM5/7/10
to Roger Mason, amrita...@googlegroups.com
Roger,

On Fri, 7 May 2010, Roger Mason wrote:

> Hello,
>
> I'm playinng with a simple example:
>
> fold::amrita {
> set str = filename
> set str .= .tex
> fold::print {
> fold> file = $str
> fold> print fold::context []
> fold::context { do something interesting
> \starttext
> Hello, world!
> fold::context { and so on
> \stoptext
> }
> }
> }
> }
>
> but it fails with:
>
> Error at line 19 of file context2.amrita:
> missing '}' from line 1!
>
> Line 19 is:
>
>
> error near:
> end of line
>
> I have verified that the fold:: and brackets line up (although it may
> not appear so in e-mail).
I cut-n-pasted your script and it works at this end.
Do you have any tabs in your script? If so, that
will mess up the fold nesting. But you can send it
as an attachment, so that I can check it. You can also
run the script with the -maiit option which will produce
something you can e-mail.

James

p.s. Did you write the script using amrgi? If so,
the brackets are guaranteed to line up.

Roger Mason

unread,
May 7, 2010, 11:58:16 AM5/7/10
to James Quirk, amrita...@googlegroups.com
James Quirk <j...@galcit.caltech.edu> writes:

> I cut-n-pasted your script and it works at this end.
> Do you have any tabs in your script?

Yes, that was the problem. It works here too now.

> If so, that
> will mess up the fold nesting. But you can send it
> as an attachment, so that I can check it. You can also
> run the script with the -maiit option which will produce
> something you can e-mail.

OK. The output includes what looks like garbage:

AmritaMailit::context2.amrita {
origin {
Amrita v3.05 R25-04-2010
user ???? (aka ????)
date Fri May 7 13:15:28 NDT 2010
}
resources {
hardware {
disk 0 KBytes
cpu 0 secs
}
}
operation {
amrita -mailit context2.amrita
}
script {
M'XL(")DUY$L``V-O;G1E>'0R+F%M<FET82YM86EL:70N=&%R`.W2P4K$,!`&
MX)S[%"-XE)*TL<+">O8=U$/89K60)DL242A]=Y/-0KL+XFD1X?\N4_[.#(%D
MYVS47[&IU>B'J-@U\*23,E=YSYMU/9)=PX1H'P1O&]EVC(M6<L&(7^4T%SY"
M5)Z(^5$%9W_N^^W_/[5WIM]LRN731!41!1TI1$];V@]&6S7J=5IOJ4XO)D=E
M]N`'&VG*P2E[/`ZF^=LT<):7WC*W*R^/GE]7+4L\4>\HN%'']\&^49K37H>8
MOD_MR4N^NYC;E^Q)&^/NZ--YT]\L\>5R9?NTG9Q=6LI"=SC?-U>K.E=S]=<W
=!@``````````````````````4'P##VK`'0`H````
}
}

I could not find documentation on -mailit.

> p.s. Did you write the script using amrgi? If so,
> the brackets are guaranteed to line up.

No, I used emacs. I have been working on an amrita-mode. There is
nothing wrong with origami: it is just that my fingers are hard-wired to
emacs keybindings. My amrita-mode is crude at the moment, but can be
used for simple scripts. I just fixed it to use spaces instead of
tabs+spaces for indenting.

Cheers,

James Quirk

unread,
May 7, 2010, 12:04:38 PM5/7/10
to Roger Mason, amrita...@googlegroups.com
Roger,

>
> OK. The output includes what looks like garbage:
>
> AmritaMailit::context2.amrita {
> origin {
> Amrita v3.05 R25-04-2010
> user ???? (aka ????)
> date Fri May 7 13:15:28 NDT 2010
> }
> resources {
> hardware {
> disk 0 KBytes
> cpu 0 secs
> }
> }
> operation {
> amrita -mailit context2.amrita
> }
> script {
> M'XL(")DUY$L``V-O;G1E>'0R+F%M<FET82YM86EL:70N=&%R`.W2P4K$,!`&
> MX)S[%"-XE)*TL<+">O8=U$/89K60)DL242A]=Y/-0KL+XFD1X?\N4_[.#(%D
> MYVS47[&IU>B'J-@U\*23,E=YSYMU/9)=PX1H'P1O&]EVC(M6<L&(7^4T%SY"
> M5)Z(^5$%9W_N^^W_/[5WIM]LRN731!41!1TI1$];V@]&6S7J=5IOJ4XO)D=E
> M]N`'&VG*P2E[/`ZF^=LT<):7WC*W*R^/GE]7+4L\4>\HN%'']\&^49K37H>8
> MOD_MR4N^NYC;E^Q)&^/NZ--YT]\L\>5R9?NTG9Q=6LI"=SC?-U>K.E=S]=<W
> =!@``````````````````````4'P##VK`'0`H````
> }
> }
>
> I could not find documentation on -mailit
A discussion of their operation and purpose is give in VKI lecture #1.

>
> > p.s. Did you write the script using amrgi? If so,
> > the brackets are guaranteed to line up.
>
> No, I used emacs. I have been working on an amrita-mode. There is
> nothing wrong with origami: it is just that my fingers are hard-wired to
> emacs keybindings. My amrita-mode is crude at the moment, but can be
> used for simple scripts. I just fixed it to use spaces instead of
> tabs+spaces for indenting.
Unless your mode includes folding then you will not benefit from
fold::print's construction, or at least not in the way it was intended.

James
Reply all
Reply to author
Forward
0 new messages