ediprolog
ediprolog copied to clipboard
Make SWI work on Windows again.
Hi, Markus
Thanks you for this remarkable work.
I found that the current ediprolog
doesn't work with swi-prolog 8.4.1 on Windows, and @htzh's pull request
doesn't work for me. So I had to make some minor changes:
-
In some.pl buffer,
M-x ediprolog-dwim
blocks Emacs, and *ediprolog-history* printsNo prompt found.
This patch fixed the issue by settingprocess-environment
explicitly. It might be related to https://github.com/triska/ediprolog/issues/3 and https://github.com/SWI-Prolog/swipl/blob/d715454d15f6a24c0ffddf6fc157a82ac5be9383/src/pl-init.c#L432. -
In some.pl buffer, placing cursor at
?- member(X, [a,b,c]).
,M-x ediprolog-dwim
, the ediprolog can return the first solution, but when pressing;
Emacs blocks again. This because the `ediprolog-send-string need ";\n" instead of just ";" on windows. It might be related to https://github.com/triska/ediprolog/pull/1. -
Missing ";" in the original buffer for each solution. So add
ediprolog-insert-at-marker
.
PS. I haven't tested on other platforms, but at least it can work on windows 7 now.
I can create a pull request, if you think it is OK.
Thank you a lot for looking into this! Yes, please do file a pull request so that the code is at least available!
The dream is still to develop a portable toplevel (as a Prolog file that ships with ediprolog, see #2) that runs the same in all conforming Prolog systems. This would make supporting several Prolog systems much easier. I would like to keep the code of ediprolog as simple as possible, and will likely merge changes only if they are relevant for Scryer Prolog too. Still, it would be nice to see which changes you propose, and whether they can be simplified etc. Thank you a lot!