问题
I've installed SWI-Prolog and emacs' prolog mode. I have a first_steps.pl file with prolog in it, and I do C-c C-b to consult the buffer. This opens a second buffer, prolog, whose mode is (Inferior Prolog: run).
All well and good. However, it's completely unclear how to interact with that inferior prolog mode buffer. There is no prompt. Typing things and pressing return does nothing. How can I execute queries based on the code consulted from the buffer, i.e, interact with SWI-prolog?
Note that this related question does not seem to address usage of the inferior mode, only installation of prolog mode: Using prolog with emacs
回答1:
In my case, I changed the variable prolog-program-name
to use the full path to my swipl
executable, then it was fine. Emacs might just not be able to find your interpreter.
来源:https://stackoverflow.com/questions/16424293/how-do-i-interact-with-the-inferior-prolog-process-in-emacs