On Tue, Nov 27, 2012 at 3:38 AM, Ville M. Vainio <[email protected]> wrote:


> After discovering sublime edit, I have started using external editor mode
> more (rclick -> Edit in...). Annoyance there is that once you save in
> external editor, you still have to go to leo and save there, or your
> changes will be lost if you close leo without saving.
>
> This can lead to loss of date if you don't routinely agree to save changes
> when closing Leo. I often don't do this, as I save all the time when I
> type, and don't want to save accidental changes I might have done to the
> leo document; I don't usually have time to review changes when closing a
> document.
>
> Maybe .leo could automatically save the tree if and only if the externally
> edited node is the only dirty one.
>

I agree there is a problem, but I don't believe hacking Leo's save logic is
a good idea, for several reasons:

1. There might be several dirty nodes, and you could still lose data
(strictly following your suggestion) in that case.

2. The write logic for external files is complex, mainly due to file
caching.  I tolerate that complexity because caching is such a big win.
But it would not be easy to do @file AI to discover the special case you
mention.

3. Imo, the proper place to handle this problem is in the vim and xemacs
plugins.  These plugins are responsible for the interaction with Leo.

Would it work for you if the xemacs and vim plugins automatically saved an
external file whenever the plugin caused a node in that file to become
dirty?  This would likely solve the problem you mention, although I
wouldn't be my life on it.

Your comments, please.

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.

Reply via email to