The latest version of ediprolog is 0.9yb. Download: ediprolog.el
New:

A screenshot is here.

A video demonstration is here (1MB).

ediprolog lets you interact with SWI-Prolog in all buffers. You can load and syntax-check Prolog programs and evaluate embedded queries.

Installation

To install ediprolog, copy ediprolog.el to your home directory, and add to your .emacs:
    (load "~/ediprolog.el")
    (global-set-key [f10] 'ediprolog-dwim)
    
(If F10 is not free on your platform, bind ediprolog-dwim to any other key sequence, for example, use:
    (global-set-key "\C-c\C-e" 'ediprolog-dwim)
    
to bind it to C-c C-e. In the following, replace "F10" with the binding you chose.)

Restart Emacs and use M-x customize-group RET ediprolog RET to configure ediprolog.

Usage

Queries start with `?-' or `:-', possibly preceded by `%' and whitespace. An example of a query is:
      %?- member(X, [a,b,c]).
    
If you press F10 when point is on that query, you get:
      %?- member(X, [a,b,c]).
      %@ X = a ;
      %@ X = b ;
      %@ X = c ;
      %@ false.
    
If you press F10 when point is NOT on a query, the buffer content is consulted in the Prolog process, and point is moved to the first error (if any).

Other key sequences:

C-0 F10 kill Prolog process
C-1 F10 always consult buffer (even if point is on a query)
C-2 F10 always consult buffer, using a new process
C-7 F10 equivalent to ediprolog-toplevel
C-u F10 first load buffer into existing process and then, if on a query, evaluate it
C-u C-u F10   like C-u F10, with a new process



Main page