Is there any way to set up org babel so it works with prolog the same way it works with other languages?
I tried swipl and gprolog with ob-prolog package but unfortunately it does not work, I cannot get the output of the commands I run.
https://github.com/ljos/ob-prolog
Here is my configuration:
(use-package ob-prolog :ensure t)
;; prolog compatibility
(add-to-list 'load-path "~/.emacs.d/elpa/ob-prolog-20190410.2130")
(setq org-babel-prolog-command "swipl")
(org-babel-do-load-languages 'org-babel-load-languages
'((gnuplot . t)
(latex . t)
(python . t)
(prolog . t)
(shell . t)
(dot . t)))
Thank you very much.
EDIT: Found out the solution.
Apparently you need to set the :session argument.
#+begin_src prolog :results output :session prolog-demo
father(john, bob).
father(bob, alice).
grandfather(X, Y) :- father(X, Z), father(Z, Y).
#+end_src
#+RESULTS:
: |: |: |:
: true.