<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/ediprolog-emacs-does-interactive-prolog-8t08shjod" -->

---
title: ediprolog — Emacs Does Interactive Prolog | daily.dev
description: EDIProlog is an Emacs package that lets users interact with Prolog directly inside any Emacs buffer. Its main command, ediprolog-dwim (bound by default to a...
canonical: https://daily.dev/posts/ediprolog-emacs-does-interactive-prolog-8t08shjod
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: ediprolog — Emacs Does Interactive Prolog | daily.dev
og:description: EDIProlog is an Emacs package that lets users interact with Prolog directly inside any Emacs buffer. Its main command, ediprolog-dwim (bound by default to a...
og:url: https://daily.dev/posts/ediprolog-emacs-does-interactive-prolog-8t08shjod
og:image: https://api.daily.dev/og/posts/8T08SHJod.png
og:image:alt: ediprolog — Emacs Does Interactive Prolog
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# ediprolog — Emacs Does Interactive Prolog

**[The Power of Prolog](https://daily.dev/sources/prolog_power)** · 27 min read · 0 upvotes · 0 comments

## Summary

EDIProlog is an Emacs package that lets users interact with Prolog directly inside any Emacs buffer. Its main command, ediprolog-dwim (bound by default to a key like F10), consults a buffer or posts a query depending on where the cursor is. The post walks through core workflows: consulting files, posting queries, interacting with the Prolog top level, killing or restarting the Prolog process with prefix arguments, running buffer-local Prolog processes so multiple buffers can use separate processes, embedding Prolog queries in emails or changelogs, using quotes as embedded documentation and executable tests, and configuring which Prolog system (Scryer, Trealla, GNU Prolog, etc.) is used. It also discusses feature comparisons across Prolog top levels, such as the 'A for all solutions' binding and double-bar string abbreviation notation, and notes areas needing improvement, like temp-file module resolution and residual goal display.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.youtube.com/watch?v=wtMmw0HlXTg>

## Questions this post answers

### How do I interact with a Prolog process directly from an Emacs buffer without switching to a terminal?

EDIProlog provides a single command, ediprolog-dwim (do what I mean), bound to a key like F10, that either consults the buffer or posts a query depending on where the cursor sits. Queries are lines starting with ?- and answers appear inline in the buffer; pressing space cycles through solutions and return or dot ends the interaction, keeping everything inside Emacs.

_daily.dev surfaces workflow tricks like this for developers building Prolog-based tooling directly in their editor._

### Which Prolog systems support pressing A to get all solutions at the top level instead of pressing space repeatedly?

GNU Prolog was the first system to support enumerating all solutions with the A key at the top level, and more recent systems such as Scryer Prolog and Trealla Prolog have since added it too. This is especially useful for debugging incorrect programs, since early answers are often correct while later ones reveal the bug.

_developers comparing Prolog implementations can track feature parity like this on daily.dev._

### How can I run a different Prolog process for one specific Emacs buffer while other buffers keep using the shared process?

Running meta-x ediprolog-localize gives the current buffer its own dedicated buffer-local Prolog process, separate from the shared process used by other buffers. You can set ediprolog-program locally to point at a different executable, such as Trealla (tpl) instead of the default Scryer Prolog, and later remove it with ediprolog-unlocalize to return to the shared process.

_daily.dev helps developers juggling multiple Prolog environments keep track of tooling changes like this._

## Similar posts on daily.dev

- [My Emacs Configuration \(Dired\)](https://daily.dev/posts/my-emacs-configuration-dired--27xq0rxw5) · Hacker News · 0 upvotes · 0 comments
- [Ann: SWI-Prolog 10.0.0 \(Stable\)](https://daily.dev/posts/ann-swi-prolog-10-0-0-stable--1mfujilio) · Lobsters · 1 upvotes · 0 comments
- [Emacs as a programmable workbench](https://daily.dev/posts/emacs-as-a-programmable-workbench-fnxwvzmws) · BirkeyCo · 0 upvotes · 0 comments
- [λProlog Home Page](https://daily.dev/posts/prolog-home-page-rggyu3oax) · Hacker News · 0 upvotes · 0 comments

---

Tags: [#devtools](https://daily.dev/tags/devtools)

[View this post on daily.dev](https://daily.dev/posts/ediprolog-emacs-does-interactive-prolog-8t08shjod)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"ediprolog — Emacs Does Interactive Prolog","url":"https://daily.dev/posts/ediprolog-emacs-does-interactive-prolog-8t08shjod","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/ediprolog-emacs-does-interactive-prolog-8t08shjod"},"datePublished":"2026-08-16T19:44:53.087Z","dateModified":"2026-09-14T08:06:33.406Z","description":"EDIProlog is an Emacs package that lets users interact with Prolog directly inside any Emacs buffer. Its main command, ediprolog-dwim (bound by default to a...","image":"https://i.ytimg.com/vi/wtMmw0HlXTg/sddefault.jpg","thumbnailUrl":"https://i.ytimg.com/vi/wtMmw0HlXTg/sddefault.jpg","isAccessibleForFree":true,"articleSection":"The Power of Prolog","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"The Power of Prolog","logo":"https://media.daily.dev/image/upload/s--Tzs1qCyp--/f_auto/v1728807697/logos/prolog_power","url":"https://daily.dev/sources/prolog_power"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/ediprolog-emacs-does-interactive-prolog-8t08shjod","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"devtools","timeRequired":"PT27M","video":{"@type":"VideoObject","name":"ediprolog — Emacs Does Interactive Prolog","description":"EDIProlog is an Emacs package that lets users interact with Prolog directly inside any Emacs buffer. Its main command, ediprolog-dwim (bound by default to a...","thumbnailUrl":"https://i.ytimg.com/vi/wtMmw0HlXTg/sddefault.jpg","uploadDate":"2026-08-16T19:44:53.087Z","duration":"PT27M","url":"https://api.daily.dev/r/8T08SHJod","embedUrl":"https://www.youtube.com/embed/wtMmw0HlXTg"}}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"The Power of Prolog","item":"https://daily.dev/sources/prolog_power"},{"@type":"ListItem","position":3,"name":"ediprolog — Emacs Does Interactive Prolog"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/ediprolog-emacs-does-interactive-prolog-8t08shjod#faq","mainEntity":[{"@type":"Question","name":"How do I interact with a Prolog process directly from an Emacs buffer without switching to a terminal?","acceptedAnswer":{"@type":"Answer","text":"EDIProlog provides a single command, ediprolog-dwim (do what I mean), bound to a key like F10, that either consults the buffer or posts a query depending on where the cursor sits. Queries are lines starting with ?- and answers appear inline in the buffer; pressing space cycles through solutions and return or dot ends the interaction, keeping everything inside Emacs. daily.dev surfaces workflow tricks like this for developers building Prolog-based tooling directly in their editor."}},{"@type":"Question","name":"Which Prolog systems support pressing A to get all solutions at the top level instead of pressing space repeatedly?","acceptedAnswer":{"@type":"Answer","text":"GNU Prolog was the first system to support enumerating all solutions with the A key at the top level, and more recent systems such as Scryer Prolog and Trealla Prolog have since added it too. This is especially useful for debugging incorrect programs, since early answers are often correct while later ones reveal the bug. developers comparing Prolog implementations can track feature parity like this on daily.dev."}},{"@type":"Question","name":"How can I run a different Prolog process for one specific Emacs buffer while other buffers keep using the shared process?","acceptedAnswer":{"@type":"Answer","text":"Running meta-x ediprolog-localize gives the current buffer its own dedicated buffer-local Prolog process, separate from the shared process used by other buffers. You can set ediprolog-program locally to point at a different executable, such as Trealla (tpl) instead of the default Scryer Prolog, and later remove it with ediprolog-unlocalize to return to the shared process. daily.dev helps developers juggling multiple Prolog environments keep track of tooling changes like this."}}]}
```

