At present, when entering command names (but *not* file names) in the 
minibuffer, hitting tab repeatedly cycles through the list of names shown.

I would like to eliminate this "Easter Egg": it's clearly not needed and it 
greatly complicates truly important code, namely k.getArg.  

Worse, the present code doesn't work well if the user should happen to hit 
backspace to increase the number of completions shown.  In that case, the 
Easter Egg fails "forever", that is, until the user hits Ctrl-G or Return. 
Apparently, either nobody is using this Easter Egg, or nobody has ever 
noticed the bug, or they have noticed the bug and have given up on Leo as a 
result.

===== The code

Revising k.getArg is part of the project to eliminate the first <return> in 
vim-mode commands such as :r<return><file-name><return>

Yesterday I refactoring k.getArg so that it uses a helper GetArg class.  
This is an important encapsulation of complex code.  It moves lots of state 
variables out of the KeyHandlerClass class.  Most of this state involves 
the Easter Egg.

The new_arg switch at the start of leoKeys.py enables/disables the new 
code.  As of the latest rev, the code appears to work identically, 
regardless of this switch.  In particular, the bug in the Easter Egg exists 
regardless of the value of new_arg. Hehe.

===== The plan

My plan for this morning is to drop the Easter Egg in the GetArg class 
only.  I expect a substantial collapse in complexity: the new code will 
look very much like the corresponding (and much simpler) code in the 
FileNameChooser class.  Imo, this collapse in complexity is far more 
important than the Easter Egg.

I'll keep a copy of the present GetArg class in the "attic" leoNotes.py and 
revert to the old code in the unlikely event that somebody can convince me 
that the Easter Egg is essential.  Good luck with that.  I'll give weight 
only to those who actually use the Easter Egg at present.

Note that the new_arg switch is a temporary safety net.  As usual with such 
switches, it will be eliminated after the new code has been tested for a 
few days.

Your comments, please, and quickly.

Edward

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.

Reply via email to