PR #4386 is now in the "devel" branch.
This PR makes huge improvements to @clean. We have seen nothing like it since @clean first appeared in April 2015. We can now use @clean nodes on huge repos!
This PR fixes bugs and hangnails we've been living with since day one:
- Leo will detect changes to external @clean files, whether or not Leo is running.
- Leo leaves whitespace unchanged when importing to @clean or @auto. Why has nobody complained before?
- When importing or updating @clean trees, Leo will move leading blank lines to the start of the previous node. These moves happen only in newly-updated nodes, so you can "undo" these moves if you like. But such moves are almost always what we want.
A spectacular new feature: the update review tree
Whenever Leo detects updated nodes in @clean trees, Leo will create a new top-level node called Updated @clean/@auto nodes. Let's call this node and its descendants the update report tree:
- This top-level node contains update organizer nodes for each updated file. The name of these nodes has the form: Updated from: whatever.py.
- Leo creates clones of each updated node as children of these organizer nodes.
- Leo puts the diffs of all the updated nodes from each file in the appropriate update organizer node.
The update review tree ranks with Leo's killer git-diff and cff commands! You can retain, change, or delete any part of the update report tree as you like:
- Deleting any part of this tree has affect any external file.
- As with the cff and git-diff commands, changing cloned nodes will change the corresponding external file.
Conclusion
PR #4386 is a huge step forward for Leo. Please report any problems immediately.
Edward
> Deleting any part of [the update report tree] has affect any external file.
Oops: I should have said:
Deleting any part of this tree has no affect on any external file.
Edward
I've had a few errors already but they have only been partly repeatable. The context is that I have an outline that contains an @clean README.txt node. Currently its text displays with blue color which is not what I want. So I opened the node in an external editor with Leo also open and the outline selected.I added a new line to the top of the file in the external editor: @nocolor. Leo picked up the change, added the changed notification and clones, and displayed the text in white. So far so good. Then I did the inverse - removed the @nocolor line using the external editor. Here's where I started to have problems.
Many thanks for your testing. I'll take a look today.
PR #4386 is now in the "devel" branch.
This PR makes huge improvements to @clean.
I've had a few errors already but they have only been partly repeatable.
I added a new line to the top of the file in the external editor: @nocolor.
Thanks for taking the time to read this, Edward. I know how much thought and care you put into Leo. I offer this suggestion with the utmost respect for your vision, but also out of a deep sense of how essential this behavior is for workflows like mine, and many others I’ve come across. I truly hope we can find a way to make that specific part (the generating the update review tree) an opt-in via a setting - or even a menu toggle, so that Leo continues to feel seamless and nonintrusive for all types of users.
With appreciation,
Félix
Please let me expose the reasons I strongly think this specific feature (popping up new nodes in the outline upon refreshing/reading @clean files) should be an opt-in via a setting.