Projects - automatically restore previously opened files

Ask how to do things or if a certain feature is available in the program.
Post Reply
Professor Bernd
Posts: 8
Joined: 02 Apr 2021 20:45

Projects - automatically restore previously opened files

Post by Professor Bernd »

If this is ok, I would like to call "RJ TextEd" "RJTE" in the following. Please excuse the abbreviation, but "RJ TextEd" is hard to get off the tongue and hard to get off the fingers when writing! :P It's a bit like "Seven of Nine, Tertiary Adjunct of Unimatrix 01": very nice to see, but hard to pronounce.

How can I set the following? When you have a project open, you open additional files and close others. When you open the project the next time, all files should be opened exactly as they were before. (Regardless of whether files were added or removed from the project).

Probably this is similar to sessions, but with the difference that you can reopen exactly this session with a (project) file.

What I tried (unfortunately unsuccessfully):
2021-04-03_213650.jpg
2021-04-03_213650.jpg (56.69 KiB) Viewed 443 times

User avatar
pjj
Posts: 1853
Joined: 13 Oct 2009 13:48
Location: Kraków, Poland

Re: Projects - automatically restore previously opened files

Post by pjj »

If you want to reopen files, set Options > File > Open > Reopen last documents at startup; all files that were open when you closed RJ TE (all files, not only belonging to this project!) will be open, plus a project itself, if it was open.

However, when a project is open, there is no association between its files and non-project files that you open (unless you have set "add new documents to project" as per your screenshot). Say, you have project A open, plus "readme.txt" that does not belong to it; when you close project A, you are prompted to close its files. If you click on "yes", all files belonging to project A are closed bar "readme.txt". When you now open project B, you end up with project B files and "readme.txt".
Alium tibi quaere fratrem; hic, quem tuum putas, meus est. Titus Flāvius Caesar Vespasiānus Augustus

Professor Bernd
Posts: 8
Joined: 02 Apr 2021 20:45

Re: Projects - automatically restore previously opened files

Post by Professor Bernd »

pjj wrote:
04 Apr 2021 09:51
If you want to reopen files, set Options > File > Open > Reopen last documents at startup; all files that were open when you closed RJ TE (all files, not only belonging to this project!) will be open, plus a project itself, if it was open.
Yes, this is a good feature, but unfortunately not what I want. :(
pjj wrote:
04 Apr 2021 09:51
However, when a project is open, there is no association between its files and non-project files that you open (unless you have set "add new documents to project" as per your screenshot). Say, you have project A open, plus "readme.txt" that does not belong to it; when you close project A, you are prompted to close its files. If you click on "yes", all files belonging to project A are closed bar "readme.txt". When you now open project B, you end up with project B files and "readme.txt".
That is a pity. RJTE has really good, compelling features, but in this regard, I think PSPad has a unique selling point.

When you create a project in PSPad, you can add files to the project itself and manage them. And in addition, a project acts like a session that is connected to the project and saves all tabs automatically! The next time you start the project, all tabs (files) are automatically restored exactly as they were when you closed the program window. No project closing or saving is needed, all goes automatically.

This is so cool! And makes the work much easier! :-D

On the one hand you have the project, where you can manage the files belonging to the project, and on the other hand the program remembers all displayed files/tabs, even those not belonging to the project, including cursor position. All opened ones are reopened, all closed ones remain closed.

=> You click project file A and all tabs are restored as they were when project A was last closed.

=> You click project file B and all tabs are restored as they were when project B was last closed. - Completely independent from project A!

Maybe someone should make a feature request for this? :wink:

Finally the question, what does "Add new documents to project" and "Add opened documents to project" mean? Apparently both settings don't really do what you think they do, do they? No files are added to the project. :?:

User avatar
pjj
Posts: 1853
Joined: 13 Oct 2009 13:48
Location: Kraków, Poland

Re: Projects - automatically restore previously opened files

Post by pjj »

Professor Bernd wrote:
04 Apr 2021 18:04
That is a pity. RJTE has really good, compelling features, but in this regard, I think PSPad has a unique selling point.

When you create a project in PSPad, you can add files to the project itself and manage them. And in addition, a project acts like a session that is connected to the project and saves all tabs automatically! The next time you start the project, all tabs (files) are automatically restored exactly as they were when you closed the program window. No project closing or saving is needed, all goes automatically.

This is so cool! And makes the work much easier! :-D
If a file is associated with a project, why don't you add it to this project? Anyway...
Professor Bernd wrote:
04 Apr 2021 18:04
Maybe someone should make a feature request for this? :wink:
Maybe 8)
Professor Bernd wrote:
04 Apr 2021 18:04
Finally the question, what does "Add new documents to project" and "Add opened documents to project" mean? Apparently both settings don't really do what you think they do, do they? No files are added to the project. :?:
They don't add documents to the project? I never use these settings, I prefer to have fine control over my project. Let me see...

...Well, "add new documents to project" works as advertised, "add open documents" doesn't: I got an error (Access Violation, if I remember well), bug report sent.
Alium tibi quaere fratrem; hic, quem tuum putas, meus est. Titus Flāvius Caesar Vespasiānus Augustus

Professor Bernd
Posts: 8
Joined: 02 Apr 2021 20:45

Re: Projects - automatically restore previously opened files

Post by Professor Bernd »

pjj wrote:
04 Apr 2021 20:17
If a file is associated with a project, why don't you add it to this project? Anyway...
If you want to know, I'll be happy to explain. :)

I program mainly in AutoIt3 and work mainly with 1 project, my main project. For that alone this feature is very valuable! My project is not like a C++, Delphi, Lazarus or VB project, there is no main file. When I have the project open, there are files that belong to the project. They are associated with the project and are shown in the project manager. But not all project files are open, by now that would be too many.

Then there are files that do NOT belong to the project, but that I am working with at the moment. These are for example code snippets from the internet, code snippets from my collection, or just a new script where I start to create a new module. - These files don't belong to the project, they won't be added in the project manager, but it makes my work much easier, if I don't have to search and open them all individually every time.

So I find it very useful that the program does that for me and I don't have to worry about it. :-D

I guess you're thinking of "Reopen last documents at startup" again now, but that's not the same thing. I work with multiple editor windows and not with a single instance. AutoIt3 has a very good help file. In the help file there are many code examples that you can just click on. Then for each code example a separate editor window is opened. I can put each window next to my main window and work very well that way. - For this, of course, I don't want all " last documents" to be opened for each window.

So, now you know how I work. :P
.
pjj wrote:
04 Apr 2021 20:17
Professor Bernd wrote:
04 Apr 2021 18:04
Finally the question, what does "Add new documents to project" and "Add opened documents to project" mean? Apparently both settings don't really do what you think they do, do they? No files are added to the project. :?:
They don't add documents to the project? I never use these settings, I prefer to have fine control over my project. Let me see...

...Well, "add new documents to project" works as advertised, "add open documents" doesn't: I got an error (Access Violation, if I remember well), bug report sent.
I can confirm the error, but I can't reproduce it anymore.

Thank you very much for your kind and comprehensive answers! :-D <= imagine a "thumbs up" smilie here.

Post Reply