[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] scratch/ediprolog 1c8b127701 02/31: initial revision
From: |
Stefan Monnier |
Subject: |
[elpa] scratch/ediprolog 1c8b127701 02/31: initial revision |
Date: |
Sun, 2 Oct 2022 17:01:36 -0400 (EDT) |
branch: scratch/ediprolog
commit 1c8b12770100860618a9b70e8cb1ff7becee7393
Author: Markus Triska <markus.triska@gmx.at>
Commit: Markus Triska <markus.triska@gmx.at>
initial revision
---
README | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 62 insertions(+)
diff --git a/README b/README
new file mode 100644
index 0000000000..4ee9da7ad7
--- /dev/null
+++ b/README
@@ -0,0 +1,62 @@
+This lets you interact with SWI-Prolog in all Emacs buffers.
+You can consult Prolog programs and evaluate embedded queries.
+
+Installation
+============
+
+Copy ediprolog.el to your load-path and add to your .emacs:
+
+ (require 'ediprolog)
+ (global-set-key [f10] 'ediprolog-dwim)
+
+Restart Emacs and customize ediprolog with
+
+ M-x customize-group RET ediprolog RET
+
+
+Usage
+=====
+
+The central function is `ediprolog-dwim' (Do What I Mean), which is
+bound to F10 by the snippet above. Depending on the content at
+point, `ediprolog-dwim' does the "appropriate" thing: If point is
+on a query, F10 sends the query to a Prolog process, and you
+interact with the process in the current buffer as on a terminal.
+Queries start with "?-" or ":-", possibly preceded by "%" and
+whitespace. An example of a query is (without leading ";;"):
+
+ %?- 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.
+
+When waiting for output of the Prolog process, you can press C-g to
+unblock Emacs and continue with other work. To resume interaction
+with the Prolog process, use M-x ediprolog-toplevel RET.
+
+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).
+
+For convenience, the most recent interactions with the Prolog
+process are logged in the buffer "*ediprolog-history*".
+
+Use M-x ediprolog-localize RET to make any Prolog process started
+in the current buffer buffer-local. This way, you can run distinct
+processes simultaneously. Revert with M-x ediprolog-unlocalize RET.
+
+`ediprolog-dwim' with prefix arguments has special meanings:
+
+ C-0 F10 kill Prolog process
+ C-1 F10 always consult buffer (even when 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 consult buffer, then evaluate query (if any)
+ C-u C-u F10 like C-u F10, with a new process
+
+Tested with SWI-Prolog 5.6.55 + Emacs 21.2, 22.3, 23.1 and 24.3
- [elpa] scratch/ediprolog 4da46823c9 06/31: use markdown elements for formatting, (continued)
- [elpa] scratch/ediprolog 4da46823c9 06/31: use markdown elements for formatting, Stefan Monnier, 2022/10/02
- [elpa] scratch/ediprolog 4fabe53646 11/31: ENHANCED: Atomic undo of the whole interaction., Stefan Monnier, 2022/10/02
- [elpa] scratch/ediprolog 70bf2c095a 14/31: mention project page earlier, Stefan Monnier, 2022/10/02
- [elpa] scratch/ediprolog 7af081ba84 31/31: Merge remote-tracking branch 'upstream/ediprolog/main' into externals/ediprolog, Stefan Monnier, 2022/10/02
- [elpa] scratch/ediprolog 49679a0c44 28/31: use library(clpz) and Scryer Prolog interaction in screenshot, Stefan Monnier, 2022/10/02
- [elpa] scratch/ediprolog 62ce0025b8 27/31: use compact string notation in sample queries, Stefan Monnier, 2022/10/02
- [elpa] scratch/ediprolog 29a8c4a796 03/31: wording for README, Stefan Monnier, 2022/10/02
- [elpa] scratch/ediprolog 277d0f9e72 05/31: add screenshot, Stefan Monnier, 2022/10/02
- [elpa] scratch/ediprolog ade75de9ae 07/31: table formatting, Stefan Monnier, 2022/10/02
- [elpa] scratch/ediprolog 51a610ebc2 08/31: formatting and layout of Emacs commands, Stefan Monnier, 2022/10/02
- [elpa] scratch/ediprolog 1c8b127701 02/31: initial revision,
Stefan Monnier <=
- [elpa] scratch/ediprolog f1b2480f46 12/31: preparing version 1.2, Stefan Monnier, 2022/10/02
- [elpa] scratch/ediprolog 2b348c3161 15/31: describe screenshot, Stefan Monnier, 2022/10/02
- [elpa] scratch/ediprolog 9c4c80ad4a 21/31: improve compatibility with older Emacs versions, Stefan Monnier, 2022/10/02
- [elpa] scratch/ediprolog e75c0ddfc4 30/31: Merge Jun 8 2020 commit '751119cfee9' into externals/ediprolog, Stefan Monnier, 2022/10/02
- [elpa] scratch/ediprolog 751119cfee 22/31: update Scryer Prolog answer, Stefan Monnier, 2022/10/02
- [elpa] scratch/ediprolog 8ba8786386 18/31: clarify installation, Stefan Monnier, 2022/10/02
- [elpa] scratch/ediprolog 5fd08fe19a 23/31: improve compatibility with older Emacs versions, Stefan Monnier, 2022/10/02
- [elpa] scratch/ediprolog ebd79c0abd 26/31: enable faithful processing of multiline queries for Scryer Prolog, Stefan Monnier, 2022/10/02
- [elpa] scratch/ediprolog 6f94bf2368 19/31: add link to video, Stefan Monnier, 2022/10/02
- [elpa] scratch/ediprolog 8b554e63aa 24/31: document Scryer Prolog default setting, Stefan Monnier, 2022/10/02