One way in Python would be, in a parent node to both your old and new nodes:

if False:
  << old node name >>
else:
  << new node name >>

(Using << section references >> to pull in the contents of those nodes at the proper indentation levels.)

The node isn’t truly *ignored*, but since the False is effectively a constant in this situation, it will never be executed.

I use this pattern all the time when refactoring things. I believe Edward uses it in the Leo code base quite frequently as well.

Jake


On Mar 9, 2025, at 10:33 AM, Karthik Suresh <[email protected]> wrote:

Hi,

I'm using eLeo 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.

Thanks,
Karthik

--
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/d076b698-f109-43a7-96b8-77f868547dc7n%40googlegroups.com.

--
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/FD07967A-6AD7-4E9C-BC8B-ED74BFEDE1E6%40gmail.com.

Reply via email to