sweep: SWI-Prolog Embedded in Emacs
All Application Manual Name SummaryHelp

  • Documentation
    • Reference manual
    • Packages
      • SWI-Prolog binding to libarchive
      • SWI-Prolog Python interface
      • SWI-Prolog SGML/XML parser
      • SWI-Prolog BerkeleyDB interface
      • Managing external tables for SWI-Prolog
      • sweep: SWI-Prolog Embedded in Emacs
        • Installation
        • Getting started
      • Prolog Unit Tests
      • SWI-Prolog Natural Language Processing Primitives
      • SWI-Prolog RDF parser
      • SWI-Prolog Unicode library
      • SWI-Prolog binding to BSD libedit
      • STOMP -- a SWI-Prolog STOMP client
      • Redis -- a SWI-Prolog client for redis
      • SWI-Prolog Source Documentation Version 2
      • SWI-Prolog SSL Interface
      • SWI-Prolog Semantic Web Library 3.0
      • Transparent Inter-Process Communications (TIPC) libraries
      • Paxos -- a SWI-Prolog replicating key-value store
      • SWI-Prolog C-library
      • mqi -- Python and Other Programming Languge Integration for SWI Prolog
      • Google's Protocol Buffers Library
      • SWI-Prolog HTTP support
      • A C++ interface to SWI-Prolog
      • SWI-Prolog ODBC Interface
      • SWI-Prolog binding to zlib
      • SWI-Prolog binding to GNU readline
      • Pengines: Web Logic Programming Made Easy
      • Constraint Query Language A high level interface to SQL databases
      • SWI-Prolog Regular Expression library
sweep: SWI-Prolog Embedded in Emacs
Eshel Yaronme@eshelyaron.com
Abstract
Sweep is an embedding of SWI-Prolog in GNU Emacs. It provides an interface for executing Prolog queries and consuming their results from Emacs Lisp. Sweep further builds on top of this interface and on top of the standard Emacs facilities to provide advanced features for developing SWI-Prolog programs in Emacs.

Table of Contents

1 Installation
2 Getting started

1 Installation

Installing Sweep requires:

  • Emacs 27 or later, and
  • SWI-Prolog 8.5.18 or later.

Sweep is available from NonGNU ELPA, to install it simply type in Emacs M-x package-install RET sweeprolog RET.

Note that in Emacs prior to version 28, you need to explicitly enable NonGNU ELPA by adding something like the following to your Emacs configuration:

  (with-eval-after-load 'package
    (add-to-list 'package-archives '("nongnu" . "https://elpa.nongnu.org/nongnu/")))

2 Getting started

After installing the sweeprolog Elisp library, load it into Emacs:
  (require 'sweeprolog)

All set! You can now use Sweep for Prolog development and for integrating Prolog into your Emacs Lisp code. For a full description of the different features of Sweep, see the Sweep manual.