Appendix 3 to Chapter 4:

Using @thin and @all

In most respects @thin works just like @file. In fact, you can convert from @file to @thin simply by opening an outline, changing @file to @thin, and saving the outline.

Here are the differences between @file and @thin:

- Leo does not save the information contained in the @thin tree in the .leo file.

- Files derived from @thin (so-called "thin" derived files) contain all information needed to recreate the @thin tree in the outline. In particular, @+node and @-node sentinels use gnx's to uniquely identify nodes.

- The @all directive is valid only in @thin trees. This directive is similar to @others, but it is less restrictive: it dumps all nodes to the derived file, including @ignore nodes and nodes that in an @others tree would be considered to be orphan nodes.

The @all directive is required for files such as @thin leoProjects.txt in LeoPy.leo. leoProjects.txt contains so-called project nodes. It doesn't have an meaning as a program file: it is simply a collection of unrelated data. @others would not work at all: Leo would complain about lots of orphan nodes.

The great advantage of using @thin is that people can collaborate without having to continually update .leo files

  • Developers only need to commit thin derived files to cvs.
  • The cvs repository contains "reference" .leo files. These reference files should containing nothing but @thin nodes.
  • Reference files will change only when new derived files get added to the project.
  • Developers will use local copies of reference files for their own work.
  • For example, instead of using LeoPyRef.leo directly, I use a copy call LeoPy.leo. My
    local copy can contain nodes other than @thin nodes.