On Sunday, March 9, 2025 at 9:33:33 AM UTC-5 [email protected] wrote:
> I'm using Leo to develop small programs and occasionally it's useful to copy a node and work on a new version of a function to try it out. I know I can use @ to comment out all the code in the old node so it's ignored, but I was wondering if there was an equivalent approach that could simply ignore one of the nodes in an outline so I could swap between one and the other? I couldn't find an obvious answer in the documentation. ... > The reason I was thinking this would be useful is that I create a function to do something...Then I want to try this a different way, but so I create a copy of the node, tell Leo to ignore the first one, and then change the content of the function in the second. Jake's suggestion seems like the best approach. It's best not to try to be overly clever. When I start on a major refactoring I often define a constant in leoGlobals.py, say NEW. Then I refactor with tests on g.NEW. This seems like the full answer to your original question. However, I'd like mention a completely different way of "customizing" nodes. The rst3 command supports *filters* that allow scripts to chose *which parts* of a node (and its subtree) to include. This feature gives the effect of the often-requested "half clone" feature. See this post <https://groups.google.com/g/leo-editor/c/_NOfUwJPNng/m/wkl8i-KoBgAJ> and the example_rst_filter plugin. 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 visit https://groups.google.com/d/msgid/leo-editor/fa9a995c-9040-49d5-bef0-8d718279c3e7n%40googlegroups.com.
