Looking for documentation about automatic setting of dirty flag

45 views
Skip to first unread message

Robert Cholette

unread,
Oct 1, 2019, 4:37:38 PM10/1/19
to leo-editor
Just lookig for docum or part of code that would explain it.

Particularly about when the parent is set dirty too (editing a body of child of derived file-node)
or when the childs are also set dirty... upon modifying body text of parent if already had content/ or not.

etc...
Thanks! 

Edward K. Ream

unread,
Oct 2, 2019, 7:05:59 AM10/2/19
to leo-editor


On Tue, Oct 1, 2019 at 3:38 PM Robert Cholette <felix...@gmail.com> wrote:
Just looking for docs or part of code that would explain it.

Because of clones, the code is complex. Don't bother trying to understand the code's intent from reading it :-)

We want to mark a node "dirty" (changed) if its headline or body text has changed since the last time we last saved the outline (.leo file).  More importantly, we want to mark the node that creates the external file dirty as well, so Leo (and you) can know which files need to be written when we save the .leo file.

Setting a node dirty will not set any children dirty.

Edward

Robert Cholette

unread,
Oct 2, 2019, 4:47:37 PM10/2/19
to leo-editor
> Setting a node dirty will not set any children dirty.

Can you elaborate? When I write text in the body of a node that has direct children that are @clean or @files, those children become dirty.

For example, I open leoPyRef.leo and unfold the code node, and then the core classes node. Then just type a single letter in the body pane of 'core classes' : all @files below are now dirty... is this normal? 
here's my log pane :
Leo 6.0-final, master branch, build f3e2b18bcd
2019-08-10 20:34:57 -0400
Python 3.6.8, PyQt version 5.9.5
linux
read 175 files in 0.37 seconds
read outline in 0.45 seconds

Edward K. Ream

unread,
Oct 2, 2019, 5:22:40 PM10/2/19
to leo-editor
On Wed, Oct 2, 2019 at 3:47 PM Robert Cholette <felix...@gmail.com> wrote:

> I open leoPyRef.leo and unfold the code node, and then the core classes node. Then just type a single letter in the body pane of 'core classes' : all @files below are now dirty... is this normal?

Yeah, it's normal.  Probably because directives in ancestor nodes affect child nodes.  So what I said previously isn't accurate.

Edward
Reply all
Reply to author
Forward
0 new messages