Incremental is harder than once

23 views
Skip to first unread message

Edward K. Ream

unread,
Jul 20, 2017, 11:24:49 AM7/20/17
to leo-editor
I am much more interested in Vitalije's new read code than in the v-lines branch or in file line numbers.  No matter how complex code may be, code that executes only at well-defined times will be easier to debug and test than code that must be called continuously.

Let us suppose that there is a clever way of computing "file" line numbers. We can ask, "how long will those line numbers be valid?".  The answer: not necessarily past the next key stroke.  Deleting, moving or promoting nodes will have "global" effects, as will changing any body text before an @others directive or section reference.  Arbitrarily many nodes may see that their starting line number have changed.

Leo has no way of tracking such changes. Even if it did, the only reliable way of recomputing file line numbers would be to use Leo's "official" file write logic. I see no way of short-cutting that logic.

Despite its complexity, we can seriously consider rewriting Leo's file read/write code because it is called only at well-defined times. Likewise for Leo's import code, which has me wonder whether Vitalije's new read code might also be used to simply Leo's importer code.

Edward
Reply all
Reply to author
Forward
0 new messages