[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Auto Save



On 11 Sep 2020 as I do recall,
          Dave  wrote:

> On 11 Sep, dave@xxxxxxxxxxxxx wrote:

[snip]


> > Set the time for (say) 1 minute.
> 
> > Start a text document and write "Hello world", Save it into directory
> > "APlace".
> 
> > Carry on typing for many minutes then open the text document that's in Dir
> > "APlace".
>

StrongED deliberately doesn't overwrite the file that the user has
loaded from (thus ensuring that you get the same behaviour whether
Auto-save is switched on or not - if you decide to abort and discard the
document without saving, or if the computer crashes, your original is
still as it was when you last left it).

Instead, it keeps a backup autosaved copy, which is the one that gets
reloaded if you start the program up and it discovers data still in
there (i.e. it hasn't been wiped by the user doing a manual save, which
resets the autosaved record, or actively discarding the document).
That's the only scenario in which you're ever likely to see the
autosaved data, when StrongED is restoring after a crash or if you
choose to 'remember' unsaved files on shutdown instead of simply saving
them (either in order to ensure they are automatically reloaded the next
time you run the program, or because you haven't actually saved them to
disc yet and don't want to).

> I should mention... I am also aware of the 
> "...!StrED_cfg.UserPrefs.AutoSave" directory, but it doesn't have the text
> I was writing.

The active AutoSave directory will contain a file of type Data named
List, which records the location, filetype, display mode, window size
and position, and scroll offsets of all currently unsaved StrongED
documents.   If this file isn't present, then auto-saving is probably
not using that directory (or simply not enabled).

For example, mine currently reads:
0000002F RAM::RamDisc0.$.OLEfiles.TMEFF68 442 1400 1302 1198 0 618 -offset 1770 -ftyp &FFF -mode News
TEXT SDFS::ARMiniX.$.!BOOT.Resources.!Scrap.ScrapDirs.ID29876a0a.Transient.Transient.2020/08/31.Erik 430 1758 1292 1198 0 2148 -offset 3244 -mode BaseMode

I have two StrongED windows open, one of which is a file in my Transient
directory the path of which is being 'remembered', and the other of
which is this e-mail, which is an OLE file being used by Messenger Pro,
and which currently has a copy in the AutoSave directory saved as
0000002F

I've just made an edit to the file 'Erik', and another file has appeared
in the Autosave directory, entitled 00000002 - and the List file has
been updated to read:
0000002F RAM::RamDisc0.$.OLEfiles.TMEFF68 442 1400 1302 1198 0 1050 -offset 2352 -ftyp &FFF -mode News
00000002 SDFS::ARMiniX.$.!BOOT.Resources.!Scrap.ScrapDirs.ID29876a0a.Transient.Transient.2020/08/31.Erik 1872 1438 1292 1198 0 2370 -offset 3375 -ftyp &FFF -mode BaseMode

Every time I manually save a file, the corresponding copy disappears
from Autosave and the List is updated to read "TEXT" instead of the
Autosave leafname, thus telling StrongED that on a restart it should
simply load the version on disc rather than any unsaved updated copy.

-- 
Harriet Bazley                     ==  Loyaulte me lie ==

C++ - the language in which only friends can access your private members