Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make SWI work on Windows again. #7

Open
chansey97 opened this issue Dec 17, 2021 · 1 comment
Open

Make SWI work on Windows again. #7

chansey97 opened this issue Dec 17, 2021 · 1 comment

Comments

@chansey97
Copy link

chansey97 commented Dec 17, 2021

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:

  1. In some.pl buffer, M-x ediprolog-dwim blocks Emacs, and *ediprolog-history* prints No prompt found.
    This patch fixed the issue by setting process-environment explicitly. It might be related to Find out we are running under emacs? #3 and https://github.com/SWI-Prolog/swipl/blob/d715454d15f6a24c0ffddf6fc157a82ac5be9383/src/pl-init.c#L432.

  2. 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 Made SWI work on Windows. Added support for XSB. #1.

  3. 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.

@triska
Copy link
Owner

triska commented Dec 17, 2021

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants