2

I am on Windows 8, I like Emacs and wish to use it for Prolog programming. I am trying to set up an inferior Prolog process from which to query Prolog programs.

I am following this installation. I have successfully followed steps 1 (saved on C:\Users\Username\Emacs-24.3\site-lisp), 2, 3, and some of 4. But I cannot

Go to "Prolog Inferior" group and edit "Prolog Program Name", to insert SWI Prolog's command pathname as there is no edit option to be found.

My question:

  • how to edit prolog-program-name, or
  • how to insert SWI Prolog's command pathname, or
  • how to set up an inferior Prolog process on emacs ?

Thank you!

Erik Kaplun
  • 37,128
  • 15
  • 99
  • 111
Alexandre Holden Daly
  • 6,944
  • 5
  • 25
  • 36
  • by the way, this discussion did not help: [link](http://stackoverflow.com/questions/16424293/how-do-i-interact-with-the-inferior-prolog-process-in-emacs) – Alexandre Holden Daly Oct 30 '13 at 18:12
  • 1
    What it's trying to say is that you need to `M-x customize-group RET prolog`, and I think you'll figure it out from there. –  Oct 30 '13 at 21:25
  • Emacs-24.3 already comes with a more recent version of prolog.el than the one from http://turing.ubishops.ca/home/bruda/emacs-prolog. So step 1 and 2 are not needed. Step 3 is buggy: it should use `"\\.pl\\'"` rather than `"\\.pl"`. – Stefan Oct 31 '13 at 01:39

2 Answers2

0

If swipl is in your $PATH, you don't need any customization at all. But otherwise, just use the built-in prolog-mode and add something like (setq prolog-program-name "c:/Users/Username/SWI-Prolog/swipl"). Note the use of forward slashes instead of backslashes.

Stefan
  • 27,908
  • 4
  • 53
  • 82
0

Somehow this is what worked for me. This is on Emacs 26.3. After upgrading all my packages, C-c C-b in Prolog buffers had changed its behaviour into running GNU Prolog by default. Under Prolog Program Name, which appears to be a dictionary, there is a key t which was set to gprolog. So I set it to swipl as highlighted in the screenshot, and got back the previous/desired behaviour.

screenshot

Erik Kaplun
  • 37,128
  • 15
  • 99
  • 111