swi-prologxpce

Launching PceEmacs through SWI-Prolog command line


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.


Solution

  • 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 ...