Vitalije,

YMMV, but I had a bad experience with watching files when using Leo. Leo
> often writes files in two phases and it happened to me more than once that
> process watching on files take an empty file or not completely written
> because of this. So, I had to add some latency to watcher.
>

Thanks for the warning, I hadn't thought about that. I just checked my git
history of 321 autocommits over the last 3 weeks of using this setup and in
no cases do I see an empty or partial file being committed. It might be
I've just gotten lucky so far. Or it could also be because the entr utility
has quite a few checks built in. See the Theory of Operation at
http://entrproject.org.

If you precede git command with the '&' g.execute_shell_commands will not
> wait for command to finish


Right. I'm already using the ampersand for launching the long-lived
process. Using it for a short-lived process is worse as with every
execution you are left with a defunct process.

Put this in a node and hit ctrl-b several times:

g.execute_shell_commands('&echo My pid is $$')


In ps output, you will find a defunct process like this for each one:

[sh] <defunct>


So every time I save, I will end up with one of these. The good news with
these is they go away when leo exits.

If I get motivated to improve what I have, I will look into some of your
suggestions regarding Popen and proc.terminate.

-- 
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/CAO5X8CwGi6pOfbAvjZng6QGdH%2BTdw0WPan4gFd6TJd4Vtpj-aQ%40mail.gmail.com.

Reply via email to