On Monday, January 30, 2017 at 8:57:27 AM UTC-6, Edward K. Ream wrote: > I'll probably merge the demo branch into master later today.
That's not going to happen until all work is complete. Indeed, the most interest remaining work involves changes to leo/core/leoKeys.py. The rest of this post is a progress report. *tl;dr:* The plugin is a great success. At least a day's more work is needed. The guiding principle is that the plugin can and *should *do as little as possible. The only *essential* function is to support the demo-next and demo-end commands. In addition, it's ok to provide a *few *convenience methods for showing menus, putting up callouts, changing text magnification etc. These *could* be done in demo scripts, but the code isn't so obvious. But everything else can, and should, be done in the demo scripts themselves. For example, instead of providing multiple methods for animating text in various places, the demo.keys method will animate the typing of keys *anywhere*, that is, in any widget. Demo scripts can use c.editHeadline to type in the headline or c.bodyWantsFocusNow() to put focus in the body pane. Instead of providing endless "faux-convenience" methods, the documentation will *teach by examples*, a new application of the "less said the better" principle. *Undo* Undo is the hidden driver of the design. I'll skip most of the details here. The new philosophy is to have demo scripts handle undo themselves. Furthermore, undo eliminates the need for demo-back. Without an internal state handler, demo scripts *can* handle undo. *Handling demo-next cleanly*At present, the demo-next command completely alters Leo's key-handling state ivars. Adding state-handling back to the demo plugin is out of the question. Instead, k.masterKeyHandler will special-case the shortcut for demo-next *without* changing any of the myriad of state ivars in the KeyHandler class. It will work much like the special case code for Ctrl-g (keyboard-quit). This will allow two demo scripts to work together to execute a command from the minibuffer. The first demo script could do: demo.key('Alt-x') demo.keys('insert-node') The second demo script could actually invoke the command with: demo.key('\n') The present workaround is to do it all in one node: demo.key('Alt-x') demo.keys('insert-node') demo.wait(3) demo.key('\n') I estimate this work will take at least one more day. It may be put on hold while I fix urgent colorizing bugs. 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 leo-editor+unsubscr...@googlegroups.com. To post to this group, send email to leo-editor@googlegroups.com. Visit this group at https://groups.google.com/group/leo-editor. For more options, visit https://groups.google.com/d/optout.