Page 2 of 3

Re: Keeping Temp files longer or autosave feature

Posted: Mon Feb 25, 2013 4:32 pm
by steve
Try this as an experiment:
1) Open up Windows Notepad (or any other text editor or word processor.
2) Type in some text. (the data is currently "temporary" data, either on disk or in memory).
3) File menu > Close/Exit.
4) When prompted if you want to save the document, select to NOT save the document (the temporary data is deleted).
5) Write to the software manufacturer and complain that the document was deleted :D

OK, so step 5 is silly, so I'm curious why you think it should be different in Audacity.

Re: Keeping Temp files longer or autosave feature

Posted: Mon Feb 25, 2013 9:58 pm
by Gale Andrews
DJSmith9 wrote:I tested the "saving before recording" idea and it kept the project file but deleted all the audio files
If you save a project before recording, you save an AUP file and a _data folder without any data in it. When you start recording, the recorded data is added to that _data folder.
When you stop recording, the project has a saved state of no audio (the point when you did FIle > Save Project As) and unsaved additions (the recording). If you click "No" in answer to "Save Changes?" when exiting, you get back to the saved project state (a project having no audio).
DJSmith9 wrote:The settable option idea to "leave temp files" (which would only apply in the case that the project had not been named before recording, because otherwise they would not be "temp" files right?)
The issue is around the user telling Audacity not to save changes when they wanted to save them. It applies equally in the case you give above where a project exists but further changes are made to it which you want to retain. The only difference in that case is that the audio data which Audacity deletes on exit when you say "No" is then in the project folder rather than the temporary folder.

What would structurally happen I think is exactly what would happen if you force quit Audacity when you have not saved a project or force quit when you have a project with unsaved changes. In those cases, an autosave file (a temporary project file just like an AUP project file) would appear when you restarted Audacity. That autosave file references the audio data that was left behind in the temp folder or project _data folder because you quit Audacity without asking what to do with the unsaved changes.

So a Preference to "Always store unsaved changes on quit" would store something like an autosave file and not delete any of the audio data it pointed to. In the case of reopening an existing project where this Preference was turned on, Audacity would have to be coded to not treat the left-behind data in the _data folder as an "orphan block files" error (orphaned files being data that does not belong to the current project state). So this is more of a change than "just not delete the temp files" and I think a pretty unusual feature for file saving.

I think this change will not happen, purely because no developer will see the need to code for such a gross user error, but so we record your vote correctly, do you want a storage limit on this Preference? Once you store more than n MB of unsaved changes, no more will be saved until you delete some of it?


Gale

Re: Keeping Temp files longer or autosave feature

Posted: Wed Feb 27, 2013 6:52 pm
by DJSmith9
I've re-thought my request to be along the lines of how Audio Logic works:

If the project is saved first, then the project file and directory folder are created and audio files copied over from temp folder. But if the user says "no" to the save prompt on exit, the audio files are deleted. I would like to request getting rid of the "save" prompt in this scenario since the user has already stated their intent to save when they went to the trouble to save the project before recording. To me it makes no sense to throw up that dialog one more time before exiting and then deleting all the audio files if they (sometimes inadvertantly) say "no" to the 2nd save request. At this point I have to ask: what is the point to deleting the audio files and leaving the project file and folder laying around? Audio Logic does not prompt to save again, but will automatically load that project again when you restart the application because it (logically) assumes you are probably still working on that audio project since you exited with the project still loaded. Does this make sense?

Re: Keeping Temp files longer or autosave feature

Posted: Wed Feb 27, 2013 11:44 pm
by steve
DJSmith9 wrote:At this point I have to ask: what is the point to deleting the audio files and leaving the project file and folder laying around?
I can't comment on "Audio Logic", which I assume is some sort of audio editor, as I've not heard of it before, but in response to your question:

Let's say that I have a saved project - it can be any sort of project; it could be an Audacity project, or a Microsoft Word document, or a Photoshop composition, or a ProTools project, or anything else.

I open the project, make some changes to it, then realise that I've messed up, so I close the project. Virtually all programs in this situation will put up a prompt to say "Do you want to save your changes before closing?" In this case, I don't want to save the changes, so I click on "No". The project closes and all changes since the last Save are deleted.

I must admit that I did once have the unfortunate occurrence when recording, in a location where there were lots of people, where someone unplugged the recording equipment during the recording and trashed a two hour live session. I wasn't happy, but learning from the experience I now ensure that the only people to get within 6 feet of the recording equipment are people that know better than doing something like that.

Re: Keeping Temp files longer or autosave feature

Posted: Thu Feb 28, 2013 4:34 am
by Gale Andrews
DJSmith9 wrote:To me it makes no sense to throw up that dialog one more time before exiting and then deleting all the audio files if they (sometimes inadvertantly) say "no" to the 2nd save request. At this point I have to ask: what is the point to deleting the audio files and leaving the project file and folder laying around?
It's what you asked for. There could be cases where for example you record one track, save the project, record another track but fluff up, you don't have any time to re-record, so you close the project without saving changes.
DJSmith9 wrote:Audio Logic does not prompt to save again, but will automatically load that project again when you restart the application because it (logically) assumes you are probably still working on that audio project since you exited with the project still loaded.
So in the above scenario you have to remember to File > Close rather than File > Exit if you want to discard the fluffed recording? Is this a Logic Preference (save if you quit with the project open)?

I think it has some merit for the "already saved project" case (only the original project is saved and not also an extra project that contains unsaved changes) but it doesn't help the original poster's situation where the project was never saved at all. I know some novices do what happened there, thinking that pressing [X] on a window saves the contents, then not understanding the "Save Changes?" question.


Gale

Re: Keeping Temp files longer or autosave feature

Posted: Mon Apr 01, 2013 3:07 pm
by waxcylinder
Do we want to transfer this to Wiki>Pending Feature Requests.

I for one do not support this idea - I like it that Audacity cleans up my temp files, saves me doing a lot of unnecessary housekeeping :geek:

WC

Re: Keeping Temp files longer or autosave feature

Posted: Mon Apr 01, 2013 6:36 pm
by ragnar.jensen
I vote no. If Audacity asks me to save changes and I answer "No" it is because I actually don't want to save any changes.

--
Ragnar

Re: Keeping Temp files longer or autosave feature

Posted: Mon Apr 01, 2013 8:14 pm
by steve
ragnar.jensen wrote:If Audacity asks me to save changes and I answer "No" it is because I actually don't want to save any changes.
+1

Re: Keeping Temp files longer or autosave feature

Posted: Tue Apr 02, 2013 5:53 am
by Gale Andrews
steve wrote:
ragnar.jensen wrote:If Audacity asks me to save changes and I answer "No" it is because I actually don't want to save any changes.
+1
Obviously a feature that does the opposite of what the "Save Changes" dialogue says is out of the question (at least without further first-time explanation and an option to choose what happens), but in any case the original request morphed beyond that with discussion.

So I'll be adding one vote each for:
  • Preference "Always store unsaved changes on quit". This would remove the "Save Changes?" dialogue and store something like an autosave file and the _data it points to. There would be a prescribed size limit and if that limit would be exceeded, the "Save Changes" dialogue appears.
  • Preference "Save and reopen unsaved content on quit". This works on the Quit command (including the window close button on Windows and Linux) but not on File > Close. There is no "Save Changes" dialogue on Quit and when you launch Audacity the last open work opens again. It's technically a similar idea to the one above, no file size limit, and probably better, if not quite so foolproof. I have seen this in some other audio editor, but do not remember which one). To stop the work reappearing on each launch, File > Close and save changes or not. This could be extended to also reopen saved content on quit.
Minus votes can't really be counted so as to prevent positive votes appearing on Wiki Feature Requests, but if Peter, Ragnar or Steve are still opposed, the comments can be noted on Wiki.

The problem I see is that to give added safety, this Preference will have to be on by default, so it is something else that power users would have to turn off if they did not want the feature. I don't think they would all turn the second feature off.



Gale

Re: Keeping Temp files longer or autosave feature

Posted: Tue Apr 02, 2013 6:33 am
by steve
Gale Andrews wrote:There would be a prescribed size limit
Which would be what? 1 TB? More? Less?
Does this feature create an accumulation of unsaved projects, or does it only apply to the last project open? If only the last project, then how does Audacity keep a record of the last but one project so that it can be deleted? If it creates an accumulation of unsaved projects, where is the button that allows the user to clean up the mess?