On Fri, May 25, 2012 at 2:44 PM, tfer <[email protected]> wrote: > One of the schemes I'm contemplating would involve using non-printing plane > 15 and 16 unicode codepoints as embeddable smart "tab-stops". Such would > interact with saving and reading, but probably all able to be taken care of > by hooks rather than hacking the read/write code.
I should clarify my earlier statement about not interacting with the read/write code. It's perfectly possible that we might want to tweak such code. But it's not likely in this case because the problems are so straightforward. What I wanted to rule out were any kind of escape sequences that would affect how Leo parses files, especially external files. It turns out that such escape sequences are virtually impossible to support in a fault-tolerant way. More generally I will tolerate *no* contemplated change to Leo's sentinels or parsing code. Leo's read code simply is not going to treat any characters or patterns in a special way. > Such templates would consume all the tab-stops if filled out, but if the > templates are to be completed in the future, after a save, some state info > would have to be saved. Note that any left over tab-stops would probably > choke a language's interpreter/compiler, but the non-tabstop uncompleted > template leftovers would not make sense either. You are free to use uA's any way you want. And your scripts can do anything they want, subject only to the limitations I've repeated above. The most general way would be for your scripts to do their own reading and writing, independent of the code in leoFileCommands.py and leoAtFile.py. Your scripts are free, of course, to use any utilities in those files, or in leoGlobals.py, or anywhere else for that matter. In short, script writers should find it straightforward to implement templates. It's hard to believe that Leo's read/write code would have to change to support such scripts. Edward -- You received this message because you are subscribed to the Google Groups "leo-editor" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/leo-editor?hl=en.
