SlickEdit Product Discussion > SlickEditĀ®

Question about auto restore of files

(1/3) > >>

ghamilto61:
Just made a jump from version 8 to 11.  In version 8 if you selected "Files" under "Auto Restore" options it would only restore the files if you didn't specify new files to edit on the command line.  In version 11 it restores everthing I've open, regardless of whether I specify new files on the command line.  Anyone know how I can get the old functionality back?
Thanks,
Gregg

Graeme:

--- Quote from: ghamilto61 on July 14, 2006, 05:56:57 pm ---Just made a jump from version 8 to 11.  In version 8 if you selected "Files" under "Auto Restore" options it would only restore the files if you didn't specify new files to edit on the command line.  In version 11 it restores everthing I've open, regardless of whether I specify new files on the command line.  Anyone know how I can get the old functionality back?
Thanks,
Gregg

--- End quote ---


A couple of "sort of" ways - there might be a better way.  One possibility is to have a different configuration directory for when you want to specify the files to open  - add the -sc switch to the command line and specify a configuration directory.  Means duplicating all your settings in a second config directory.  Search for "invocation" in the help index.  See also the -sr option for restore path - dunno if that's useful for you.

Another possibility is to run a macro when slick closes down that saves the name of the current workspace or the names of all the files and then closes them, then when you run slick next time, run a dialog that asks whether to re-open the files or workspace.

Graeme

hs2:
That seems somehow related to my request for a 'simple edit mode' to use Slick even for some quick-edit work _NOT_ restoring (and maybe corrupting) my complete workspace. But for my 'normal' project work I want to continue where I left...
What about an add. commandline switch telling Slick to ignore it's curr. save/exit flags and just to edit the files specified as arguments ?
HS2

ghamilto61:
Thanks for the ideas!
I had another idea which was to modify restore.e.  I've made slight modifications to macros in the past to get the behavior I wanted, but it's been a while, and restore.e is pretty complex.  I haven't been able to locate where it makes the decision on whether or not to restore files.  I also need a way to determine if files were specified on the command line so I can tell it not to restore files in that case.
Can anyone point me in the right direction on this?

Thanks,
Gregg

Graeme:

--- Quote from: ghamilto61 on July 19, 2006, 06:24:12 pm ---Thanks for the ideas!
I had another idea which was to modify restore.e.  I've made slight modifications to macros in the past to get the behavior I wanted, but it's been a while, and restore.e is pretty complex.  I haven't been able to locate where it makes the decision on whether or not to restore files.  I also need a way to determine if files were specified on the command line so I can tell it not to restore files in that case.
Can anyone point me in the right direction on this?

Thanks,
Gregg

--- End quote ---


If you diff vusrdefs.e before and after changing the auto restore options (need to close slick to get vusrdefs.e updated or do save_config on cmd line) you can see that def_auto_restore is set to one if "restore files" is enabled, otherwise zero.  The other auto restore options affect the def_restore_flags variable.  Searching for def_auto_restore you can see it in defmain in main.e  -   this seems likely to be the place but I'm not certain.  You might get some clues about cmdline options there too.  If you get desperate, you can invoke slick from a batch file that modifies an external file with some options that you can read when slick starts up.  The command line option to "run a command" appears to be for running an external program - I'm not certain of this or why you'd want to, rather than for running a slick macro.

Graeme

Navigation

[0] Message Index

[#] Next page

Go to full version