undocumented maxima functions



Am Freitag, den 22.07.2011, 11:49 -0700 schrieb Edwin Woollett:
> The undocumented maxima func <directory>
> (line 249: suprv1.lisp) had the definition:
> ---------------
> (defun $directory (path)
>   (cons '(mlist) (mapcar 'namestring (directory ($filename_merge path)))))
> --------------------------------------
> The maxima function <filename_merge> has only documentation
>   for the two arg form:
> -------------------------------------------
>   filename_merge (path, filename) 
> Constructs a modified path from path and filename.
> If the final component of path is of the 
> form ###.something, the component is replaced with
> filename.something. Otherwise, the final
> component is simply replaced by filename. 
> 
> 
> The result is a Lisp pathname object. 
> --------------------------------------
> >From that help file info, it is not clear
> what the one arg form does, as used in
> the def. of $directory.

When called with one argument, the function filename_merge returns the
argument as a Lisp pathname. The argument should be a string e.g.

(%i1) :lisp (type-of ($filename_merge "*"))

PATHNAME

This is the content of my current working directory:

(%i1) directory("*");
(%o1) [/home/dieter/Maxima/maxima/.git/, 
/home/dieter/Maxima/maxima/.gitignore, /home/dieter/Maxima/maxima/.project, 
/home/dieter/Maxima/maxima/AUTHORS, /home/dieter/Maxima/maxima/COPYING, 
/home/dieter/Maxima/maxima/ChangeLog, /home/dieter/Maxima/maxima/INSTALL, 
/home/dieter/Maxima/maxima/LICENSES/, /home/dieter/Maxima/maxima/Makefile, 
/home/dieter/Maxima/maxima/NEWS, /home/dieter/Maxima/maxima/README, 
/home/dieter/Maxima/maxima/admin/, /home/dieter/Maxima/maxima/archive/, 
/home/dieter/Maxima/maxima/bootstrap, /home/dieter/Maxima/maxima/configure, 
/home/dieter/Maxima/maxima/demo/, /home/dieter/Maxima/maxima/doc/, 
/home/dieter/Maxima/maxima/install-sh, /home/dieter/Maxima/maxima/interfaces/, 
/home/dieter/Maxima/maxima/lisp-utils/, /home/dieter/Maxima/maxima/locale/, 
/home/dieter/Maxima/maxima/macosx/, /home/dieter/Maxima/maxima/maxima-local, 
/home/dieter/Maxima/maxima/missing, /home/dieter/Maxima/maxima/plotting/, 
/home/dieter/Maxima/maxima/share/, /home/dieter/Maxima/maxima/src/, 
/home/dieter/Maxima/maxima/tests/, /home/dieter/Maxima/maxima/xmaxima-local]

And this is the content of the subdirectory interfaces:

(%i2) directory("interfaces/*");
(%o2) [/home/dieter/Maxima/maxima/interfaces/.gitignore, 
/home/dieter/Maxima/maxima/interfaces/Makefile, 
/home/dieter/Maxima/maxima/interfaces/bin/, 
/home/dieter/Maxima/maxima/interfaces/emacs/, 
/home/dieter/Maxima/maxima/interfaces/lib/, 
/home/dieter/Maxima/maxima/interfaces/tex/, 
/home/dieter/Maxima/maxima/interfaces/xmaxima/]

Dieter Kaiser