Page 1 of 1

untitled files are missing

Posted: 10.08.2024 16:12
by vadirajks
Hi, Need one help.
usually i need to get all untitled and all other existing files whenever i open the editor, somehow it has opened empty now.
Can you please let me know where i can find all though existing untitled files in Ubuntu.
Thanks for all your helps and support.
Vadiraj

Re: untitled files are missing

Posted: 11.08.2024 05:57
by main Alexey
for my config, untitled docs are auto-saved to session.
option "auto_save_session" description:
Allow to close program without confirmation, with saving modified documents
to the session. In details: if a) "ui_auto_save_session":true,
b) "ui_reopen_session":true,
c) "ui_history_disabled" does not have "t",
program will save modified documents to the session, on closing, without confirmation.
--
so, did you change any of mentioned 3 options? if yes, revert them.
if no, try to reset the user.json config anyway.
by default, Cud must save untitled files to last session.

Re: untitled files are missing

Posted: 11.08.2024 08:22
by main Alexey
>where i can find all though existing untitled files in Ubuntu.

You can search for them in the settings/ folder (it is usually in ~/.config/cudatext), session file is usually 'history session.json'.

Re: untitled files are missing

Posted: 12.08.2024 09:05
by vadirajks
Thanks Alexey for helping me.
unfortunately i don't see any history referring to the old opened files. It started everything from the fresh.
> tree ~/.config/cudatext/settings
/home/vadiraj/.config/cudatext/settings
├── cuda_color_text.ini
├── cuda_insert_time.ini
├── cuda_tabs_list.ini
├── history files.json
├── history.json
├── history session.1.cuda-session
├── history session.2.cuda-session
├── history session.json
├── packages.ini
├── plugins.ini
└── user.json

history session.1.cuda-session and history session.2.cuda-session is referring to the new session.

> grep "ui_auto_save_session\|ui_reopen_session\|ui_history_disabled" * -R
settings_default/default.json: // b) "ui_history_disabled" doesn't include 'U'.
settings_default/default.json: "ui_history_disabled": "",
settings_default/default.json: "ui_reopen_session": true,
settings_default/default.json: "ui_reopen_session_cmdline": true,
settings_default/default.json: //Option value>0: if "ui_reopen_session":true, save the current session, by timer
settings_default/default.json: //to the session. In details: if a) "ui_auto_save_session":true,
settings_default/default.json: //b) "ui_reopen_session":true,
settings_default/default.json: //c) "ui_history_disabled" does not have "t",
settings_default/default.json: "ui_auto_save_session": true,

Looks like l lost everything related to all old opened files.

Thanks,
Vadiraj

Re: untitled files are missing

Posted: 12.08.2024 09:08
by vadirajks
Is there anyway to recover that all old file's and what i have to do to make sure it wont happen it again. Thanks

Re: untitled files are missing

Posted: 12.08.2024 09:19
by main Alexey
You can recover old texts only if you find them in the settings-dir. if they are missed there, they are lost.
to make sure it won't happen, we need to find STEPS which leaded to loosing your files. can you write simple STEPS to repeat for me?

e.g.
- run Cud, make new tab, write text there
- ???
- ???
=> session is lost.

advise: SAVE untitled tabs to files.
also write to user.json
{
"ui_auto_save_session": false,
}

Re: untitled files are missing

Posted: 12.08.2024 11:08
by vadirajks
As of now, all tabs are working whatever i opened and by closing the editor. I usually keep many untitled file opened like a scratch pad and don't wanted to lose though unknowing. Is there any reason i need to know how it has cleared all to make sure to avoid anything as such. Thanks

Re: untitled files are missing

Posted: 12.08.2024 11:28
by main Alexey
Maybe after untitled tabs, you opened some file via command-line param (e.g. by double-clicking on file in file manager)? If so, try to reproduce the loosing of text.

Re: untitled files are missing

Posted: 12.08.2024 11:31
by vadirajks
Hi Alexey, just to answer your question
I am using cudatext for many months now i guess and i don't had any such problem before with the default setting. I am not sure what happened to lose though files unexpectedly is something i am trying to understand. Apart from that, its all good. Thank you very much for helping me :)

Re: untitled files are missing

Posted: 12.08.2024 11:38
by vadirajks
sure Alexey, let me try if anything i can reproduce and will get back to you here if i can replicate anything. Thanks