"Positioning outside of hoisted outline" usually causes problems
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
leo-editor |
Fix Released
|
Medium
|
Edward K. Ream |
Bug Description
"Positioning outside of hoisted outline" can be done by many different bits of code in Leo-Editor (and its plugins). These many different bits of code are not consistent with one another and most of them do not do the positioning correctly.
Chapters are an optionally enabled option of Leo-Editor. Hoists are enabled by enabling plugin chapter_hoist.py. Selecting a non-main chapter is equivalent (for the purposes of this bug description) to hoisting that non-main chapter's root node. Hoist is done by clicking button "save-hoist" which does the hoist and creates a button to that when clicked will redo the hoist.
Two bits of code "correctly" deal with "Positioning outside of hoisted outline," but in manners that are inconsistent with one another:
Find (Ctrl-F) prints an error message to the Log tab and leaves the position unchanged.
goto-next-clone Alt-N is inconsistent with itself as well as with Find. That is, Alt-N acts one way if the hoist was done by selecting a non-main chapter, and a different way if the hoist was done by the save-hoist button:
1) Alt-N always begins by selecting the "main" chapter--even when the next clone is in the selected chapter. So Alt-N avoids all the problems because it can never "Position outside of hoisted outline."
2) When save-hoist does a hoist, Alt-N ignores all clones that are outside of the "hoisted outline." Again, Alt-N can never "Position outside of hoisted outline." And it can position between clones within the "hoisted outline." All well and good, except you can position on a node clearly marked as a clone by Leo-Editor, but Alt-N prints an error message to the Log pane saying roughly "The selected node is NOT a clone." (Because all its clones are "outside of hoisted outline.") This is puzzling and should probably be considered a bug.
Most of the other bits of positioning code behave in a consistently bad way, but a few work perfectly. See below.
For the little it is worth since I'm not going to fix these problems and don't understand Leo-Editor very well, I recommend the Ctrl-F (Find) behavior. That is, if the position change stays in the "hoisted outline" then it should be done without undoing the hoist that is in effect. If the request would position outside the "hoisted outline," then an error message should be printed to the Log pane and the position should be left unchanged.
Implementing my recommendation for the Nav tab is less than ideal. For the user to see an error messages in the Log tab the focus must be shifted to the Log tab. The Nav tab shows all the matches in all the chapters. Perhaps the matches in the non-selected chapters should be gray instead of black since it is impossible to position to them.
Headline-Body mismatch
All of the positioning commands listed below suffer from the following objectionable behavior:
When the new position is outside the "hoisted outline," the node selection shown in the outline pane does not change, but the body pane is changed to contain the body of the new position. This is a headline-body mismatch.
Positioning Commands suffering headline-body mismatch:
goto-first-node
goto-last-node
goto-next-changed
goto-next-
goto-next-marked (Ctrl-Shift-M)
goto-parent
goto-prev-
goto-prev-node
Position Changing Key Combinations suffering headline-body mismatch:
Alt-LeftArrow
Alt-RightArrow
These Command Work Fine in a hoisted outline
These commands work perfectly. Note that they should never position outside the "hoisted outline"--and they don't (provided you start from a position in the "hoisted outline." See bug 875323 https:/
goto-first-
goto-last-
goto-next-visible (Alt+Down)
goto-prev-visible (Alt+Up)
goto-first-sibling
goto-last-sibling
Changed in leo-editor: | |
assignee: | nobody → Edward K. Ream (edreamleo) |
importance: | Undecided → Medium |
Changed in leo-editor: | |
milestone: | none → 4.10-b1 |
Changed in leo-editor: | |
status: | Fix Released → In Progress |
Test System:
Ubuntu Studio 11.04
Leo-editor revision 4591
Leo-editor log pane on startup:
Leo Log Window bzrWork/ pluginPath/ leo/core bzrWork/ pluginPath/ leo/config bzrWork/ pluginPath/ leo/config/ leoSettings. leo .leo/myLeoSetti ngs.leo reverse- siblings goto-last- child alt-=
Leo 4.9 final, build 4411, June 21, 2011
Python 2.7.1, qt version 4.7.2
linux2
setting leoID from os.getenv('USER'): 'bob'
load dir: /home/bob/
global config dir: /home/bob/
home dir: /home/bob
reading settings in /home/bob/
reading settings in /home/bob/
reading settings in /home/bob/tmp/c.leo
reading: /home/bob/tmp/c.leo
global @command command-
global @command command-