:PROPERTIES:
:CUSTOM_ID: overview
:DESCRIPTION: Major mode for reading and writing Prolog
+:ALT_TITLE: Overview
:END:
=sweep= is an embedding of SWI-Prolog in Emacs. It provides an
:PROPERTIES:
:CUSTOM_ID: high-level-architecture
:DESCRIPTION: Overall structure of this project
+:ALT_TITLE: Architecture
:END:
=sweep= uses the C interfaces of both SWI-Prolog and Emacs Lisp to
:PROPERTIES:
:CUSTOM_ID: installation
:DESCRIPTION: Intructions for installing sweep
+:ALT_TITLE: Installation
:END:
#+CINDEX: install
:PROPERTIES:
:CUSTOM_ID: getting-started
:DESCRIPTION: First steps with sweep
+:ALT_TITLE: Getting Started
:END:
#+CINDEX: configuration
:PROPERTIES:
:CUSTOM_ID: prolog-init
:DESCRIPTION: Functions for starting and stopping the embedded Prolog runtime
+:ALT_TITLE: Initialization
:END:
#+FINDEX: sweeprolog-initialize
:PROPERTIES:
:CUSTOM_ID: querying-prolog
:DESCRIPTION: Functions for invoking Prolog predicates and consuming their results
+:ALT_TITLE: Querying Prolog
:END:
#+FINDEX: sweeprolog-open-query
:PROPERTIES:
:CUSTOM_ID: elisp-to-prolog
:DESCRIPTION: How sweep translates Emacs Lisp to Prolog
+:ALT_TITLE: Elisp to Prolog
:END:
=sweep= converts Elisp objects into Prolog terms to allow the Elisp
:PROPERTIES:
:CUSTOM_ID: prolog-to-elisp
:DESCRIPTION: How sweep translates Prolog to Emacs Lisp
+:ALT_TITLE: Prolog to Elisp
:END:
=sweep= converts Prolog terms into Elisp object to allow efficient
:PROPERTIES:
:CUSTOM_ID: count-permutations
:DESCRIPTION:
+:ALT_TITLE: Example Query
:END:
As an example of using the =sweep= interface for executing Prolog
:PROPERTIES:
:CUSTOM_ID: funcall-from-prolog
:DESCRIPTION: Special predicates for calling back to Emacs from Prolog
+:ALT_TITLE: Calling Back to Elisp
:END:
The =sweep-module= defines the foreign Prolog predicates =sweep_funcall/2=
:PROPERTIES:
:CUSTOM_ID: editing-prolog-code
:DESCRIPTION: Major mode for reading and writing Prolog
+:ALT_TITLE: Editing Prolog code
:END:
#+CINDEX: sweeprolog-mode
:PROPERTIES:
:CUSTOM_ID: indentation
:DESCRIPTION: How sweep indents Prolog code
+:ALT_TITLE: Indentation
:END:
#+CINDEX: indentation
-
In =sweeprolog-mode= buffers, the appropriate indentation for each line is
determined by a bespoke /indentation engine/. The indentation engine
analyses the syntactic context of a given line and determines the
:PROPERTIES:
:CUSTOM_ID: indentation-rules
:DESCRIPTION: The intented indentation scenaria
+:ALT_TITLE: Indentation Rules
:END:
Lines in =sweeprolog-mode= buffers are indented according to the following
:PROPERTIES:
:CUSTOM_ID: semantic-highlighting
:DESCRIPTION: Rich fontification for Prolog code
+:ALT_TITLE: Highlighting
:END:
#+CINDEX: fontification
:PROPERTIES:
:CUSTOM_ID: highlighting-styles
:DESCRIPTION: Available highlighting styles
+:ALT_TITLE: Available Styles
:END:
=sweep= comes with three highlighting styles:
:PROPERTIES:
:CUSTOM_ID: variable-highlighting
:DESCRIPTION: Commands for emphasizing all occurrences of a Prolog variable
+:ALT_TITLE: Highlight Variables
:END:
#+CINDEX: variable highlighting
:PROPERTIES:
:CUSTOM_ID: qq-highlighting
:DESCRIPTION: Delegating fontification of quasi-quoted contents to other Emacs major modes
+:ALT_TITLE: Quasi-Quotation
:END:
Quasi-quotations in =sweeprolog-mode= buffer are highlighted according
:PROPERTIES:
:CUSTOM_ID: whitespace
:DESCRIPTION: Commands for aligning Prolog code without having to count spaces
+:ALT_TITLE: Code Layout
:END:
#+CINDEX: whitespace
:PROPERTIES:
:CUSTOM_ID: cycle-spacing
:DESCRIPTION: Commands for adjusting whitespace according to Prolog conventions
+:ALT_TITLE: Aligning Spaces
:END:
#+FINDEX: sweeprolog-align-spaces
#+FINDEX: cycle-spacing
:PROPERTIES:
:CUSTOM_ID: electric-layout-mode
:DESCRIPTION: Minor mode for automatically adjusting whitespace
+:ALT_TITLE: Electric Layout mode
:END:
#+CINDEX: electric layout
:PROPERTIES:
:CUSTOM_ID: term-based-commands
:DESCRIPTION: Commands that recognize and operate on Prolog terms
+:ALT_TITLE: Term-based Editing
:END:
#+CINDEX: sexps
:PROPERTIES:
:CUSTOM_ID: sweeprolog-xref
:DESCRIPTION: Commands for finding cross-references for Prolog predicates
+:ALT_TITLE: Cross References
:END:
#+CINDEX: cross reference
:PROPERTIES:
:CUSTOM_ID: predicate-boundaries
:DESCRIPTION: Commands operating on a Prolog predicate definition as a single unit
+:ALT_TITLE: Predicate Boundaries
:END:
#+CINDEX: predicate-based motion
:PROPERTIES:
:CUSTOM_ID: following-file-specs
:DESCRIPTION: Commands for jumping to files that appear in Prolog code
+:ALT_TITLE: File Specifications
:END:
#+KINDEX: C-c C-o
:PROPERTIES:
:CUSTOM_ID: loading-buffers
:DESCRIPTION: Commands for loading Prolog predicates from the current buffer
+:ALT_TITLE: Loading Buffers
:END:
#+KINDEX: C-c C-l
:PROPERTIES:
:CUSTOM_ID: creating-new-modules
:DESCRIPTION: Commands for populating new Prolog modules with predefined contents
+:ALT_TITLE: Creating New Modules
:END:
#+CINDEX: auto-insert
:PROPERTIES:
:CUSTOM_ID: sweeprolog-pldoc
:DESCRIPTION: Commands for adding documentation to Prolog predicate definitions
+:ALT_TITLE: Documenting Code
:END:
#+CINDEX: document code
:PROPERTIES:
:CUSTOM_ID: eldoc-integration
:DESCRIPTION: Commands for showing documentation for Prolog predicates
+:ALT_TITLE: Showing Prolog Docs
:END:
=sweep= integrates with the Emacs minor mode =ElDoc=, which automatically
:PROPERTIES:
:CUSTOM_ID: diagnostics
:DESCRIPTION: Commands for finding errors in Prolog code
+:ALT_TITLE: Showing Errors
:END:
#+CINDEX: flymake
:PROPERTIES:
:CUSTOM_ID: exporting-predicates
:DESCRIPTION: Commands for adding Prolog predicates to their module's export list
+:ALT_TITLE: Exporting Predicates
:END:
#+CINDEX: exported predicates
:PROPERTIES:
:CUSTOM_ID: code-completion
:DESCRIPTION: Auto-completion commands for Prolog code
+:ALT_TITLE: Code Completion
:END:
#+CINDEX: code completion
:PROPERTIES:
:CUSTOM_ID: insert-term-at-point
:DESCRIPTION: Commands for smart insertion of Prolog terms based on the surrounding context
+:ALT_TITLE: Insert Term DWIM
:END:
#+CINDEX: context-based term insertion
:PROPERTIES:
:CUSTOM_ID: filling-holes
:DESCRIPTION: Commands for finding and filling holes for interactive term insertion
+:ALT_TITLE: Filling Holes
:END:
#+CINDEX: holes
:PROPERTIES:
:CUSTOM_ID: writing-tests
:DESCRIPTION: Commands that facilitate writing Prolog unit tests
+:ALT_TITLE: Writing Tests
:END:
#+FINDEX: sweeprolog-plunit-testset-skeleton
:PROPERTIES:
:CUSTOM_ID: managing-dependencies
:DESCRIPTION: Commands for managing dependencies of Prolog source files on each other
+:ALT_TITLE: Code Dependencies
:END:
#+FINDEX: sweeprolog-update-dependencies
:PROPERTIES:
:CUSTOM_ID: prolog-help
:DESCRIPTION: Commands for displaying detailed Prolog documentation
+:ALT_TITLE: Prolog Help
:END:
#+CINDEX: prolog help
:PROPERTIES:
:CUSTOM_ID: prolog-top-level
:DESCRIPTION: Executing Prolog queries in a REPL-like interface
+:ALT_TITLE: The Prolog Top-Level
:END:
#+CINDEX: top-level
:PROPERTIES:
:CUSTOM_ID: multiple-top-levels
:DESCRIPTION: Creating and handling multiple Prolog top-level buffers
+:ALT_TITLE: Multiple Top-Levels
:END:
Any number of top-levels can be created and used concurrently, each in
:PROPERTIES:
:DESCRIPTION: A special buffer for operating on active top-levels
:CUSTOM_ID: top-level-menu
+:ALT_TITLE: Top-level Menu
:END:
#+CINDEX: Top-level Menu
:PROPERTIES:
:CUSTOM_ID: top-level-signals
:DESCRIPTION: Commands for interrupting running Prolog top-levels
+:ALT_TITLE: Top-Level Signaling
:END:
#+CINDEX: signaling Prolog threads
:PROPERTIES:
:CUSTOM_ID: top-level-history
:DESCRIPTION: Accessing previous queries posted to the Prolog top-level
+:ALT_TITLE: Top-level History
:END:
=sweeprolog-top-level-mode= buffers provide a history of previously user
:PROPERTIES:
:CUSTOM_ID: completion-in-top-level
:DESCRIPTION: Commands for completing partiat Prolog predicate names
+:ALT_TITLE: Top-level Completion
:END:
The =sweeprolog-top-level-mode=, enabled in the =sweep= top-level buffer,
:PROPERTIES:
:CUSTOM_ID: finding-prolog-code
:DESCRIPTION: Commands for locating and opening Prolog files
+:ALT_TITLE: Finding Prolog Code
:END:
#+FINDEX: sweeprolog-find-module
:PROPERTIES:
:CUSTOM_ID: file-spec-expansion
:DESCRIPTION: Integration with standard Emacs file-finding commands
+:ALT_TITLE: File Spec Expansion
:END:
=sweep= defines a handler for the Emacs function =expand-file-file= that
:PROPERTIES:
:CUSTOM_ID: goto-c-predicates
:DESCRIPTION: Finding and jumping to definitions of built-in SWI-Prolog predicates defined in C
+:ALT_TITLE: Native Predicates
:END:
#+CINDEX: native built-in predicates
:PROPERTIES:
:CUSTOM_ID: quick-command-access
:DESCRIPTION: Keymap for useful commands that can be invoked from any buffer
+:ALT_TITLE: Quick Access Keymap
:END:
#+VINDEX: sweeprolog-prefix-map
:PROPERTIES:
:CUSTOM_ID: prolog-messages
:DESCRIPTION: Messages emitted in the embedded Prolog runtime and how to display them
+:ALT_TITLE: Prolog Messages
:END:
#+CINDEX: messages
:PROPERTIES:
:CUSTOM_ID: prolog-flags
:DESCRIPTION: Commands for modifying the configuration of the embedded Prolog runtime by setting Prolog flags
+:ALT_TITLE: Prolog Flags
:END:
#+CINDEX: prolog flags
:PROPERTIES:
:CUSTOM_ID: prolog-packages
:DESCRIPTION: Commands for installing SWI-Prolog add-ons
+:ALT_TITLE: Prolog Packages
:END:
#+FINDEX: sweeprolog-pack-install
:PROPERTIES:
:CUSTOM_ID: contributing
:DESCRIPTION: Information for users and hackers looking to get involved in the development of this project
+:ALT_TITLE: Contributing
:END:
We highly appreciate all contributions, including bug reports,
:PROPERTIES:
:CUSTOM_ID: development-setup
:DESCRIPTION: Instructions for preparing a local development environment for working on sweep
+:ALT_TITLE: Developing Sweep
:END:
Since the Prolog and C parts of ~sweep~ are intended to be distributed
:PROPERTIES:
:CUSTOM_ID: submitting-patches
:DESCRIPTION: Commands for contacting the maintainers of this project
+:ALT_TITLE: Submitting Patches
:END:
The best way to get in touch with the ~sweep~ maintainers is via [[https://lists.sr.ht/~eshel/dev][the
:PROPERTIES:
:CUSTOM_ID: things-to-do
:DESCRIPTION: Breakdown of topics that deserve more attention
+:ALT_TITLE: Things To Do
:END:
While ~sweep~ is ready to be used for effective editing of Prolog code,
:PROPERTIES:
:CUSTOM_ID: todo-editing
:DESCRIPTION: List of potential enhancements for reading and writing Prolog
+:ALT_TITLE: Editing Improvements
:END:
- Inherit user customizations from ~prolog-mode~ :: ~sweep~ should inherit
:PROPERTIES:
:CUSTOM_ID: todo-running
:DESCRIPTION: List of potential enhancements for executing Prolog
+:ALT_TITLE: Running Improvements
:END:
- Persist top-level history across sessions :: ~sweep~ should persist
:PROPERTIES:
:CUSTOM_ID: todo-general
:DESCRIPTION: List of potentially useful new features
+:ALT_TITLE: General Improvements
:END:
- Facilitate interactive debugging :: ~sweep~ should facilitate
:PROPERTIES:
:CUSTOM_ID: indices
:DESCRIPTION:
+:ALT_TITLE: Indices
:END:
** Function index
:INDEX: fn
:CUSTOM_ID: findex
:DESCRIPTION:
+:ALT_TITLE: Function Index
:END:
** Variable index
:INDEX: vr
:CUSTOM_ID: vindex
:DESCRIPTION:
+:ALT_TITLE: Variable Index
:END:
** Keystroke index
:INDEX: ky
:CUSTOM_ID: kindex
:DESCRIPTION:
+:ALT_TITLE: Keystroke Index
:END:
** Concept index
:INDEX: cp
:CUSTOM_ID: cindex
:DESCRIPTION:
+:ALT_TITLE: Concept Index
:END:
#+html: -->