Everyone does not want to use autosave. When you have a working code and you want to test new functions you don’t want autosave to over-write your working code when compiling for test purposes.
Partial solution: take the autosave off from preferences → problem!
When autosave is not on, compiling is many times aborted, because system does not update paths, repositories, libraries etc. without saving. So you have to manually save the code and then the compiling works again.
Full solution proposal:
When autosave is OFF, and you open sketch. IDE should create a virtual temporary hidden sketch in the background that has autosave on. So when u press compile, it would save the edited code to the virtual temporary sketch and compile it and it would work. And only when you press manually save it saves the code to the sketch’s original name/path. This would solve the compiling problem when autosave is not on.
I do not have autosave on as I regard it as being a dangerous setting when testing code as you describe. I have no problems with paths, repositories, libraries etc
Can you please explain under what circumstances these problems arise
Many times when I for example paste code lines to existing code it won’t compile before I have pressed save. It just says that it can’t find some library etc. but after I have saved the code then it suddenly finds everything and compiles…happens now and then…And I don’t have OneDrive etc..
I leave auto save on, it has saved me many times. When I want to try something I simply zip the complete folder, the IDE ignores the zip and if I make a mistook I can recover it completely from the start. I might also mention I normally use Geany as the editor, not the IDE.
What is the main benefit of using Geany vs Arduino IDE in your perspective? Is it more intuitive or something?
It is clean, simple, fast and has a huge configurable command set. My favorite is ^E which puts the line with that selected text in the message window. It searches all tabs and tells what tab and line number. Its chromatic section highlights error in a different color and the code accordingly. Simple thing is to simple test it. In the IDE you can select external editor and it then blocks the IDE from editing but updates if any changes were made in the source file. Many editors will do this, this is the one I like.
You could consider using git for your application development. If you want to try new functions, you create a new branch.
If test succeeds merge the test branch in your release branch.
Advantage is that you can have many branches side by side, and go back to old versions.
Suppose I want to substantially modify a function, I make a copy of the existing version of the function and place the copy above the original. I comment out the original. I modify the copy. If I mess it up I have the original, which I can restore by removing the /*...*/ and deleting the modified version.
And commenting the modified version… to retry / continue later
(instead of messing things up, you might just have run out of time)