{"id":13862680,"url":"https://github.com/triska/ediprolog","last_synced_at":"2025-07-25T14:15:40.696Z","repository":{"id":20684461,"uuid":"23967603","full_name":"triska/ediprolog","owner":"triska","description":"Emacs Does Interactive Prolog","archived":false,"fork":false,"pushed_at":"2022-10-01T16:55:03.000Z","size":125,"stargazers_count":37,"open_issues_count":11,"forks_count":8,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-03-20T03:10:32.225Z","etag":null,"topics":["emacs","emacs-lisp","prolog","prolog-process"],"latest_commit_sha":null,"homepage":"https://www.metalevel.at/ediprolog/","language":"Emacs Lisp","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/triska.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-09-12T16:13:25.000Z","updated_at":"2022-12-15T22:51:48.000Z","dependencies_parsed_at":"2023-01-11T20:56:20.449Z","dependency_job_id":null,"html_url":"https://github.com/triska/ediprolog","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/triska%2Fediprolog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/triska%2Fediprolog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/triska%2Fediprolog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/triska%2Fediprolog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/triska","download_url":"https://codeload.github.com/triska/ediprolog/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248501873,"owners_count":21114683,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["emacs","emacs-lisp","prolog","prolog-process"],"created_at":"2024-08-05T06:01:49.953Z","updated_at":"2025-04-12T01:02:22.705Z","avatar_url":"https://github.com/triska.png","language":"Emacs Lisp","funding_links":[],"categories":["Emacs Lisp","Text Editor Extensions"],"sub_categories":[],"readme":"# Introduction\n\n*ediprolog* lets you interact with Prolog in all Emacs buffers.\nYou can consult Prolog programs and evaluate embedded queries.\n\n**Project page**:\n\n[**https://www.metalevel.at/ediprolog/**](https://www.metalevel.at/ediprolog/)\n\n**Video**:\n\n[https://www.metalevel.at/prolog/videos/ediprolog](https://www.metalevel.at/prolog/videos/ediprolog)\n\nSee also [PceProlog](https://www.metalevel.at/pceprolog/).\n\n# Installation\n\nCopy [ediprolog.el](ediprolog.el) to your `load-path` and add the\nfollowing\u0026nbsp;form to your `.emacs`, then evaluate the form or\nrestart\u0026nbsp;Emacs:\n\n    (require 'ediprolog)\n\nAfter you have installed ediprolog, you can customize it with:\n\n    M-x customize-group RET ediprolog RET\n\nThe two most important configuration options are:\n\n   - `ediprolog-system`, either `scryer` (default) or `swi`\n   - `ediprolog-program`, the path of the Prolog executable.\n\n# Usage\n\nThe central function is `ediprolog-dwim` (Do What I Mean). I recommend\nto bind it to the function\u0026nbsp;key\u0026nbsp;F10 by adding the following\nform to your\u0026nbsp;`.emacs` and evaluating it:\n\n    (global-set-key [f10] 'ediprolog-dwim)\n\nIn the following, I assume that you have also done this.\n\nDepending on the content at point, `ediprolog-dwim` does the\n\"appropriate\" thing: If point is on a *query*, it sends the query to a\nProlog process, and you interact with the process in the current\nbuffer as on a terminal. Queries start with \"?-\" or \":-\", possibly\npreceded by \"%\" and whitespace. An example of a query is:\n\n    %?- member(X, \"abc\").\n\nIf you press F10 when point is on that query, you get:\n\n    %?- member(X, \"abc\").\n    %@    X = a\n    %@ ;  X = b\n    %@ ;  X = c\n    %@ ;  false.\n\nWhen waiting for output of the Prolog process, you can press C-g to\nunblock Emacs and continue with other work. To resume interaction\nwith the Prolog process, use **M-x\u0026nbsp;ediprolog-toplevel\u0026nbsp;RET**.\n\nIf you press F10 when point is *not* on a query, the buffer content is\nconsulted in the Prolog process, and point is moved to the first error\n(if any). You do\u0026nbsp;*not* need to *save* the file beforehand, since\nthe *buffer\u0026nbsp;content* (not the file) is consulted.\n\nFor convenience, the most recent interactions with the Prolog\nprocess are logged in the buffer `*ediprolog-history*`.\n\nUse **M-x ediprolog-localize RET** to make any Prolog process started\nin the current buffer buffer-local. This way, you can run distinct\nprocesses simultaneously. Revert with\n**M-x\u0026nbsp;ediprolog-unlocalize\u0026nbsp;RET**.\n\n`ediprolog-dwim` with prefix arguments has special meanings:\n\n| Key Sequence |   Meaning                                                |\n|--------------|----------------------------------------------------------|\n|  C-0 F10     |   kill Prolog process                                    |\n|  C-1 F10     |   always consult buffer (even when point is on a query)  |\n|  C-2 F10     |   always consult buffer, using a new process             |\n|  C-7 F10     |   equivalent to `ediprolog-toplevel'                     |\n|  C-u F10     |   first consult buffer, then evaluate query (if any)     |\n|  C-u C-u F10 |   like C-u F10, with a new process                       |\n\nTested with Scryer Prolog 0.8.119 and SWI-Prolog 8.1.24, using Emacs\nversions 26.1 and\u0026nbsp;27.0.50.\n\n# Screenshot\n\nHere is a sample interaction, using\n[CLP(ℤ)\u0026nbsp;constraints](https://www.metalevel.at/prolog/clpz) to\nrelate a number to its factorial:\n\n![Factorial](factorial.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftriska%2Fediprolog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftriska%2Fediprolog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftriska%2Fediprolog/lists"}