In the Mac OS version of Maxima Maxima.App/Contents/Resources.maxima.sh in principle could be run from a text shell.
In Emacs org mode, maxima is supported, but it expects a command maxima in the path.
Creating a symlink named maxima in /usr/local/bin does not work because maxima.sh uses dirname $0 to set some paths,
and being call though a symlink returns the path of the location where the symlink lives.
Attached is a modified maxima.sh which allows symlinks ti the script which then will work.
Perhaps something like this can be included in the next release.
I am not really a shell script hacker, so I assume there is room for improvement in the script.
new shell script
You can also put this line into your .emacs file:
(setq-default maxima-command "<path to maxima.sh>")
I fear this will not work. It works for maxima mode in emacse, but it does not work for org-babel mode for maxima. org-babel mode creates the following command line:
(cmd (format "maxima --very-quiet -r 'batchload(%S)$' %s"
in-file cmdline)))
It does not use maxima-command from maxima mode!
I know this is not very good style.
But having a wring maxima command on the path would be helpful anyhow.
Can you check if this works for you:
------------------------- maxima.sh ------------------------
#!/bin/bash
SCRIPT="${BASH_SOURCE[0]}"
while [ -L "$SCRIPT" ] ; do SCRIPT=`(readlink "$SCRIPT")` ; done
ROOT=`(cd \`dirname "$SCRIPT"\` > /dev/null 2>&1 ; pwd)`
MAXIMA_PREFIX=$ROOT/maxima/
export MAXIMA_PREFIX
PATH="$MAXIMA_PREFIX/bin:$PATH"
export PATH
exec "$MAXIMA_PREFIX/bin/maxima" "$1" "$2" "$3" "$3" "$4" "$5" "$6" "$7" "$8" "$9"
------------------------- maxima.sh ------------------------
The script works on my machine.
Thank you.
The changes are now in git.