This is very odd, but I've got latest greatest everything -- 26.1; org-mode 9.1.14 9.1.14-9-g131531-elpaplus; maxima-5.42.1 (installed from source) -- and have this in my .emacs:

(add-to-list 'load-path ".../Downloads/maxima-5.42.1/src/")
(setq org-babel-maxima-command ".../Downloads/maxima-5.42.1/src/maxima")
(autoload 'maxima-mode "maxima" "Maxima mode" t)
(autoload 'imaxima "imaxima" "Frontend for maxima with Image support" t)
(autoload 'maxima "maxima" "Maxima interaction" t)
(autoload 'imath-mode "imath" "Imath mode for math formula input" t)
(setq imaxima-use-maxima-mode-flag t)
(add-to-list 'auto-mode-alist '("\\.ma[cx]" . maxima-mode))

And this seems fine for working with the examples in this. However, when I just try to run Maxima by itself (M-x maxima-mode, imaxima, maxima), I get errors:

for maxima or maxima-mode:

Cannot open load file: No such file or directory, maxima-font-lock

for imaxima:

 Cannot open load file: No such file or directory, imaxima-autoconf-variables

I have imath.el, maxima.el, and imaxima.el from the Maxima distribution in ~/.emacs.d/maxima with

add-to-list 'load-path "~/.emacs.d/maxima/")

early in my .emacs. What am I missing here? Why does org-mode see Maxima and work, while a regular session doesn't?

  • I just eliminated the maxima-font-lock by putting a copy of maxima-font-lock.el in my .emacs.d/maxima. Still have the imaxima error. – 147pm Nov 18 at 20:39
  • I think you added the wrong directory to load-path. For an instance in my case the right directory for load-path is /usr/share/maxima/5.41.0/emacs while the maxima executable resides in /usr/bin/. Look for an emacs directory in the maxima program folder. If you install a program from source you usually also need to run make and make install on the source. – Tobias Nov 18 at 21:08
  • I've cleared up these problems, simply by moving all the .el files over to my .emacs.d, not just the three I mentioned. My issues are mainly coming from a) using a latest-greatest version, rather than the available packages (one version old), and b) trying to have a home version install rather than a system install. Everything works now. – 147pm Nov 19 at 1:42

This was a latest-greatest version, while the available package was one version old, and I tried to do a home install rather than a configure/make/make install system install. It all works now -- in org-mode as well as maxima-mode and imaxima. So this is my .emacs.d/maxima/ contents:

imath.el
imaxima-autoconf-variables.el
imaxima.el
imaxima.lisp
maxima.el
maxima-font-lock.el
setup-imaxima-imath.el

all from the maxima-5.42.1/interfaces/emacs/ directory. Here's my init:

(add-to-list 'load-path "/home/hercynian/.emacs.d/maxima/")
(push "/usr/local/share/emacs/site-lisp" load-path)
(setq org-babel-maxima-command "maxima")
(autoload 'maxima-mode "maxima" "Maxima mode" t)
(autoload 'imaxima "imaxima" "Frontend for maxima with Image support" t)
(autoload 'maxima "maxima" "Maxima interaction" t)
(autoload 'imath-mode "imath" "Imath mode for math formula input" t)
(setq imaxima-use-maxima-mode-flag t)
(add-to-list 'auto-mode-alist '("\\.ma[cx]" . maxima-mode))

The imaxima docs said to put in the (push ...) line. Not sure what it does. It would be nice to have imaxima which turns the "ascii math" output to Latex images work in org-mode.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.