GNOME Bugzilla – Bug 133863
Backup files (file.dia~) clutter up the directory view
Last modified: 2019-03-20 11:10:29 UTC
Hi, a Debian user asked for a change in the backup file naming conventions. I'm not sure if you want to follow his idea of using a hidden directory. If not, please just tell me so that I can tell him. Thanks. bye, Roland
Seel also http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=173650
If the backup files are stored in a hidden directory, we'd need to add something to alert the user that there are backups available. I pondered how to do that when adding autosave the first time, and didn't come up with a satisfactory solution, so I followed the style of Emacs, where at least the user can see they are there. Ideas for better ways to make the user know of the backup files when needed would be welcome.
Just tell me if you think that a hidden directory is not a good idea (and I can take the necessary steps in the Debian BTS). Besides, since the original report complains about backup files cluttering up the user's directory, what about an option (default = true) for backup files?
I don't think a hidden directory is a good idea. xv, which he mentions as an example, keeps thumbnails there, an entirely different thing. Dia should remove autosave files when quitting, that it doesn't is certainly a bug.
Vim allows you to specify where the backup~ files are stored, if I recall correct the normal behaviour being to use the same directory and an option to use somewhere else (like /tmp I think). This is not an option I would put in the user interface, I would expect the user to edit a config file for this which should be no trouble for a Debian user. There are probably better ways to do this. I do not remember if/when Dia is deleting the backup files, normally they should be removed after a clean save. (Resist the temptation to turn Backup files into a crude revisioning system!)
It's a central decision for the ~ files whether they're just insurance against probloms during file save, or if they're intended to protect the user from some kinds of stupidity and allow the previous version to be found after a save. Emacs does the latter, and yes, also leaves clutter all over.
Given the comments in the report and taht modern directory views make it difficult to see these bakup files IMHO this is a WONTFIX. At least it isn't a bug, but a feature request.
*** This bug has been marked as a duplicate of 308774 ***
The duping should have been the other way around. Sorry about the noise.
*** Bug 308774 has been marked as a duplicate of this bug. ***
I also get annoyed by this feature, since I'm often using Dia diagrams as source for EPS/PNG images embedded into LaTeX documents or similar, and I like to keep a clean source tree. (Especially annoying when using version control and constantly seeing these files flagged up as non-committed.) With respect to this enhancement and comment #6, isn't the obvious change just to add a 'Keep backups on save' preferences tickbox? If the default is Y, new and non-power users get an 'easy' visible backup file as stated. Changing it to N allows those who appreciate the implications to turn it off. It's always going to be a semi-religious war between Emacs and Vi behaviour otherwise. You could also add a third alternative to retain them but as hidden files (again as discussed) for maximum configurability.
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/dia/issues/100.