plugin Backup File: request new feature

Plugins for SynWrite and CudaText...
Post Reply
cydonia
Posts: 23
Joined: 26.07.2024 01:09

plugin Backup File: request new feature

Post by cydonia »

Request new feature "Auto-create backup AFTER each saving" option in cudatext "backup file" plugin.

In the cudatext "backup file" plugin version 0.9.11 2023-02-24 the option "Auto-create backup before each saving" option allows the previously saved file backup to be retained however the backup will always be one version prior to the current file and if the current saved file becomes lost or corrupted (as happened to me recently) then all changes made to the file since the previous auto or manual backup are lost.

I'd like to request a new feature in addition to the existing "Auto-create backup before each saving" option of an "Auto-create backup AFTER each saving" option (this can be mutually exclusive to the existing option if thats easier to implement ie select before or after) that first saves the file then creates a backup of that saved file so that the latest backup will aways reflect the newly saved version rather than the previous version.

I have found an interim partial solution of setting ui_save_always to true and then manually saving a file twice before closing the file so that the last backup is of the same file but this requires saving the file twice before closing.
main Alexey
Posts: 2323
Joined: 25.08.2021 18:15

Re: request new feature in cudatext "backup file" plugin

Post by main Alexey »

plugin readme.txt:
Author: Andrey Kvichanskiy (kvichans, at forum/github)
License: MIT

i hope Kvichans can help here. i don't know the code.
or give the patch, please.
main Alexey
Posts: 2323
Joined: 25.08.2021 18:15

Re: request new feature in cudatext "backup file" plugin

Post by main Alexey »

plugin's code:

def on_save_pre(self, ed_self):#NOTE: on_save_pre

it is handling on_save_pre - event is called before saving of file.
what you want: handle on_save (w/o _pre).
Post Reply