I have been telling various people that today has been one of the happiest days of my life.
It would be hard to overstate how important being able to update @nosent files will prove to be. I have been trying to rationalize why sentinels are needed for about 20 years. Now I don't have to. Yes, sentinels *are* still needed, but Leo can get them from the .leo file! Bernhard Mulder's @shadow algorithm has always been a work of genius. Applying that algorithm to *any* external file will be revolutionary. Suddenly, we can all use Leo **without appologies** and **without compromises**. Suddenly, we no longer have to use sentinels when they are inconvenient. I had no idea how inconvenient @file could be until today. At last, the blinders are off! @nosent now combines the best features of both @shadow and @auto without any negatives. There are at least 3 *huge* advantages of @nosent overs @auto: 1. The @shadow algorithm remembers where lines should go in the outline. Yes, the algorithm can guess wrongly when importing a new line, but once the user puts the line in their preferred place, later invocations of the algorithm will remember that preference. In contrast, @auto is completely rigid: you get the nodes that the importer gives you, period. 2. @nosent trees now remember uA and gnx's. The new @nosent is the ultimate @persistence scheme, without any additional code! 3. The @shadow algorithm is completely general: it works with *all* kinds of files. The algorithm uses only the structure of the outline. The @shadow algorithm works without *any* knowledge of the text it is diffing! The new @nosent scheme also has two *huge* advantages over @shadow trees: 1. Leo writes @nosent trees about twice as fast as writing @shadow trees. 2. @nosent trees do not pollute the user's disk with .leo_shadow folders. And there are other important advantages to @nosent: 1. @nosent files are now clearly superior to both Emacs and vim. Yes, Leo outlines have far more capabilities then rival outlines. But now, because of the @shadow algorithm, users can do something that is impossible with Emacs and vim, namely update an outline from changes made to an external file that *doesn't* contain sentinels. 2. Team programmers can now choose to use @nosent files by default, and use @file in situations where everyone in a work group is ok with that. For the first time, there is no need for a Leo user to apologize to the group, or to suffer the defects of @auto or @shadow or the old @nosent. 3. Newbies will have a much easier time deciding how to create external files. They will use @nosent in group settings and @file for personal files. They need no longer consider using @shadow or @auto. As a result, Leo's tutorial documentation will be simpler and clearer. 4. Leo will always need importers, if only to create @nosent trees. But eliminating @auto trees (and I do intend to do just that) will create another collapse in complexity. In particular, there should no longer be any need for @auto-otl, @auto-vo and @auto-rst. These @auto modes are problematic and buggy. Good riddance. We can eliminate these @auto modes because the @shadow algorithm is much more general than the importers. Kent's suggestion to have a single import command has worked remarkably well. But I think it would be wise to add an import-rst-file command. rst files can have many different file types--the import-rst-file command would cut through all confusion about what importer to use. Imo, this is simpler than: a) doing AI on file types or contents, b) having user options telling which files (or kinds of files) are to be imported as rst files, c) @auto-rst. Import headaches will now happen at most once per imported file. Once the file has been imported (and munged by the user), the @shadow algorithm will preserve the user's preferences for splitting the into nodes. ===== Summary I foresee no drawbacks to the new @nosent scheme: - It respects users' preferences: nodes can be organized as *users* want, not what the importers give. - It preserves gnxs and uAs. - It works for *all* kinds of files. - It is faster than @shadow. - It doesn't pollute the user's disk. - It does need sentinels!! It works well with git, diff, etc. - It eliminates @auto madness, and reduces the pain of importing files. - It makes learning about Leo easier, and reduces the choices newbies must make. Last, but not least, it solves a problem that has tortured me for 20 years. Completely. Permanently. Edward P.S. The success of the @shadow algorithm may encourage Emacs and Vim to use it. That would be sincere flattery indeed. EKR -- 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.
