Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

needs regularly do 'ui_backup_sessions' not only when 'close' #5870

Open
longforrich opened this issue Feb 20, 2025 · 3 comments
Open

needs regularly do 'ui_backup_sessions' not only when 'close' #5870

longforrich opened this issue Feb 20, 2025 · 3 comments

Comments

@longforrich
Copy link

Cuda version:1.220.6.1

My configs

"ui_auto_save_session":true
"ui_reopen_session":true
"ui_backup_sessions": 5,
"ui_session_save_interval": -45

I'm too lazy to save files, so always open a lot of untitled tabs to record some notes, while the computer doesn't shutdown for a long time.

The history_session.json faithfully saves unsaved text, but the backup file won't be generated because I didn't close cuda.

An unexpected crash of cuda caused history_session.json to be lost (a win11 problem) and my memory to be lost too....

Can there be an option that allows ui_backup_sessions to happen regularly without closing cuda?

Thx!🙏

@Alexey-T

This comment has been minimized.

@Alexey-T
Copy link
Owner

Alexey-T commented Feb 20, 2025

I do this: opened 3 untitled tabs, typed some text ('dd', 'ee', 'ff'). option:
"ui_session_save_interval": -20,

now I wait 20 secs (I need app in IDLE state), and app saves 'settings/history session.json' (and 2 backups because of "ui_backup_sessions":2 ). this session has the unsaved texts ('dd', 'ee' etc).

fragment:

  "000": {
    "modified": true,
    "file": "",
    "tab_title": "Untitled1",
    "kind": "",
    "text": "dddd",
    "redo": "",
    "enc": "UTF-8",
    "tab_size": 4,
    "tab_spaces": false,
    "crt": "4,0,-1,-1,",
    "group": 1
  },
  "001": {
    "modified": true,
    "file": "",
    "tab_title": "Untitled2",
    "kind": "",
    "text": "eeeee",
    "redo": "",
    "enc": "UTF-8",
    "tab_size": 4,
    "tab_spaces": false,
    "crt": "5,0,-1,-1,",
    "group": 1
  },                         

can you repeat this case?

@Alexey-T
Copy link
Owner

Alexey-T commented Feb 20, 2025

Note that when 'session save timer' activates, ie ticks, it writes a line to Console panel (can be shown by Ctrl+tilde).

Saved session: "history session.json", 0 file(s) + 1 untitled, by timer at 17:50:42

do you see these lines in console?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants