Startup
@file doc-startup.txt
Files, including home page
@auto-rst treecaching.txt
@edit html\conf.py
@edit html\leo_toc.html.txt
@edit leo_toc.html
@edit plugin_catalog.py
@file html/front.html
@url modified toc
Links that replace those in actual built page
@url docs generated from plugin_catalog.py
Read me first
Users Guide
Generating the Users Guide
@@button generate-full-userguide
<< html manual >>
<< pdf manual >>
@@button generate-userguide
<< html manual >>
<< pdf manual >>
Preliminaries
Front matter
@file frontMatter.txt
Preface
@file preface.txt
What people are saying about Leo
@file testimonials.txt
Basics
FAQ
@file FAQ.txt
Slideshows page
@file screen-shots.txt
Installing Leo
@file installing.txt
The Leo Tutorial
@file intro.txt
@file outline-commands.txt
@file nutshell.txt
Using Outlines
@file outlines.txt
Using Leo's Commands
@file commands.txt
Customizing Leo
@file customizing.txt
Intermediate Topics
Controlling syntax coloring
@file coloring.txt
Creating documents with Leo
@file rstplugin3.txt
Scripting Leo with Python
@file scripting.txt
Plugins
@file plugins.txt
Writing Plugins
@file writingPlugins.txt
Unit testing with Leo
@file unitTesting.txt
Debugging with Leo
@file debuggers.txt
Using @shadow
@file atShadow.txt
Leo and Other Programs
Leo and Emacs
@file emacs.txt
ILeo - the IPython bridge
@file IpythonBridge.txt
Embedding Leo with the leoBridge module
@file leoBridge.txt
Using Vim with Leo
@file vimBindings.txt
Using ZODB with Leo
@file zodb.txt
Reference
Leo's Reference
@file directives.txt
Designing with Leo
@file design.txt
History of Leo
@file history.txt
Theory of Operation
@file theory.txt
White papers
@file whitepapers.txt
Appendices
@file appendices.txt
Glossary
@file glossary.txt
What's New...
@file whatsnew.txt
Other docs
@file other_docs.txt
Slideshows
@file slideshows.txt
Release notes
@file release_notes.txt
Leo 4.9 Release notes
Deprecated/removed features
Bugs fixed in b1
Numbered bugs
Other bugs
Major improvements
Completed Leo's autocompleter
Greatly improved the viewrendered plugin
New and improved features
Colorizing improvements
New command-line arguments & settings
Gui improvements
Improved commands
File handling improvements
Scripting improvements
New in 4.9 b2
New in 4.9 b3
Bugs fixed
Simplified Leo's key handling
Features
Removed settings
New in 4.9 b4
New in 4.9 rc1
New in 4.9 final
@nocolor-node

These are the sources for Leo's users guide.

They contain sphinx markup. See::

http://sphinx.pocoo.org/ http://docutils.sourceforge.net/docs/user/rst/quickstart.html

To generate these docs, see the next node: "Generating the Users Guide"

Important files:

- doc\html\conf.py contains settings, including the name of the master toctree document, leo_toc.html.txt.

- leo_toc.html.txt contains a list of all file to be included.
@nocolor

For instruction about installing Leo see: http://webpages.charter.net/edreamleo/installing.html

For everything a beginner needs to know about Leo see: http://webpages.charter.net/edreamleo/intro.html

For help, please ask questions at: http://groups.google.com/group/leo-editor
# This section contains important files used to generate Leo's web site.
c:/leo.repo/trunk/leo/doc/leo_toc.html
@language html

<!-- EKR: changed these by hand to give the toc some structure -->

<p>Preliminaries</p>

<ul> <li class="toctree-l1"><a class="reference external" href="frontMatter.html">Front Matter</a></li> <li class="toctree-l1"><a class="reference external" href="preface.html">Preface</a></li> <li class="toctree-l1"><a class="reference external" href="testimonials.html">What People Are Saying About Leo</a></li> </ul>

<p>Basics</p>

<ul> <li class="toctree-l1"><a class="reference external" href="FAQ.html">FAQ</a></li> <li class="toctree-l1"><a class="reference external" href="slides.html">Slides</a></li> <li class="toctree-l1"><a class="reference external" href="installing.html">Installing Leo</a></li> <li class="toctree-l1"><a class="reference external" href="intro.html">The Leo Tutorial</a></li> <li class="toctree-l1"><a class="reference external" href="outlines.html">Using Outlines</a></li> </ul>

<p>Intermediate Topics</p>

<ul> <li class="toctree-l1"><a class="reference external" href="commands.html">Using Leo&#8217;s Commands</a></li> <li class="toctree-l1"><a class="reference external" href="customizing.html">Customizing Leo</a></li> <li class="toctree-l1"><a class="reference external" href="coloring.html">Controlling Syntax Coloring</a></li> <li class="toctree-l1"><a class="reference external" href="rstplugin3.html">Creating Documents with Leo</a></li> <li class="toctree-l1"><a class="reference external" href="scripting.html">Scripting Leo with Python</a></li> <li class="toctree-l1"><a class="reference external" href="plugins.html">Plugins</a></li> <li class="toctree-l1"><a class="reference external" href="writingPlugins.html">Writing Plugins</a></li> <li class="toctree-l1"><a class="reference external" href="unitTesting.html">Unit testing with Leo</a></li> <li class="toctree-l1"><a class="reference external" href="debuggers.html">Debugging with Leo</a></li> <li class="toctree-l1"><a class="reference external" href="atShadow.html">Using &#64;shadow</a></li> </ul>

<p>Leo and Other Programs</p>

<ul> <li class="toctree-l1"><a class="reference external" href="emacs.html">Leo and Emacs</a></li> <li class="toctree-l1"><a class="reference external" href="IPythonBridge.html">IPython and Leo</a></li> <li class="toctree-l1"><a class="reference external" href="leoBridge.html">Embedding Leo with the leoBridge module</a></li> <li class="toctree-l1"><a class="reference external" href="vimBindings.html">Using Vim Bindings with Leo</a></li> <li class="toctree-l1"><a class="reference external" href="zodb.html">Using ZODB with Leo</a></li> </ul>

<p>Reference</p>

<ul> <li class="toctree-l1"><a class="reference external" href="directives.html">Leo&#8217;s Reference</a></li> <li class="toctree-l1"><a class="reference external" href="design.html">Designing with Leo</a></li> <li class="toctree-l1"><a class="reference external" href="history.html">History of Leo</a></li> <li class="toctree-l1"><a class="reference external" href="theory.html">Theory of Operation</a></li> <li class="toctree-l1"><a class="reference external" href="whitepapers.html">White Papers</a></li> <li class="toctree-l1"><a class="reference external" href="appendices.html">Appendices</a></li> <li class="toctree-l1"><a class="reference external" href="glossary.html">Glossary</a></li> </ul>

Release Notes

<ul> <li class="toctree-l1"><a class="reference external" href="what-is-new.html">What&#8217;s New in Leo</a></li> </ul>
@nocolor-node

The children of this node contain two @button scripts. These are disabled, but you can execute them by selecting them and hitting Ctrl-B (execute-script).

To generate these docs by hand:

- From this file, run rst3 on desired tree. - cd leo\doc\html - make html

To create pdf (probably easiest on Linux, with necessary latex packages installed):

- make latex - cd _build/latex - make all-pdf

Important files:

- doc\html\conf.py contains settings, including the name of the master toctree document, leo_toc.html.txt.

- leo_toc.html.txt contains a list of all file to be included.
http://www.greygreen.org/tmp/plugins.html
@language rest

Leo 4.9 final June 21, 2011

Leo 4.9 final is now available at: http://sourceforge.net/projects/leo/files/

Leo is a text editor, data organizer, project manager and much more. See: http://webpages.charter.net/edreamleo/intro.html

The highlights of Leo 4.9: --------------------------

- The Qt gui completely replaces the Tk gui--Qt gui now has all essential features of Tk, including plugins.

- Completed Leo's autocompleter.

- The rendering pane can now display movies, html, svg images, etc.

- The scrolledmessage plugin can now use the rendering pane.

- Nodes may contain multiple @language directives.

- Leo highlights URL's everywhere. Ctrl-click URL's opens them in your web browser.

- Leo uses an @file node's extension by default if there is no @language directive in effect.

- Unified extract and import commands.

- Leo can now colorize multiple @language directives in a single node.

- Plain up/down arrow keys in headline-editing mode select a new node.

- New commands to insert, delete, change or print uA's.

- Added namespace directive to .leo files.

- Fixed many bugs, some important, most quite minor.

Links: ------ Leo: http://webpages.charter.net/edreamleo/front.html Forum: http://groups.google.com/group/leo-editor Download: http://sourceforge.net/projects/leo/files/ Bzr: http://code.launchpad.net/leo-editor/ Quotes: http://webpages.charter.net/edreamleo/testimonials.html
- Leo no longer supports the Tk gui. The Qt gui now does everything the Tk gui did, and more, and better.

- Removed show/hide/toggle minibuffer commands. The minibuffer is an essential part of Leo.

- These settings are no longer used::

@string selected-background-color @string selected-command-background-color

- The import-at-root command is no longer supported.
- Leo highlights URL's everywhere. Ctrl-click URL's opens them in your web browser.

- Nodes may contain multiple @language directives.

- Use @file extension by default if there is no @language directive in effect. This is oh so useful.

- Unified extract commands. This command creates a child node from the selected body text as follows:

1. If the selection starts with a section reference, the section name become the child's headline. All following lines become the child's body text. The section reference line remains in the original body text.

2. If the selection looks like a Python class or definition line, the class/function/method name becomes child's headline and all selected lines become the child's body text.

3. Otherwise, the first line becomes the child's headline, and all selected lines become the child's body text.

Note that the extract-section-names command remains. The extract-section and extract-python-method commands are gone.

- The import-file commands replaces all the following commands::

import-at-file import-cweb-files import-derived-file import-flattened-outline import-noweb-files

Leo chooses one of the above commands as follows. First, if the file looks like an external file that Leo wrote, the command works like import-derived-file command. Otherwise, the file's extension determines the importer::

.cw, .cweb: import-cweb-files .nw, .noweb: import-noweb-files .txt: import-flattened-outline all others: import-at-file

The import-at-root command is no longer supported.
Terminology: the *legacy* (aka tabbed) autocompleter shows completions in Leo's tabbed pane. The *new* (aka qcompleter) autocompleter shows completions in or near the body pane.

Appearance ==========

There is little change to the legacy completer, except that no text is highlighted in the body pane during completion. This is calmer than before. Furthermore, there is no longer any need for highlighting, because when the user types a backspace the legacy completer now simply deletes a single character instead of the highlighted text.

One minor change: the legacy completer now *does* insert characters that do not match the start of any possible completion. This is an experimental feature, but it might play well with using codewise completions as a fallback to leo-related completions.

Function and design ===================

Both the legacy and new completer now work *exactly* the same way, because they both use the AutoCompleterClass to compute the list of completions.

The strict "stateless" requirement means that the "intermediate" completions must be entered into the body pane while completion is active. It works well as a visual cue when using the tabbed completer: indeed, the tabbed completer would be difficult to use without this cue.

The situation is slightly different with the qcompleter. Adding code before the user accepts the completion might be considered an "advanced" feature. However, it does have two important advantages, especially when "chaining" across periods: it indicates the status of the chaining and it limits what must appear in the qcompleter window.

Codewise completions ====================

The codewise-oriented completions appear to work well. In large part, this is due to adding the global "self." completions to all class-related completions (kind == 'class' in ac.get_codewise_completions). This looks like a really good hack, and it eliminates the need for the ContextSniffer class.

Performance ===========

Performance of leo-related completions is *much* better than before. The old code used Python's inspect module and was horribly complex. The new code uses eval and is perfectly straightforward.

The present codewise-related code caches completions for all previously-seen prefixes. This dramatically speeds up backspacing. Global caching is possible because completions depend *only* one the present prefix, *not* on the presently selected node. If ContextSniffer were used, completions would depend on the selected node and caching would likely be impractical. Despite these improvements, the performance of codewise-oriented completions is noticeably slower than leo-related completions.

Performance notes =================

The ac.get_cached_options cuts back the prefix until it finds a cached prefix. ac.compute_completion_list then uses this (perhaps-way-too-long-list) as a starting point, and computes the final completion list by calling g.itemsMatchingPrefixInList.

This may not be absolutely the fastest way, but it is much simpler and more robust than attempting to do "prefix AI" based on comparing old and new prefixes. Furthermore, this scheme is completely independent of the how completions are actually computed. The autocompleter now caches options lists, regardless of whether using eval or codewise.

In most cases the scheme is extremely fast: calls to get_completions replace calls to g.itemsMatchingPrefixInList. However, for short prefixes, the list that g.g.itemsMatchingPrefixInList scans can have thousands of items. Scanning large lists can't be helped in any case for short prefixes.

Happily, the new scheme is still *completely* stateless: the completionDict does *not* define state (it is valid everywhere) and no state variables had to be added. In short, the new caching scheme is much better than before, and it probably is close to optimal in most situations.

The viewrendered plugin creates a window for *live* rendering of images, movies, sounds, rst, html, etc.

Commands ========

viewrendered.py creates the following (``Alt-X``) commands:

``viewrendered (abbreviated vr)`` Opens a new rendering window.

By default, the rendering pane renders body text as reStructuredText, with all Leo directives removed. However, if the body text starts with ``<`` (after removing directives), the body text is rendered as html.

**Important**: The default rendering just described does not apply to nodes whose headlines begin with @image, @html, @movie, @networkx, @svg and @url. See the section called **Special Renderings** below.

Rendering sets the process current directory (os.chdir()) to the path to the node being rendered, to allow relative paths to work in ``.. image::`` directives.

``hide-rendering-pane`` Makes the rendering pane invisible, but does not destroy it.

``lock-unlock-rendering-pane`` Toggles the locked state of the rendering pane. When unlocked (the initial state), the rendering pane renders the contents of the presently selected node. When locked, the rendering pane does not change when other nodes are selected. This is useful for playing movies in the rendering pane.

``pause-play-movie`` This command has effect only if the rendering pane is presently showing a movie. It pauses the movie if playing, or resumes the movie if paused.

``show-rendering-pane`` Makes the rendering pane visible.

``toggle-rendering-pane`` Shows the rendering pane if invisible, otherwise hides it.

``update-rendering-pane`` Forces an update of the rendering pane. This is especially useful for @graphics-script nodes: such nodes are update automatically only when selected, not when the body text changes.

Rendering reStructuredText ==========================

For example, both::

Heading -------

`This` is **really** a line of text.

and::

<h1>Heading<h1>

<tt>This</tt> is <b>really</b> a line of text.

will look something like:

**Heading**

`This` is **really** a line of text.

**Important**: reStructuredText errors and warnings will appear in red in the rendering pane.

Special renderings ===================

This plugin renders @image, @html, @movie, @networkx, @svg and @url nodes in special ways.

For @image, @movie and @svg nodes, either the headline or the first line of body text may contain a filename. If relative, the filename is resolved relative to Leo's load directory.

- ``@graphics-script`` executes the script in the body text in a context containing two predefined variables:

- gs is the QGraphicsScene for the rendering pane. - gv is the QGraphicsView for the rendering pane.

Using these variables, the script in the body text may create graphics to the rendering pane.

- ``@image`` renders the file as an image.

- ``@html`` renders the body text as html.

- ``@movie`` plays the file as a movie. @movie also works for music files.

- ``@networkx`` is non-functional at present. It is intended to render the body text as a networkx graph. See http://networkx.lanl.gov/

- ``@svg`` renders the file as a (possibly animated!) svg (Scalable Vector Image). See http://en.wikipedia.org/wiki/Scalable_Vector_Graphics **Note**: if the first character of the body text is ``<`` after removing Leo directives, the contents of body pane is taken to be an svg image.

- ``@url`` is non-functional at present.

Settings ========

- ``@color rendering-pane-background-color = white`` The background color the rendering pane when rendering text.

- ``@bool view-rendered-auto-create = False`` When True, show the rendering pane when Leo opens an outline.

- ``@bool view-rendered-auto-hide = False`` When True, hide the rendering pane for text-only renderings.

- ``@string view-rendered-default-kind = rst`` The default kind of rendering. One of (big,rst,html)

- ``@bool scrolledmessage_use_viewrendered = True`` When True the scrolledmessage dialog will use the rendering pane, creating it as needed. In particular, the plugins_menu plugin will show plugin docstrings in the rendering pane.

Acknowledgments ================

Terry Brown created this initial version of this plugin, and the free_layout and NestedSplitter plugins used by viewrendered.

Edward K. Ream generalized this plugin and added communication and coordination between the free_layout, NestedSplitter and viewrendered plugins.
- Support multiple @language directives in a single node As with @color directives, only unambiguous @language directives affect the default coloring of descendant nodes.

- Colorize url's in the body text. You can open url's by control-clicking on them, or by using the open-url command.

- Added support for cython colorizing.

- Leo ignores (and does not color) @language directive for unknown languages.

- Leo completely recolors nodes when you change @language directives by typing.
- The --no-splash command-line option suppresses the splash screen. Leo puts up no splash screen when the --silent or --script command-line options are given.

- Added @bool view-rendered-auto-create setting.

- Added @bool use_qcompleter setting.

- Added @bool auto_tab_complete setting.

- Added @bool single_click_auto_edits_headline setting.

- Removed @bool use_codewise setting.

- You now may set icon button colors in the Qt stylesheet.
- Added namespace and Leo comment lines to .leo files

- Leo opens leoSettings.leo only once

- Fixed Bug 745824: @doc duplicates comment delims in html files https://bugs.launchpad.net/leo-editor/+bug/745824e

- Leo no longer wraps @doc lines. This ensures that Leo does not change files unnecessarily.
- If you type a *plain* up/down arrow key while editing a headline, Leo will act as if you had typed the corresponding *alt*- arrow key. That is, Leo will end editing of the headline and go to the next previous node. Leo will end editing even if there is no next/ previous node, which is convenient.

- A single click on an already-selected tree node edits the headline Enabled only if @bool single_click_auto_edits_headline = True.

- Added a splash screen

The --no-splash command-line option suppresses the splash screen. In addition, Leo puts up no splash screen when the --silent or --script command-line options are given. To change the splash screen, replace leo\Icons\SplashScreen.jpg with another image.

- The apropos commands now print in a separate area if possible. The commands use the scrolledmessage plugin if possible, which in turn uses the viewrendered plugin by default. This makes the apropos messages much more visible.

- Handle click events like alt-x or ctrl-g Clicking in the minibuffer now is equivalent to alt-x, provided that the minibuffer is not in use. Clicking most places outside the minibuffer is equivalent to ctrl-g. Catching clicks is much safer than catching focus events.

- The first loaded file sets tabbed gui size

- Enter insert mode after ctrl-h. This is a vim-related improvement.

- Disabled find/change text areas in find panel. This is less confusing.
- Improved the clone-find-all command. The descendants of previously found (cloned) nodes don't get added again. The clone-find-all pattern now defaults to find text.

- Improved the forward and backward by sentences commands Leo's sentence related functions now stop at empty lines, skip periods within words, stop at sentences ending in non-periods and stop at the end or beginning of the buffer.

- Improved the print-bindings command; it now shows were bindings came from.

- Improved the reformat-paragraph command. The command detects paragraphs more reliably. The next line is now visible, which is a big improvement.

- Added patch to g.wrap_lines from José Rojas Echenique It regularizes the number of spaces after periods.

- Improved expansion of abbreviations. Abbreviations are checked any time a non-word character is typed. In particular, newlines trigger abbreviations, which I find very helpful, although I did then have to remove newlines from my abbreviations. Control sequences do not trigger expansions.

- Improved handling of @url nodes. The new rule is simple: if the body text contains any text the first line of the body text is taken to be the url. There is no longer any need to put '--' in the headline. More importantly, you can put anything you like in the body text following the first line. Other url's, notes, even .. graphics:: directives for the viewrendered plugin.

- Improved the clean-all-lines command. It is now much faster and has better feedback.
.. _`Runwith class`: http://groups.google.com/group/leo-editor/browse_thread/thread/b8e8fbf6d97fa9f2/a4537fafaf2442ba

- Added namespace arg in c.executeScript

- Put Kent Tenney's `Runwith class`_ in scripts.leo and contrib.

Kent writes, "I've had endless problems with interpreter versioning, leading me create the Runwith class. It writes a file to disk, makes it executable, runs it, captures exitcode, err and output, removes the files, provides reports. This provides complete decoupling from Leo."

- Call os.chdir when executing scripts.
- Double-clicking a headline now colorizers the headline exactly the same way as when editing the headline with ctrl-H. This was a serious problem for those with dark window-color schemes.

- The distribution script now ensures that leo\plugins\spellpyx.txt contains Linux-style newlines. This prevents crashes in the PyEnchant spell checker.

- Leo imports .cfg files just like .ini files.

- Fixed crasher in graphcanvas plugin caused by a bug in CommandChainDispatcher.add.
- Fixed bug 682561: pyenchant install problem.

https://bugs.launchpad.net/leo-editor/+bug/682561

- Fix bug 690260: g.es sends to wrong tabbed pane.

https://bugs.launchpad.net/leo-editor/+bug/690260

- Fixed bug 783617: Can't enter text directly in the Find panel

https://bugs.launchpad.net/leo-editor/+bug/783617

- Fixed bug 681797: Shift-Delete not working in Qt

https://bugs.launchpad.net/leo-editor/+bug/681797

- Fixed bug 622819: Ctrl-Shift movement is incorrect

https://bugs.launchpad.net/leo-editor/+bug/622819

Ctrl-Shift movement (back-word-extend-selection, forward-word-extend-selection) was incorrect when there is an existing selection, which was created by some method other than Ctrl-Shift movement.

- Resolved bug 323967: leo overrides minibuffer background color.

https://bugs.launchpad.net/leo-editor/+bug/323967

- Fixed actionscript colors for parens.

http://groups.google.com/group/leo-editor/browse_thread/thread/ee09fb2c2a5316f2/490fa7cddab36fab

- Fixed Bug 760531:Spurious overwrite warnings.

https://bugs.launchpad.net/leo-editor/+bug/760531

- Fixed important bug involving orphan nodes

http://groups.google.com/group/leo-editor/browse_thread/thread/861a0d156b16090f

This was an important bug. It's been around for a very long time. What I did:

- putVnode no longer clears the orphan bit.

- at.read issues a warning and does not read the external file if the orphan bit is set.

- Fixed bug: show-invisibles now correctly shows blank lines.

- Fixed bug 766747: fill-paragraph doesn't respect setting from set-fill-column.

https://bugs.launchpad.net/leo-editor/+bug/766747

The fill-paragraph, center-line and center-region now all use the fill column if it has been explicitly set (and greater than zero). Otherwise, these commands use the @pagewidth value. Previously, the fill-paragraph command used the page width set by the @pagewidth directive, or an initial value from a @setting if no @pagewidth directive was in effect.

- Fixed bug 583878: Leo should warn about @comment/@delims clashes.

https://bugs.launchpad.net/leo-editor/+bug/583878

Leo now warns when a node contains both @comment and @delims directives.

- Fixed bug 778204: @verbatim not forbidden in body text.

https://bugs.launchpad.net/leo-editor/+bug/778204

Leo now generates an error for sentinels that look like @verbatim.

- Fixed bug 784920: @raw mode does not ignore directives.

https://bugs.launchpad.net/leo-editor/+bug/784920

- Fixed bug 527717: Qt gui should enable/disable menu items.

https://bugs.launchpad.net/leo-editor/+bug/527717

- Fixed bug 580328: c.frame.toggleSplitDirection() doesn't preserve existing ratio.

https://bugs.launchpad.net/leo-editor/+bug/580328

- Fixed bug 581031: Scrollbar position is not preserved when c.frame.toggleSplitDirection() is executed.

https://bugs.launchpad.net/leo-editor/+bug/581031

toggleSplitDirection new ensures that both the selected outline node *and* the cursor in the body pane are visible.

- Fixed bug 525004: bash code not colored properly.

https://bugs.launchpad.net/leo-editor/+bug/525004

1. Fixed an off-by-one error in getNextToken. This was causing the havoc in the shell coloring.

2. match_mark_following now does *nothing* (fails) if there is no next token. This is a major change, and it allows more rules to match in the shell colorer.

- Fixed bug 626587: Menus & dialogs now say "Flatten Selected Outline".

https://bugs.launchpad.net/leo-editor/+bug/626587
** Changing @language directives now forces a recoloring.

This fixed the most annoying hangnail remaining in Leo.

** Removed remaining tk-isms from Leo's core.

These were real bugs: they prevent emacs commands from working.

Completely rewrote transposeWords.

** mod_autosave plugin no longer registers redundant idle-time handlers.

** Fixed mod_http plugin.

** Mark external file dirty when dragging node.

- Disabled the rst button in the contextmenu.

- Fixed horizontal scroll glitch in log pane (Python 2.x). qtLog.put sets horizontal scrolling to zero. This is a workaround to a glitch (Python 2.x only), but in fact it's generally useful.

- Fixed bug: auto-rst gives spurious overwrite message.

- Added bindings to all text widgets in the tab frame.

- Fixed goto-global-line problems.

- Restore positions of non-tabbed windows.

- Fixed Python 3.2 ua problems.

- Fixed bug in p._adjustPostionBeforeUnlink and simplified code.

- Fixed crash in archivedPositionToPosition.

- Fixed top-level uA's. There was a misspelling of 'unknownAttributes' in putVnode. This caused the uA for the first top level node in the outline to be cleared on save and by some copy paste ops.

- Fixed bug: Leo now ignores f-keys in find/replace patterns.

- c.bringToFront now activates the window.

- Fixed nav_qt plugin.

- Fixed completer focus problems.

- Fixed MacOS Command-C bug.

- Fixed major problem with multiple body editors
- Fixed ancient, major bug: F3 now makes sure to save headline changes

- Fixed old bug: set-find-x commands no longer abort find commands

The commands that switch find scope, set-find-xxx, no longer terminate the find command, if one is active. This is an old bug, and it's good to fix it.

- Fixed recent bugs in the viewrendered and scrolledmessage plugins

An earlier rev fixed a bug that effectively destroyed the viewrendered plugin. It was caused by the new convention that alleviates the need for many \@language directives. The fix was simply to enable the update_rst method if the massaged p.b is not empty.

ScrolledMessageDialog.convertMessage now renders rst by default, unless *either* the html or text button is pressed. There really should be three radio buttons: text, html or rST, but that's a tiny interface glitch. The actual bug however, was much more serious: rst was never being rendered.

- Fixed chapters problems

http://groups.google.com/group/leo-editor/browse_thread/thread/3f15a855ca38b26e

The new code is more relaxed about where @chapter nodes may reside. They are always *created* as the last child of the first @chapters node in the outline (the @chapters, plural, node is created as needed). However, you may move them while in the "main" chapter, with no ill effects. In fact, you could swap @chapter nodes with the same name: when you select a chapter, Leo will use (show) the first node it finds.

The new code is now both more careful and more tolerant of @chapter nodes deleted by hand. The chapter will still appear in the dropdown list: if you select it you will give a polite warning. That's all. In particular, the deleted chapter will *remain* in the dropdown list until you use the proper chapter-remove command. That's about the only sane alternative: it allows you to resurrect the chapter, by hand or with an undo.

This is all made possible because the new code is almost completely stateless. The only exception is the saved position used to select a node when selecting a chapter. The old position-based findPositionInChapter method has been simplified to make it work more reliably. It first looks for a "perfect" match using positions, and then degrades to looking for a vnode match. In practice, most matches are, in fact, perfect. The "imperfect" case typically happens when the user alters nodes in @chapter trees by hand in the "main" chapters.

Technical highlights:

- The check for c.positionExists(p) in c.setCurrentPosition continues to fail when deleting @chapter nodes. However, the code now simply falls back to c.rootPosition, without any apparent harm.

- The chapterController and chapter classes are now completely stateless, except for chapter.p.

A. chapter.findPositionInChapter has been simplified and generalized. It now falls back to a reasonable value, based on p.v, if chapter.p does not exist.

B. All chapterController code now recomputes the location of @chapters and @chapter nodes whenever those locations are needed.

C. All chapter commands are unchanged in their actual workings, but all contain a care "preamble" of checking code.

- Added unit test for all chapter commands. All interactive commands now have an xByName helper for use by unit tests.

- Added lockout to leoQtTreeTab. This prevents flash during the rename chapter command.

- Rewrote chapter.chapterSelectHelper. This reduces, but does not eliminate, the number of warnings given by c.setCurrentPosition.

- Fixed recent bug: handle 'Escape' character properly

The fix was a last-minute adjustment in leoQtEventFilter.create_key_event.

- Fixed caps-lock problem

The fix was yet another last-minute fix leoQtEventFiler.create_key_event.

- Made sure all keys contribute to lossage
This was a major simplification of Leo's core.

- Eliminated event.keysym from Leo's core: test only ev.char and ev.stroke.

- Replaced all dummy (g.bunch) events in Leo's core and in unitTest.leo.

- Replaced w.event_generate by g.app.gui.event_generate everywhere.

- Rewrote leoGui.leoKeyEvent.

- Created leoGui.create_key_event and leoQtEventFilter.create_key_event.

- Removed some ugly last-minute hacks in leoQtEventFilter.create_key_event.
- Changed names of commands so they have common prefixes

Any custom key bindings (none are bound by default) will have to change.

The new prefixes are::

abbrev- abbreviation commands buffer- buffer command directory- director commands file- file commands gc- garbage collection macro- macro expansion rectangle- rectangle commands register register commands

The already existing prefixes are::

apropos- help ddabrev- dynamic abbreviations find- find commands isearch- incremental search print- print information run- run unit tests toggle- toggle settings yank- yank

- Finished macros

The macro-load and macro-save are as simple as possible.

No further work will be done on macros unless somebody really wants these commands.

- Added support for word-only option for regular expressions

When the word-only option is in effect, Leo ensures that the search pattern begins and ends with the '\b' anchor.

- Leo's startup code now forces the qt gui: it changes qttabs to qt.

- Added support for expanded sections in plugin. Added three new options:

expand_noweb_references

True: Replace references by definitions. Definitions must be descendants of the referencing node.

ignore_noweb_definitions

True: ignore section definition nodes.

expand_noweb_recursively

True: recursively expand definitions by expanding any references found in definitions.

Notes:

- This is an experimental feature: all aspects might changed.

- The code ensures that unbounded expansions can not happen. While expanding any section, the rst3 will not expand again any sections that have already occurred in the expansion.

- All rst3 options apply to the entire node in which they appear (and all descendant nodes until over-ridden), but by splitting nodes one can change the settings on an expansion-by-expansion basis. It is easy to split nodes without creating new sections using @rst-no-head in the headline.
The following Tk settings have been removed from leoSettings.leo::

@bool center_selected_tree_node @bool expanded_click_area @bool idle_redraw @bool initialClickExpandsOrContractsNode @bool invisible_outline_navigation @bool look_for_control_drag_on_mouse_down @bool outline_pane_scrolls_horizontally @bool use_minibuffer

The following setting was not active, and has also been removed::

@bool ignore_caps_lock
Old bugs fixed --------------

- Fixed an ancient bug: everything after @all was put in the wrong node!

- Fixed an ancient bug: wrap-around search now restarts when find pattern changes

- Fixed an ancient bug: F-keys end incremental searches.

Recent bugs fixed -----------------

- Fixed a recent problem with commands dispatched from menus The Shift modifier was deleted from all commands executed by selecting an item in menus! A new unit test checks that menus behave as expected.

- Dismiss splash screen before putting up the dialog that asks for an ID.

Other changes -------------

- Running all unit tests leaves all files unchanged. This was a major annoyance.

- Leo now does a keyboard-quit when deactivating a window.
- When running on MacOS, Leo uses the qt gui when the qttabs gui is requested.

- Leo now looks in home/.leo/Icons directory for icons before looking in the leo/Icons directory. http://groups.google.com/group/leo-editor/browse_thread/thread/80163aec96b8ea45/4f58418924172252

- Fixed bug 797470: File data sometimes silently erased when the tangler fails. https://bugs.launchpad.net/leo-editor/+bug/797470 This was a serious bug, but it could happen only when saving an errorneous file twice.

- Fixed bug 798194: --maximized has no effect https://bugs.launchpad.net/leo-editor/+bug/798194

- Added the @bool forbid_invalid_completions setting.

- Non-plain keys, such as Ctrl-s, abort auto-completion and are interpreted as usual.

- Don't mark the .leo file as changed when setting orphan bit. There is no need: the orphan bits will ensure errors get reported if the file is saved.

- Disabled the open-compare-window command. It is/was a Tk only command.

- The open-python-window command fails more gracefully It issues a message instead of crashing if idlelib does not exist.
Fixed crash on mouse clicks in minibuffer.
@language python import os pos = c.find_h("Users Guide")[0] c.selectPosition(pos) c.k.simulateCommand('rst3') << html manual >> << pdf manual >>
d = c.scanAllDirectives(p) mandir = d.get('path') + "/html" g.es(mandir) os.chdir(mandir) os.system('make html')
# you probably need to install several packages # to create pdf (e.g. jadetex) mandir = d.get('path') + "/html" g.es(mandir) os.chdir(mandir) os.system('make latex') os.chdir('_build/latex') os.system('../../fixup.pl < Leodocumentation.tex > LeoDoc.tex') os.system('make LeoDoc.pdf')
import os pos = c.find_h("Users Guide")[0] c.selectPosition(pos) c.k.simulateCommand('rst3') << html manual >> # no pdf manual creation, perhaps too "involved" for many
mandir = g.app.leoDir + "/doc/html" g.es(mandir) os.chdir(mandir) os.system('make html')
# you probably need to install several packages # to create pdf (e.g. jadetex) mandir = g.app.leoDir + "/doc/html" g.es(mandir) os.chdir(mandir) os.system('make latex') os.chdir('_build/latex') os.system('make all-pdf')