2
votes

I'd like to use the PceEmacs editor but whenever I use the command emacs., I'm met with the error code ERROR: Undefined procedure: emacs/0 (DWIM could not correct goal). The normal built in commands seem to work as normal so I don't know if I'm just using the emacs command wrong.

2
This might helpGuy Coder
I'm voting to close this question as off-topic because this is really a request for technical support with SWI-Prolog and would be better addressed to the SWI-Prolog mailing list. There is no code here for us to help you debug, so it isn't really on-topic for Stack Overflow.Daniel Lyons

2 Answers

1
votes

You have probably not installed everything. You need to tell us what operating system you are using, how you installed SWI-Prolog, and stuff like that.

For example, in an installation without PCE, you won't have PceEmacs. On a machine on which I purposefully don't have PCE, I see the exact same thing as you do:

$ swipl
Welcome to SWI-Prolog (threaded, 64 bits, version 8.1.8-43-gb0168ea4a-DIRTY)
SWI-Prolog comes with ABSOLUTELY NO WARRANTY. This is free software.
Please run ?- license. for legal details.

For online help and background, visit http://www.swi-prolog.org
For built-in help, use ?- help(Topic). or ?- apropos(Word).

?- emacs.
ERROR: Unknown procedure: emacs/0 (DWIM could not correct goal)

This is because I have, in my build script:

cmake -G Ninja -DSWIPL_PACKAGES_X=OFF ...
0
votes

I ran into this same problem and found that the issue was that I had not built SWI-Prolog with support for library(pce).

It turns out that I was missing a lot of libraries. You can check which ones you are missing by running check_installation. from swipl.

Unfortunately I know nothing about Mac OS but the solution that worked for me with Linux was to go through the lists (below) of packages required for a complete install and make sure each one is installed. After you know each one is installed go ahead and rebuild SWI-Prolog.

The list for Debian based distributions

The list for Fedora based distributions