From deed71ac895451041359d7b18e58eca0a0972bc3 Mon Sep 17 00:00:00 2001 From: Robin Haberkorn Date: Wed, 17 Dec 2025 01:17:11 +0100 Subject: implemented backup file mechanism * The backup mechanism is supposed to guard against crashes of SciTECO and unexpected program terminations (e.g. power cycling, etc.) * In a given interval (no matter whether busy or idlying on the prompt) SciTECO saves all modified buffers with the filename~ (like most other editors). As an optimization files are not backed up if they have been backed up previously to avoid pointless and possibly slow file system writes. * While the backup mechanism exists outside of the usual undo-paradigm - backup file creating is not bound to character input and it makes no sense to restore the exact state of backup files - there are some interesting interactions: * When a buffer is dirtyfied or saved that was previously backed up, it must always be reset to the DIRTY state on rubout, so backups are eventually recreated. * When a buffer is dirtyfied first (was clean), the backup file must be removed on rubout as well - we don't expect backup files for clean buffers. * There is currently no automatic way to restore backup files. This could potentially be done by opener.tes and session.tes in the future, although you couldn't currently always get meaningful user feedback (whether he wants to restore the file). Perhaps we should at least log a message when detecting backup files that are newer than the file that is being opened. --- README | 1 + 1 file changed, 1 insertion(+) (limited to 'README') diff --git a/README b/README index 7c798b8..4f3b7b5 100644 --- a/README +++ b/README @@ -73,6 +73,7 @@ Features This makes it even harder to destroy work by accident than in most other editors. Rubbed out commands can be re-inserted (redo). +* Timing-based backup mechanism * Munging: Macros may be munged, that is executed in batch mode. In other words, SciTECO can be used for scripting. By default, a profile is munged. -- cgit v1.2.3