Today I wanted to continue some work I started a few weeks ago. I remember clearly what I did. But I can't remember the outline, and I have not succeeded in finding it even with the help of FileLocatorPro (a terrific Windows program). Somehow, the Recent Files list hasn't helped either. Other times I've been able to find the outline but not easily.
I wondered if it would be useful to have Leo keep track of what I was working on when. Admittedly this situation doesn't happen often, but I thought I'd try it out anyway. Maybe it would be the start of something more useful. Or maybe I'll feel like I had a nanny and stop using it.
It's still preliminary. I have a script to start logging, and another to stop it. It writes to ~/.leo/temp (and adjusts that path for WIndows). They could easily be turned into global commands in myLeoSettings.leo, though I haven't done that yet.
The script registers as an idle time handler. If a minute has elapsed since the last check, the script looks to see if the currently focused outline and node have changed since the last check. If so, it writes the time and the node's UNL to the log file.
Why the UNL? Because it shows the outline and node in a fairly readable way, and because the UNL can by copied and used to open the outline, or otherwise used by some other Leo script.
Obviously a real logging framework could be used to get better file management, but for exploring this seems good enough.
To use, open the attached outline, select the Start Logging node, and run it with CTRL-b. To stop logging without closing Leo, select the Stop Logging node and run it with <CTRL-b>