the-carlisle-group / Acre-Desktop

A simple Dyalog APL IDE plugin that introduces "projects" and allows you to keep your source code in Unicode text files.
MIT License
11 stars 1 forks source link

Saving the session #213

Closed PhilLast closed 4 years ago

PhilLast commented 5 years ago

When I install a new version of Dyalog I usually make a few changes to the session and save it.

When installing 17.1 for the first time I accidentally did it after running an acre command.

This left the callbacks for Fix and AfterFix set for acre. On startup acre saves what it finds there - expected to be those set for SALT - so that it can call them when acre doesn't recognise the edited item.

Having saved ⎕SE with acre in place "what it finds there" was now the acre callback itself. The next time I edited something outside acre's remit I ended up in an endless loop.

For this reason I've written a function to get rid of acre from ⎕SE, restore the settings it changed to those for SALT and message Now safe to save session without acre. In my development version I have this set as command ]acre.Removeacre and API function ⎕SE.acre.Removeacre.

Prior to my next push I can leave it in (default) or take it out (if requested).

PhilLast commented 5 years ago

The existence of this as a command makes one of the tests fail - the one that checks that all API functions are covered by tests.

I'm afraid that it might have to stay that way as acre is incapable of testing whether it itself continues to exist.