Thanks - both are good suggestions. The reason I was thinking this would be 
useful is that I create a function to do something - say def get_details(). 
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. Nothing else changes, but I can test the new one 
without having to lose the old version. I could comment it, but then the 
final code ends up with a large commented section with the old code. I 
could also use conditional sections to manage this, but that again requires 
an additional step. I just thought that if there was an option to have an 
@ignore in the node, then Leo could just skip over that one and process the 
other nodes as normal - and that could be useful if we wanted to try three 
or four variants of a function before settling on a final one.

On Sunday, March 9, 2025 at 3:58:22 PM UTC [email protected] wrote:

> In what way do you want to ignore a node?  Do you mean you want to run the 
> code but use that other node instead of the original one?  Is the node part 
> of an external file (i.e., @file, @clean)?
>
> Sometimes I just rename a function/method and use the new version in a new 
> node with the original name.  With the different name, the old one doesn't 
> get called.  That's not much different from using @/@c, is it?
>
> With an external file, if the changes are larger than I want to deal with 
> using @/@c, I may copy the @file to a new @file tree with a different name, 
> and make my changes there.
>
> On Sunday, March 9, 2025 at 10:33:33 AM UTC-4 [email protected] 
> wrote:
>
>> Hi,
>>
>> 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.
>>
>> 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/d70b8ab5-bcc6-443a-b76f-fb4d3008d097n%40googlegroups.com.

Reply via email to