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

JimmieC

  • Senior Community Member
  • Posts: 490
  • Hero Points: 17
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: 6864
  • Hero Points: 528
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: 490
  • Hero Points: 17
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: 6864
  • Hero Points: 528
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: 2620
  • Hero Points: 210
  • 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: 6864
  • Hero Points: 528
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: 490
  • Hero Points: 17
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: 6864
  • Hero Points: 528
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!