Saving files and saving sessions
>>>Or put differently and more simply, no matter what I do (whether I load a named session or use the default session, load files, save files, don't load or don't save files etc etc), I always want the session state saved when I leave Cud. ALWAYS.
Last change is not like you tell here. it saves session on exit only if its NOT DEF session. why?
- open 2 files a+b, exit Cud, DEF session saved with 2 files a+b
- run "cudatext d -ns", exit Cud - now Cud DONT save filename d to session! if it does, then old good session with a+b will be lost! so now Cud don't do it. logical?
- run "cudatext d -ns", and choose custom session. on exit, Cud saves "d" to session.
Last change is not like you tell here. it saves session on exit only if its NOT DEF session. why?
- open 2 files a+b, exit Cud, DEF session saved with 2 files a+b
- run "cudatext d -ns", exit Cud - now Cud DONT save filename d to session! if it does, then old good session with a+b will be lost! so now Cud don't do it. logical?
- run "cudatext d -ns", and choose custom session. on exit, Cud saves "d" to session.
I've now tested the current beta (115.3) on Windows and Linux and so far have encountered no problems with the session handling other than the change in -ns behaviour with the default session. I can circumvent this change in a slightly clumsy way with a batch file or bash script.
This whole saga has left me scratching my head. Cud is a great editor but I want to edit files and not chase bugs and regressions or fight changes that are not backwards compatible. Some degree of this is unavoidable but this has been a bit much for my taste.
This whole saga has left me scratching my head. Cud is a great editor but I want to edit files and not chase bugs and regressions or fight changes that are not backwards compatible. Some degree of this is unavoidable but this has been a bit much for my taste.
Back in May, when I saw this option in the Wiki:
I assumed this meant that no session would be loaded on start-up but that the session state would be saved on exit. And so it worked.
Then, over summer, you changed that (losing backwards compatibility in the process). For my own workflow (which is 100% command-line based) I can work around that change (in a batch/bash script) by dropping -ns from my command lines and copying an empty "history session.empty" file to "history session.json". This is dead ugly but it sort of works.
Perhaps the cleanest solution would be to split -ns into two further options: -nsl and -nss. The first (-nsl=no session load) runs Cud with no session loaded but will save the session state in the end. The second (-nss=no session save) loads a session but doesn't save any changes on exit. (-ns could stay as a shortcut to do both or could go.)
As these are command line options for people who (hopefully) know how to properly use the command line I don't think this would complicate matters too much... but I've been known to be too optimistic in that regard.
Code: Select all
-ns - Ignore saved session
Then, over summer, you changed that (losing backwards compatibility in the process). For my own workflow (which is 100% command-line based) I can work around that change (in a batch/bash script) by dropping -ns from my command lines and copying an empty "history session.empty" file to "history session.json". This is dead ugly but it sort of works.
Perhaps the cleanest solution would be to split -ns into two further options: -nsl and -nss. The first (-nsl=no session load) runs Cud with no session loaded but will save the session state in the end. The second (-nss=no session save) loads a session but doesn't save any changes on exit. (-ns could stay as a shortcut to do both or could go.)
As these are command line options for people who (hopefully) know how to properly use the command line I don't think this would complicate matters too much... but I've been known to be too optimistic in that regard.