If I remember correctly, there was at one point a fairly convenient way to launch a local web server serving a local copy of the reference manual. (And did typing help(foo) automatically launch the web browser? Maybe.)
Is that still available (assuming I am remembering correctly that it was once available)?
I am currently not finding any description in the reference manual of how to run the reference manual locally. (I see what looks like a full set of HTML documents inside /Applications/SWI-Prolog.app, but Safari’s ‘Open File’ dialog refuses to let me navigate into the app directory to select an HTML page to open. And I also see what looks like a way to browse auto-generated documentation for the Prolog source. I don’t see anything that is nearly as simple as I remember it being.)
I’m using SWI-Prolog version 8.0.3, or was, until I installed 8.1.19 just now, trying to figure where the XPCE interface to the reference manual had gone (sigh – I did like it, and I’m sorry it’s gone away).
Two reasons that I think I want to read the reference manual locally instead of only at https://eu.swi-prolog.org/pldoc/refman –
(1) I do spend time in places where I don’t have good network connectivity (and yes, sometimes I pass the time in those places by writing programs for which I need the manual).
(2) I don’t always pick up new versions of swipl (or any other program) quickly, and it can be very confusing when something has changed and the description on the swi-prolog.org web site does not match the behavior of my running system. Much of this evening went to trying to puzzle out why the reference manual says the user initialization file is called init.pl, and the FAQ says it’s called .plrc, and what version 8.0.3 wants to see is .swiplrc; I suspect that that would have been easier to resolve had I been looking at a reference manual that matched my installed version. (It would still be helpful if the reference manual mentioned both old and new behavior, for changes like that one.)
Many thanks for any advice or help.
–C. M. Sperberg-McQueen
P.S. A little further experimentation shows that something like
:- doc_server(Port). :- use_module(library(pldoc/doc_library)). :- doc_load_library. :- doc_browser.
does something like what I remember and was hoping for. (It’s not quite perfect, because the call to
doc_load_library produces a screen or two of error messages over a not-found dynamic library, and the web server is sending log messages to the console, which would be distracting in the long run. But it’s progress. I’m leaving the post up, though, in the hopes that someone will show me a better way that I would have found if I had managed to RTFM.)