Go backward to Where to Keep Your Predicates
Go up to Running Prolog Under Emacs
Developing Programs Interactively
It is very rare for a programmer to get everything right the first
time round. Typically developing programs is a cycle of editing the
programming file, testing the program, finding some problems, editing
the program file, etc.
- To edit the file, display it in a buffer.
Use
C-x 4 f with the filename if you open the file for the
first time (C-x 5 f if you are running Emacs under
OpenWindows), or C-x 4 b/C-x 5 b if you are revisiting
the file (with OpenWindows Emacs, you can also use the mouse to make
the program file the current one, if the frame is visible on the
screen).
- Change the file, and remember to save the
changes--C-x C-s--or else the interpreter will load the
same version of the file as you used the last time.
- Go back to the window where the interpreter is running (unless
you are starting it for the first time of course)!
Use C-x 4 b/C-x 5 b and state that you want the
buffer *prolog* (again, if the frame with the interpreter is
visible, you can use the mouse).
- Reload the file into the interpreter with
consult.
<a.von.klopp@bangor.ac.uk>