Author Topic: B3: Saves unamed files on exit. Would be nice for Project Close too...  (Read 2382 times)

JimmieC

  • Senior Community Member
  • Posts: 423
  • Hero Points: 15
B3 saves unnamed files on exit. VERY COOL!

However, very often, I close\switch workspaces rather than exit SE itself. It would be nice if the auto-save feature worked for closing workspaces case as well.

I wasn't sure whether to put this into the Beta forum or Suggestions\Improvements forum. So a SysOp can move it if needed or I can re-post.

Jim

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 4819
  • Hero Points: 392
Re: B3: Saves unamed files on exit. Would be nice for Project Close too...
« Reply #1 on: October 16, 2015, 12:39:52 am »
Maybe we can add an option for this. Not sure if there are any difficulties with implementing this. It may be too late to cram this one in.

JimmieC

  • Senior Community Member
  • Posts: 423
  • Hero Points: 15
Re: B3: Saves unamed files on exit. Would be nice for Project Close too...
« Reply #2 on: October 16, 2015, 01:01:06 am »
It may be too late to cram this one in.

Reasonable. It will be a nice extension of the current feature. Maybe in the queue for v21.

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 4819
  • Hero Points: 392
Re: B3: Saves unamed files on exit. Would be nice for Project Close too...
« Reply #3 on: October 18, 2015, 03:06:11 am »
This feature has been added. We decided to just have one option and allow workspaces to auto-restore modified unnamed files. If you lose track of your unnamed file due to say...auto-restoring to a workspace which doesn't have your unnamed file, you can look in your "autosave" directory or use the Backup history browser to find your file. The Backup history browser lets you restore and view the contents of files. There's a command called "open_all_unnamed" which will open all unnamed files that haven't been deleted. It's not on the menu though.

When restoring to a workspace (vs workspace.vpw), it's possible to close without saving an unnamed file which is still referenced in the global auto-restore information. A warning message is displayed if an unnamed file can't be auto-restored. You could also produce this warning by restoring to the global vrestore.slk and closing an unnamed file which is still referenced by the workspace auto-restore info.
« Last Edit: October 18, 2015, 06:04:32 pm by Clark »

jporkkahtc

  • Senior Community Member
  • Posts: 1795
  • Hero Points: 175
  • Text
Re: B3: Saves unamed files on exit. Would be nice for Project Close too...
« Reply #4 on: October 19, 2015, 06:42:05 pm »
How does Slick decide when to delete unnamed files?
Mostly, in the exceptional cases ... I noticed that even if I kill slick it will eventually cleanup those unnamed files.
So, how does it avoid deleting them too soon?

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 4819
  • Hero Points: 392
Re: B3: Saves unamed files on exit. Would be nice for Project Close too...
« Reply #5 on: October 19, 2015, 07:12:09 pm »
The logic has change slightly. When you close a a modified unnamed file (i.e quit command), the file will be deleted  from disk immediately. Keep in mind that you are prompted whether you want save the changes to the file before the close can finish.  In beta 3, we put the file in a delete list to be deleted when SlickEdit exits. The delete happens immediately now.

Since you can have multiple sets of auto-restore information (one global and one per workspace), it's easy to create a scenario where the unnamed file is deleted when you restore to a duplicate.

The warning is arguable unnecessary since it should just mean that you already decided that you didn't need this unnamed file any more.

JimmieC

  • Senior Community Member
  • Posts: 423
  • Hero Points: 15
Re: B3: Saves unamed files on exit. Would be nice for Project Close too...
« Reply #6 on: October 20, 2015, 02:44:34 pm »
You guys got that cranked out.
Very nice.

Thanks,
Jim

Note:"guys" used in the colloquial\slang sense (not literal), that is, all involved regardless of gender. ;-)
« Last Edit: October 20, 2015, 02:53:25 pm by JimmieC »

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 4819
  • Hero Points: 392
Re: B3: Saves unamed files on exit. Would be nice for Project Close too...
« Reply #7 on: October 21, 2015, 01:16:24 am »
Give release candidate 1 a try!