And here is a small primer (from the Ciao manual):
An introduction to the Ciao emacs environment (Un*x)
==================================================== >
While it is easy to use Ciao with any editor of your choice, using it within the `emacs' editor/program development system is highly recommended: Ciao includes an `emacs' _mode_ which provides a very complete _application development environment_ which greatly simplifies many program development tasks. See *Note Using Ciao inside GNU emacs:: for details on the capabilities of `ciao'/ `emacs' combination.
If the (freely available) `emacs' editor/environment is not installed in your system, we highly recommend that you also install it at this point (there are instructions for where to find `emacs' and how to install it in the Ciao installation instructions). After having done this you can try for example the following things:
A few basic things:
Typing <^H> <i> (or in the menus `Help->Manuals->Browse Manuals with Info') should open a list of manuals in info format in which the Ciao manual(s) should appear.
When opening a Prolog file, i.e., a file with `.pl' or `.pls' ending, using <^X><^F>`filename' (or using the menus) the code should appear highlighted according to syntax (e.g., comments in red), and `Ciao/Prolog' menus should appear in the menu bar on top of the `emacs' window.
Loading the file using the `Ciao/Prolog' menu (or typing
<^C> <l>) should start in another emacs buffer the Ciao toplevel shelland load the file. You should now be able to switch the the toplevel shell (with the mouse or typing <^X> <o>) and make queries from within `emacs'.
*Note:* when using `emacs' it is _very convenient_ to swap the locations of the (normally not very useful) <Caps Lock> key and the (very useful in `emacs') <Ctrl> key on the keyboard. How to do this is explained in the `emacs' frequently asked questions FAQs (see the `emacs' download instructions for their location).
(if these things do not work the system or emacs may not be installed properly).
You can go to the location of most of the errors that may be reported during compilation by typing <^C> <`>.
You can also, e.g., create executables from the `Ciao/Prolog' menu, as well as compile individual files, or generate active modules.
Loading a file for source-level debugging using the `Ciao/Prolog' menu (or typing <^C> <d>) and then issuing a query should start the source-level debugger and move a marker on the code in a window while execution is stepped through in the window running the Ciao top level.
You can add the lines needed in Un*x for turning any file defining `main/1' into a script from the Ciao/Prolog menu or by typing <^C> <I> <S>.
You can also work with the preprocessor and auto-documenter directly from emacs: see their manuals or browse through the corresponding menus that appear when editing `.pl' files.
We encourage you once more to read *Note Using Ciao inside GNU emacs:: to discover the many other functionalities of this environment.