On Fri, Jun 24, 2011 at 10:03 AM, Henry <[email protected]> wrote:

> I'm a college student in Germany and I'm struggling with leo (which I,
> by the way, find quite fascinating). Sadly enough, I wasn't able to
> find any real guide to the program but the online guide at
> http://webpages.charter.net/edreamleo/front.html

http://webpages.charter.net/edreamleo/leo_toc.html


> So with this knowledge at hand, I tried to use leo to script c-code
> via cweb...and failed horribly (since cweb uses @-symbols for it's
> markups too).

Leo does, in fact, recognize @language cweb, although the colorizer
doesn't colorize cweb code because there is no leo/modes/cweb.py file.

Give a root node (headline = @file cweb-test.cw)::

@language cweb

Test

<< cweb section >>

And a child node (headline = << cweb section >>):

// This is a cweb comment.

The output of a cweb test file is::

@q@@+leo-ver=5-thin@>
@q@@+node:ekr.20110624114913.1819: * @@file cweb-test.cw@>
@q@@@@language cweb@>

Test

@q@@+<< cweb section >>@>
@q@@+node:ekr.20110624114913.1820: ** << cweb section >>@>
// This is a cweb comment.

@q@@-<< cweb section >>@>
@q@@-leo@>

I'm not actually sure this works, or how it works if it does work :-)

In leoApp.leo, that is, leoPy.leo, the node: Code-->Core
classes-->@file leoApp.py-->app.__init__--><< define global data
structures >> (leoApp.py)

There is this line::

   "cweb"          : "@q@ @>", # Use the "cweb hack"

This is the line that allows Leo to read external files when @language
cweb is in effect.  It doesn't seem like valid cweb, but my memory is
foggy.

Let me know what changes you want.  It's been ages since anyone did
anything with cweb.  The way to get cweb mode working is for somebody
to use it :-)

Edward

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

Reply via email to