emacsswi-prologxpce

Turn off XPCE in SWI-Prolog


I'd like to get the output of apropos/1 and help/1 etc. inside my Emacs buffer, instead of an XPCE window. I'm using SWI-Prolog under Linux.

What I have tried:

And yes, I could just uninstall the swi-prolog-x package, but I may want to write GUI programs in the future. Ideally I would like to turn off the GUI only for the documentation / debugging.

EDIT:

I've found out part of the solution: the goals online_help:give_help/1 and online_help:give_apropos seem to be what I need. I just need to re-hook these onto help and apropos, maybe via prolog:help_hook/1. Any ideas?


Solution

  • [~]# unset DISPLAY
    
    swipl --nopce 
    

    This a an undocumented flag... Normally it is only used when building the system/