I have added my work directory (Windows XP, maxima 5.12.0) to the
file_search_maxima list in my startup file (maxima-init.mac) and then
created a maxima code file with a text editor, following Richard Rand's
programming example in "Introduction to Maxima".
When I attempt to use batch(); maxima can't find the file if I only include
the filename, nor can file_search( filename).
Moreover, file_search(filename, path) returns "false".
Finally I get proper loading with batch if I include the full path of the
file.
So, what is the point of telling maxima about where extra to search for
files?
The contents of my startup file, c:\Documents and Settings\Edwin
Woollett\maxima\maxima-init.mac are:
----------------------------
maxima_userdir : "c:/work2"$
maxima_tempdir : "c:/work1/temp"$
file_search_maxima :
append(["c:/work2","c:/work1/temp"],file_search_maxima )$
disp (" maxima_userdir is ",maxima_userdir )$
-----------------------------
The attempt to get maxima to use this information then proceeds as follows:
Maxima 5.12.0 http://maxima.sourceforge.net
Using Lisp GNU Common Lisp (GCL) GCL 2.6.8 (aka GCL)
etc
provides bug reporting information.
maxima_userdir is
c:/work2
(%i1) file_search_maxima;
(%o1) [c:/work2, c:/work1/temp,
C:/Documents and Settings/Edwin Woollett/maxima/###.{mac,mc},
C:\PROGRA~1\MAXIMA~1.0/share/maxima/5.12.0/share/###.{mac,mc},
C:\PROGRA~1\MAX\
IMA~1.0/share/maxima/5.12.0/share/{affine,algebra,algebra/charsets,algebra/sol\
ver,calculus,combinatorics,contrib,contrib/boolsimp,contrib/descriptive,contri\
b/diffequations,contrib/diffequations/tests,contrib/distrib,contrib/ezunits,co\
ntrib/format,contrib/fractals,contrib/gentran,contrib/gentran/test,contrib/Gro\
bner,contrib/levin,contrib/lurkmathml,contrib/maximaMathML,contrib/mcclim,cont\
rib/numericalio,contrib/pdiff,contrib/prim,contrib/rand,contrib/sarag,contrib/\
simplex,contrib/simplex/Tests,contrib/solve_rec,contrib/state,contrib/stats,co\
ntrib/stringproc,contrib/unit,contrib/Zeilberger,diff_form,diffequations,dynam\
ics,draw,lapack,lbfgs,linearalgebra,integequations,integration,macro,matrix,mi\
sc,numeric,orthopoly,physics,simplification,sym,tensor,tensor/tests,trigonomet\
ry,utils,vector}/###.{mac,mc}]
(%i2) batch ( "critpts.max" );
Could not find `critpts.max' using paths in file_search_maxima.
-- an error. To debug this try debugmode(true);
(%i3) file_search("critpts.max" );
(%o3) false
(%i4) file_search("critpts.max",["c:/work2"] );
(%o4) false
(%i5) batch("c:/work2/critpts.max" ) ;
batching #pc:/work2/critpts.max
(%i6) critpts() := (print("program to find critical points "),
f : read("enter f(x,y) "), print(" f = ", f), eqs : [diff(f, x), diff(f,
y)],
unk : [x, y], solve(eqs, unk))
critpts();
program to find critical points
enter f(x,y)
x*y+a/x + a/y ;
a a
f = x y + - + -
y x
1/3
1/3
2 a (sqrt(3) %i - 1) a
(%o7) [[x = - --------------, y = ---------------------],
sqrt(3) %i + 1 2
1/3 1/3
2 a (sqrt(3) %i + 1) a
1/3 1/3
[x = --------------, y = - ---------------------], [x = a , y =
]]
sqrt(3) %i - 1 2
(%i8)