Progressing the SWI-Prolog environment

Uh oh, I see I posted my previous comment about history in this thread by mistake. I meant to post it in this new topic:

Apologies for the confusion. I guess the newer topic can be merged into this one?

I added that in my init.pl file in an effort to resolve my history issues, but I still don’t get any history in the newer versions (9.3.24 and 9.3.33, which I keep referring to as 3.33- sorry).

Btw, I guess all versions pick up the same init.pl file so that could cause trouble, for instance if there’s a readline setting for one version that’s not supported by another. Is there a way to have an init.pl file specific to a version, e.g. in a folder named the same as a version? Sounds hacky though.

Thanks, that clarifies things a bit. So the history files written by earlier versions (prior to the switch to SDL?) can’t be read, or updated by, newer versions (after the switch)?

So that’s where the history is! The hint is in the name I guess :sweat_smile:

I can also see a dir_history.bak for backup I guess.

I had a look in my dir_history and there’s a bunch of files (40 of them) in there that hold the history for all my projects going back to 2022. They’re just plaintext files so I can see all the stored commands in my text editor. I like that! But if I remove dir-history then I lose all of them. That I don’t like!

The files in dir_history are named with hashes that I’m guessing must record the path to the directory of the Prolog session that created the history file. Is that correct?

Is there a way to re-activate those history files, and make them available to their respective SWI-Prolog sessions again in the newer SWI-Prolog versions? By “respective” I mean any SWI-Prolog session starting from the same directory as the session that originally created the history file (assuming my model about that is correct)?

I would really like to be able to hold on to my command history. I start so many different projects that it’s difficult to remember what I was doing in every one. I usually document the important queries but not always.

Clearly, I have some attachment issues. :squinting_face_with_tongue: