7.16 Examining Diagnostics

Sweep can diagnose problems in Prolog code and report them to the user by integrating with Flymake, a powerful interface for on-the-fly diagnostics built into Emacs.

User Option: sweeprolog-enable-flymake

Whether to enable Flymake support in Sweep Prolog mode buffers. Defaults to t.

C-c C-`

List diagnostics for the current buffer or project in a dedicated buffer (sweeprolog-show-diagnostics).

Flymake integration is enabled by default, to disable it customize the user option sweeprolog-enable-flymake to nil.

When this integration is enabled, several Flymake commands are available for listing and jumping between found errors. see Finding diagnostics, for a full description of these commands. Additionally, Sweep Prolog mode configures the standard command M-x next-error to operate on Flymake diagnostics. This allows for moving to the next (or previous) error location with the common M-g n (or M-g p) keybinding. See (emacs)Compilation Mode, for more information about these commands.

The command sweeprolog-show-diagnostics shows a list of Flymake diagnostics for the current buffer. It is bound by default to C-c C-` in Sweep Prolog mode buffers with Flymake integration enabled. When you call it with a prefix argument (C-u C-c C-`), it shows a list of diagnostics for all buffers in the current project.