GNOME Bugzilla – Bug 485471
Doesn't autosave Unsaved Documents
Last modified: 2015-05-22 12:33:19 UTC
Autosave doesn't happen if the document has *never* been saved. It should, since data can be lost if there is a crash while an unsaved document is in the editor. Other information:
If the user selects "Close without Saving", the autosave can be deleted. But in the meantime, it should be kept so that no data is lost unless specifically intended to be lost.
I would suggest autosaving with a name like "Unsaved gedit 2008-12-11 19:40.txt" in the user's home directory or on the Desktop, so it is easy to find. This file will only be created when gedit is killed before saving, so it should be highly visible.
I strongly support correcting this missing functionality, and consider it a significant bug for any modern day desktop application to not preserve its state in the event of a crash. One workaround I've used is to create a quick launch icon, that runs a "new_text_file" script, with the following code: #!/bin/sh FILE=~/.docs/`date +%Y%m%d-%T`.txt touch $FILE gedit $FILE This then takes advantage of gedit's existing autosave infrastructure. (I also set up a custom run command on the tools menu to invoke this script, but the integration there is messy as it always creates a (useless in this case) shell output window.) The big drawback to this approach is that you have to then manually manage the abandoned temporary files by deleting them when either no longer needed (explicitly abandoned by the user), or after the file has been saved under a proper name. Editors with the ability to handle autosaving unnamed buffers take care of these details transparently to the user. I've created a "Delete" custom external tool command with this code: #!/bin/sh rm $GEDIT_CURRENT_DOCUMENT_PATH to simplify deleting a temporary file. (Be nice if you could chain a custom command with a macro that also closes the current file.) This system also doesn't handle restoring temporary files after a restart, so I've added a startup application item with the command: /bin/sh -c "gedit ~/.docs/*.txt" so all the remaining temp files get reloaded when GNOME restarts. In theory, this last bit should be handled by session management with autosave of the session state. (I just recently tried out the session manager plugin, and I don't think it supports an autosave of its state.)
*** Bug 653688 has been marked as a duplicate of this bug. ***
I came here from https://bugs.launchpad.net/ubuntu/+source/gedit/+bug/151365 and also vote for this to be enabled by default.
Guys, even if you enjoy developing on some gedit-3.2.* tree, please be aware then many people (not so active used distributions) out there still use Gnome2, and in particular for me gnome-2.30.4 is the most current version, which still suffers from this bug! Not everybody uses the newest Software out there available. Some of the "users" just want to have a WORKING system, instead of updating all the time... I cant develop, but its somehow poor since 2007-10-10 not being able to implement autosave of the textcontents of a new unsaved document in -for example- the users homedir properly (which afaik should already work as described here https://lists.ubuntu.com/archives/ubuntu-users/2008-January/135065.html). Indeed we all here HAVE checked that checkmark to "Autosave files every 2 minutes" or so, but then it must no longer be the case that after a crash you loose all typed data of 2hours which was not saved in a normal file before in year 2013 (in my case battery of notebook got empty before i finished an important textdocument)! And this over 5 years after such a simple(?) Bug got filed! If its a matter of money/time please post a Bitcoinaddress here, and a bounty will be added to pay you desired time needed to fix this bug. Sometimes i think responsible developers of a project needs to get replace by some noobs who want software to just work and solve real problems instead of blowing it up with new GUI elements... We have now 6th January 2013: PLEASE FIX THIS BUG IN GEDIT-2... (and would also be kind if it doesnt come back when i update to gnome3 in a few months fetching the tail to gedit-3 ;-)
Sorry, i didnt mean gnome-2.30.4, but gedit-2.30.4. Thanks!
Bug #745979 has a better description. *** This bug has been marked as a duplicate of bug 745979 ***
(In reply to Sébastien Wilmet from comment #8) > Bug #745979 has a better description. > > *** This bug has been marked as a duplicate of bug 745979 *** 485471 is not a duplicate of 745979, i.e. they are concerned with different kinds of automatic saving. From the point of view of a user and in the vernacular of gedit: "autosave", and thus 485471, refers to a feature that has functionality executed every N minutes where N can be set via: Edit -> Preferences -> Editor -> "Autosave files every <N> minutes" 745979 instead refers to functionality specifically and only executed when the gedit application is closing/exiting. Fixing 485471 helps save data in a wider range of situations, specifically including the situation where gedit exits without the chance to execute its closing procedures, e.g. machine failures like freezes, which is unlikely covered by a straight fix to 745979. However, this bug may be a duplicate of bug 682977 or rather it integrates well with that bug. Then again, marking it a duplicate of 682977 may bury it in the conceptual work needed there. In that bug's tracking there is a proposed plug-in that may help users experiencing the bug described here - https://bugzilla.gnome.org/show_bug.cgi?id=682977#c10 Related: bug 335079