I am currently trying to install the SICSTus Emacs Interface on Ubuntu to use Emacs to program in Prolog, but it seems that I am too stupid to do so.
On
https://sicstus.sics.se/sicstus/docs/4.3.5/html/relnotes/Emacs-Installation.html#Emacs-Installation it says I just need to load the file sicstus_emacs-init.el
.
I am totally new to Emacs. I suppose "load the file" means I should open it with Emacs. But how am I able to execute the code to configure the Interface?

- 75,699
- 9
- 109
- 225

- 21
- 1
1 Answers
For reference, the documentation says this:
The easiest way to configure the Emacs interface is to load the file
sicstus_emacs_init.el from your .emacs file. It will find the SICStus
executable and do all initialization needed to use the SICStus Emacs
interface.
It means that you should put (load "sicstus_emacs_init")
in your init file (which might be ~/.emacs
or ~/.emacs.d/init.el
).
Of course, Emacs still need to know where this file is. Emacs will look in every directory in the variable load-path
for this file, so you might want to first add the SICSTus installation directory to that list. The documentation says:
The default installation location for the Emacs files is
<prefix>/lib/sicstus-4.3.5/emacs/ on UNIX platforms and
C:\Program Files\SICStus Prolog VC14 4.3.5\emacs\ under Windows.
Thus you would add something like this to your init file, making sure to adjust it for the location where you have actually installed the software:
(add-to-list 'load-path "<prefix>/lib/sicstus-4.3.5/emacs")
You might want to read chapter 27.8 Libraries of Lisp Code for Emacs of the Emacs manual for more information about how to load libraries. The manual can also be read inside of Emacs by typing C-h i
, and choosing it from the list. You mentioned Ubuntu though, so be aware that Debian and Ubuntu and some related distributions don’t install the manual unless you install a separate package, which is stupid.

- 15,741
- 1
- 19
- 23
-
+1 for linking to the doc. You might want to mention `load-library` (perhaps in preference to `load`). And even perhaps `require`. – Drew Nov 02 '21 at 01:02
-
Perhaps, though I myself have never actually used `load-library`. Also, I think if the setup included any packages then it would mention them. Possibly it `require`s them itself. – db48x Nov 02 '21 at 10:13
-
1Thanks for the help and your effort! Everything is working as it should. Maybe i just should have started with reading the Emacs manual to understand what i want to do. – Sven Madson Nov 02 '21 at 10:37