maxima-local problems



James Amundson <amundson@fnal.gov> writes:

> Do you think it would be best to add -norc by default. I see the sense
> in adding a general "--extra-lisp-arguments" option to maxima. The
> maxima command-line handling will get overhauled between 5.9.0 and
> 5.9.1. I'll add this and the "quiet" option then.
> 
> Incidently, these are problems with the maxima script itself. The
> *-local scripts exist only so that developers may test the applications
> without first installing them.
 
May I suggest to anticipate the `--extra-lisp-arguments' part of the
overhaul?  On reason why this would be a good thing is Clisp's `-I'
flag which should be added when Clisp is started from within emacs.
(Officially, this flag is meant to be used with ILISP but it is useful
for the standard inferior-lisp mode as well since it somehow prevents
`lisp-eval-last-sexp' from hanging, which otherwise seems to happen
for sufficiently long forms).

A (non-cumulative) option `--extra-args' could be added like this.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cut ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Index: maxima.in
===================================================================
RCS file: /cvsroot/maxima/maxima/src/maxima.in,v
retrieving revision 1.10
diff -u -r1.10 maxima.in
--- maxima.in	24 Sep 2002 16:56:14 -0000	1.10
+++ maxima.in	24 Oct 2002 02:35:30 -0000
@@ -17,6 +17,7 @@
     -r <string>, --run-string=<string>: Process <string> in maxima interactive
                                         mode.
     -p <lisp_file>, --preload-lisp=<lisp_file>: Preload <lisp_file>
+    --extra-args=<string>: Pass <string> to the lisp command line.
     -v, --verbose: Print extra information from the maxima wrapper script.
     --version: Print the (default) installed version.
 EOF
@@ -81,6 +82,7 @@
   run_string=
   preload_lisp_file=
   list_avail=
+  extra_args='--extra-args='
   show_version=
   while getopts "hl:u:b:r:p:v-:" opt; do
     if [ "$opt" = "-" ]; then
@@ -143,6 +145,9 @@
 			  preload_lisp_file=`echo "$OPTARG" | sed 's/preload-lisp=//'`
 			fi
 			;;
+      extra-args=*)
+			extra_args="--$OPTARG"
+			;;
       v | verbose)
 	       verbose=true
 	       ;;
@@ -232,12 +237,12 @@
 export MAXIMA_INT_INPUT_STRING
 export MAXIMA_INT_BATCH_FLAG
 
-command="$MAXIMA_VERPKGLIBEXECDIR/maxima-run-lisp -run $MAXIMA_VERPKGLIBDIR/binary-$LISPTYPE/maxima"
+set "$MAXIMA_VERPKGLIBEXECDIR/maxima-run-lisp" "$extra_args" -run "$MAXIMA_VERPKGLIBDIR/binary-$LISPTYPE/maxima"
 
 if [ "$verbose" = "true" ]; then
   echo "MAXIMA_INT_LISP_PRELOAD=$MAXIMA_INT_LISP_PRELOAD"
   echo "MAXIMA_INT_INPUT_STRING=$MAXIMA_INT_INPUT_STRING"
   echo "MAXIMA_INT_BATCH_FLAG=$MAXIMA_INT_BATCH_FLAG"
-  echo "command=$command"
+  echo "command=$@"
 fi
-exec $command
+exec "$@"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cut ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Wolfgang
-- 
wjenkner@inode.at