On Sun, Dec 15, 2019 at 8:03 PM Brian Theado <[email protected]> wrote:
> It is a different issue, but one being created as "collateral damage" by the dirty changes you are making for #1451. Or am I misunderstanding? I mean the scenario I described where the user gets unnecessarily prompted about saving changes it not present prior to #1451 changes. The new behavior is, quite simply, the one and only correct behavior. > I agree having code which does a trial write is not worthwhile. However, having code which did perfect dirty bookkeeping could be worthwhile if it were easy enough to do and be sure enough it won't cause any data loss. The old code tried to do "perfect dirty bookkeeping". Its subtle failures were the cause of #1451. Imo, saving a file alters the bookkeeping in ways that make *robust* bookkeeping impossible. I could try to explain, but the explanation would be complicated, and would not necessarily be correct. And that's the point. The new way ensures that the entire outline is marked changed and all relevant nodes are marked dirty any time a change could possibly result in one or more external files needing to be written. This is the only safe way. *Summary* For the first time ever, the relevant code is simple and robust. No state data are required in undo logic. We aren't going back to the old way. Being prompted when closing an outline is a tiny price to pay for the integrity of our data. If you don't like such prompts, just bind save-all to Ctrl-s, and do Ctrl-s before quitting Leo. 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 view this discussion on the web visit https://groups.google.com/d/msgid/leo-editor/CAMF8tS0WLsRmL%3DJ8kx6pawB7Uvrz%2BZP%3D9%3DHqw9r9DC6PPguhZw%40mail.gmail.com.
