Author Topic: Untitled/Unsaved files  (Read 773 times)

asandler

  • Senior Community Member
  • Posts: 279
  • Hero Points: 24
Untitled/Unsaved files
« on: August 20, 2009, 07:14:12 am »
Two more things.

1. Allow workspace closure with untitled files. Restore them later.
I often create temporary files. These are temporary buffers that I open and close for various reasons. I don't need them for the long run and they should never be saved and become part of the project.Yet I have to save them if I want to open different workspace. It would be really nice to be able to switch a workspace without saving all those "Untitled" and get them back when reopening the workspace. On the other hand, this should only apply to files that has never been saved. I.e. refusing to close a workspace as long as one of the project files has unsaved changes in it, is ok.

2. Improve two or more instances of SE.
Today it is possible to open two or more instances of SE with +new command line argument. But when you close one of the instances, it complains about being unable to save configuration. It would be nice and useful if it would not complain. Taking this further, it would be nice if configuration changes in one instance would affect second instance.

Thanks.
Alex.

ballboy

  • New Community Member
  • Posts: 1
  • Hero Points: 0
Re: Untitled/Unsaved files
« Reply #1 on: November 03, 2011, 07:20:04 pm »
I hope this is not a duplicate.  Most programs give you an unnamed file when you create a new object.  SlickEdit forces you to name the file and it actually creates an empty file.  This is ok except that sometimes I like to have a "scratchpad" that I can paste text into to format it before putting it into my main code.  Or I might be formatting the text for another file.  Adding a special "scratchpad tab" would allow me to do this.  The other fix of course, which I think is better, is wait until I go to save the file for the first time before forcing me to name it and saving it to disk.

at5dapa1

  • Senior Community Member
  • Posts: 137
  • Hero Points: 10
Re: Untitled/Unsaved files
« Reply #2 on: November 04, 2011, 06:44:22 am »
@ballboy: in my toolbar I added a button with the command = "new_file".
This command opens that needed scratchpad without asking you for any name. You can save it later.

I use this very often, for example I paste temporary code or error-logs and highlight needed parts with Ding Zhaojie's quick-highlight macro.

ScottFerwerda

  • New Community Member
  • Posts: 1
  • Hero Points: 0
Re: Untitled/Unsaved files
« Reply #3 on: August 04, 2015, 01:43:48 pm »
I'd like autosave of unnamed buffers. Actually, what I want is to be able to have several unnamed "scratchpad" buffers in SlickEdit, quit the application, and when I restart it the buffers restore. I don't want to be bothered with coming up with a name for each of them, as at some point I probably want to throw them away.

JimmieC

  • Senior Community Member
  • Posts: 393
  • Hero Points: 13
Re: Untitled/Unsaved files
« Reply #4 on: August 11, 2015, 07:23:53 pm »
  "I'd like autosave of unnamed buffers."

I like this idea.
Jim

jwiede

  • Community Member
  • Posts: 97
  • Hero Points: 12
Re: Untitled/Unsaved files
« Reply #5 on: August 11, 2015, 08:18:18 pm »
I'd like autosave of unnamed buffers.

Agreed, having "scratch buffers" able to persist across restarts would be nice (maybe store as type=txt using tmp-generated filenames wherever spill or autobackups go?).  Notepad++ has something similar, and I find it quite useful. 

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 4175
  • Hero Points: 300
Re: Untitled/Unsaved files
« Reply #6 on: August 12, 2015, 12:54:41 pm »
I have to say, I like the idea of SlickEdit automatically saving scratch files (Untitled buffers).

Do you think SlickEdit should handle named buffers/files the same way as untitled buffers/files for auto-restore? For example, if "file.cpp" is modified, would you want SlickEdit to just save the contents somewhere without prompting you to save your modified file(s)? Obviously, there could be an option for something like this but I was wondering what everyone would like for the default.

jimlangrunner

  • Senior Community Member
  • Posts: 358
  • Hero Points: 30
  • Jim Lang - always a student.
Re: Untitled/Unsaved files
« Reply #7 on: August 12, 2015, 01:47:54 pm »
FWIW - I really like the option to "just save" unsaved buffers. I use them a LOT.  Sort of a notepad / scratchpad for code & text.

I would like to see a dialog just like the one we have now - but with a button that says "save everything, named or not" (or similar).  That way, when I'm rushed I can just save it and be done with it.  Would undo history be available on restart? 

ALSO - if my machine is forced to reboot (for whatever reason), it would be good if it auto-saved everything without asking me.

In short, it should read my mind.   ;D

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 4175
  • Hero Points: 300
Re: Untitled/Unsaved files
« Reply #8 on: August 12, 2015, 02:31:45 pm »
Sounds like a good plan. I like the "Save everything, Named or Not" idea in the list-modified dialog. I don't think we would save undo information. At least not for a first implementation.

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 4175
  • Hero Points: 300
Re: Untitled/Unsaved files
« Reply #9 on: August 13, 2015, 11:37:26 pm »
FWIW - I really like the option to "just save" unsaved buffers. I use them a LOT.  Sort of a notepad / scratchpad for code & text.

I would like to see a dialog just like the one we have now - but with a button that says "save everything, named or not" (or similar).  That way, when I'm rushed I can just save it and be done with it.  Would undo history be available on restart? 

ALSO - if my machine is forced to reboot (for whatever reason), it would be good if it auto-saved everything without asking me.

In short, it should read my mind.   ;D

I hadn't thought this through for named files. It's a pretty dangerous feature for named files. There are several problems. Let say SlickEdit creates a temp file for the modified myfile.cpp to be auto-restored later. SlickEdit would happily auto-restore this correctly and show the file as modified. What if you are using other tools like Visual Studio to edit myfile.cpp. When you open it, you will get the wrong data. There are major problems with Version Control updating too. Unless the only tool you use is SlickEdit, it's isn't possible to make this safe.

Even considering just SlickEdit this is tricky. With SlickEdit you could have a workspace with auto-restore data for myfile.cpp that knows nothing about the temp file with modified data. Unless SlickEdit maintains some central database mapping somewhere, this is a train wreck too. This is further complicated by allowing multiple instances of SlickEdit to access the central database. This is doable but ugly. The problems with using other tools are the bigger issue though.

I love this feature for unnamed files though.

jwiede

  • Community Member
  • Posts: 97
  • Hero Points: 12
Re: Untitled/Unsaved files
« Reply #10 on: August 14, 2015, 12:14:39 am »
I hadn't thought this through for named files.
Was anyone asking for named files to work like that?  I'm not, I explicitly only wanted for unnamed files (I could see applying to named files would create issues, as you noted).

I love this feature for unnamed files though.
Sounds good!

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 4175
  • Hero Points: 300
Re: Untitled/Unsaved files
« Reply #11 on: August 14, 2015, 12:21:50 am »
The way I read it, it was ("save everything, named or not"). I guess I may have read it wrong though.

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 4175
  • Hero Points: 300
Re: Untitled/Unsaved files
« Reply #12 on: August 14, 2015, 12:23:50 am »
Would it make more sense for "Save All" to just save unnamed files too? It certainly keeps the UI simple.
« Last Edit: August 14, 2015, 12:36:17 am by Clark »

Tim Kemp

  • Senior Community Member
  • Posts: 514
  • Hero Points: 83
Re: Untitled/Unsaved files
« Reply #13 on: August 14, 2015, 12:32:11 am »
Save all saving all makes sense to me.

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 4175
  • Hero Points: 300
Re: Untitled/Unsaved files
« Reply #14 on: August 14, 2015, 12:36:31 am »
Another possibility is for SlickEdit to give filenames to Untitled files when you first create the new file. In other words, SlickEdit could simple name new files "<path>Untitled N" and make sure the file names are unique. This is different than NotePad++ but it keeps things easier to understand but also very useful. This would work for my needs for sure. Then the "Save All" button would obviously do what you want.