Home Download Buy Blog Forum Support

File not being saved

File not being saved

Postby mark4 on Sun May 05, 2013 7:21 pm

The save on loss of focus and save when quitting the edior do not seem to be working right in St3 somethimes.

I had been working on a file in St3 for about 8 or 9 hours yesterday under linux but rebuilt my kernel and could not launch X because i forgot a small item in the kenrnel config. While rebuilding the kernel with the fix I edited my file in a terminal editor but did not scroll down beyond the top of the file as i was adding stuff there.

Kernel compile finishes, i quit and save, reboot, startx and launch St3 which promptly tells me the file on the disk has changed outside the etitor. Not thinking, i tell it go ahead and reload it... BAM 8 or 9 hours of work flushed because on quitting St3 after said hours the file was not saved.

I have also seen cases where st3 refuses to save on loss of focus but will save if i hit control s.

This is not because of file permissions or ownership i do not belive because the files are owned by me and are +rw.

p.s. See you in 8 or 9 hours :) lol
mark4
 
Posts: 98
Joined: Sat Feb 11, 2012 3:33 am

Re: File not being saved

Postby drifter on Mon May 06, 2013 1:41 am

"save_on_focus_lost" is a horrible feature that should be avoided. I don't see the point of enabling it 99% of the time even if it worked the way it's implied, but to make things worse it actually does the exact opposite (doesn't do anything on focus lost, saves on focus regained instead). At least that used to be the case in ST2. I haven't bothered to test it in ST3, but since jps seems to have ignored multiple topics of ST users losing data because of it (especially in combination with "hot_exit"), I doubt it has been changed in ST3 either.

"hot_exit" is fine on it's own, IF you're consciously aware of it. Just like the description says (too bad now that this option is enabled by default, a lot of people might actually not read the description), it doesn't save the modified files, so if you exit ST and then open/modify the same file in another editor, of course you're gonna lose your unsaved changes.

I'm pretty sure there is no "save_on_exit" option (although I think there definitely should be).
drifter
 
Posts: 13
Joined: Tue Apr 23, 2013 12:17 pm

Re: File not being saved

Postby mark4 on Mon May 06, 2013 2:33 am

While i appreciate your opinion, save on loss of focus is a feature i have used in CodeWright and other editors for almost 20 years. It is exactly the behavior i want and had it not been a feature built into this editor i would have requested it :)

Point was that somewhere there is a bug that cost me a number of hours of work. While i FULLY accept that these things will happen when using beta software, i chose to use said beta software so that i might help improve the end product i love so much. I am simply reporting what happened to me in the hopes that it can be fixed and therefor NOT happen to anyone else.

and i LIKE save on loss of focus!
mark4
 
Posts: 98
Joined: Sat Feb 11, 2012 3:33 am

Re: File not being saved

Postby drifter on Mon May 06, 2013 2:53 am

Sorry if I came off wrong, I didn't really mean my post to bash such feature in theory or its implementation in other editors, nor did I want to imply anything about your workflow habits, but rather talk about how it works in ST.
And it doesn't really have anything to do with the ST3 beta label, as I said, it had been dangerously behaving in ST2 as well.
Without persistent undo/redo buffers or at the very least an option to make automatic backups of saved files (a very basic text editor feature to this day still missing in ST out of the box), using these "auto save" options can get the user into trouble pretty easily, especially if they're not fully aware of all the nuances (some of which can be rather counter-intuitive).
drifter
 
Posts: 13
Joined: Tue Apr 23, 2013 12:17 pm


Return to General Discussion

Who is online

Users browsing this forum: djczaski, Google [Bot] and 26 guests