问题描述
我已经安装了SWI-Prolog和emacs的prolog模式。我有一个first_steps.pl文件,其中有prolog,我做C-c C-b来查询缓冲区。这将打开一个第二个缓冲区 prolog ,其模式是(Inferior Prolog:run)。一切都很好。但是,如何与那个劣质的prolog模式缓冲区进行交互是完全不清楚的。没有提示。打字和按回车什么也不做。如何根据缓冲区中提供的代码执行查询,即与SWI-prolog交互?
请注意,此相关问题似乎无法解决劣质模式,只安装prolog模式:
在我的情况下,我将变量 prolog-program-name
我的 swipl
可执行文件的完整路径,那么没关系。 Emacs可能无法找到您的口译员。
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
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.
这篇关于在emacs中如何与劣质的prolog过程进行交互?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!