Page 1 of 1

How does session memory work??

Posted: 05 Aug 2021 00:54
by DerellLicht1
I'm confused about how RJTE remembers what 'last accessed' files are...

So here's my situation:
1. I had opened derbar.cpp and derbar.rc in RJTE, from the command line... I had then closed/re-opened the editor, and it had remembered all settings for both files, including bookmarks.

2. I had then opened another text file, looked at it for awhile, then closed it.

3. awhile after that, I used my Windows-based visual-grep program to open another file (top.listview.cpp, in case it matters later).

So then, I closed RJTE, changed back to the DerBar directory, and ran TextEd with no arguments
(I have 'Reopen last open documents at startup' enabled)
but it *only* opened the text file that I had previously opened and closed, *not* the other files that I had open...

*Then* I went back to my visual-grep program, clicked on top.listview.cpp in the results list, to open it again, and RJTE opened with *all* of the previously opened files!! and all my bookmarks, cursor positions, etc, were retained!!! This was actually what I expected to have happen, when I ran TextEd with no arguments, from the first directory.

This is very unexpected behavior!! I need to know where these stati are saved, and how I control this... I am *very* confused!!!

Re: How does session memory work??

Posted: 06 Aug 2021 14:00
by Rickard Johansson
Currently open files are saved in the settings file <AppData>\Roaming\RJ TextEd\TextEd.ini, when the program is closed.

I haven't been able to reproduce the behavior you describe.

Re: How does session memory work??

Posted: 07 Aug 2021 16:48
by DerellLicht1
Actually, I'm not sure I can reproduce anything either...

Now that you have explained how settings are saved, I understand better what is happening...
If I open some files in one folder, then open some files in another folder, RJTE has *one* settings file, so if I close the editor, then just run it again from yet another folder, it will open with all of those files still remembered.

The other editors that I've been accustomed to (predominantly MultiEdit and PsPad) actually had different settings files for each working directory; so I opened the editor in (for example) DerBar project directory, it would open the files that I last had open in that folder. If I opened the editor in another project directory, the equivalent would happen. If I opened it in a directory with no history, it just opened with an empty, un-named editor page.

The thing is, I've been living with this for so many years, that I'd completely forgotten all of this!! So when I switched to RJTE and it worked differently, I was completely confused!! Now I understand, and there is no problem...