RE : chdir equivalent?



Maxima have a function "system"
Searching for it in source code I found it in "macsys.lisp"

(defun $system (&rest args)
  #+gcl   (lisp:system (apply '$sconcat args))
  #+clisp (ext:run-shell-command (apply '$sconcat args))
  #+(or cmu scl) (ext:run-program "/bin/sh"
				  (list "-c" (apply '$sconcat args)) :output t)
  #+allegro (excl:run-shell-command (apply '$sconcat args) :wait t)
  #+sbcl  (sb-ext:run-program "/bin/sh"
			      (list "-c" (apply '$sconcat args)) :output t)
  #+openmcl (ccl::run-program "/bin/sh"
			      (list "-c" (apply '$sconcat args)) :output t)
  )

Note: Windows understand both "\" and "/" and UNIX only "/" then maybe it is more appropriate
to use "/".

Laurent.

> -----Message d'origine-----
> De?: maxima-bounces at math.utexas.edu [mailto:maxima-bounces at math.utexas.edu] De la part de
> Daniel Lakeland
> Envoy??: lundi 1 octobre 2007 23:12
> ??: Maxima Mailing List
> Objet?: [Maxima] chdir equivalent?
> 
> When I start maxima on windows (from within emacs) it doesn't like
> paths of the form \\servername\path\to\file so it starts with
> C:\windows as the working directory (as follows):
> 
> '\\servername\my\path\here'
> CMD.EXE was started with the above path as the current directory.
> UNC paths are not supported.  Defaulting to Windows directory.
> 
> Once it's started, how can I change this manually? I can't find a
> chdir or cd command in the manual.
> 
> I believe that Lisp doesn't have a portable notion of a current
> directory, instead there is the concept of a pathname, so I'm not even
> sure what to do to change the working directory from lisp.
> 
> In any case, the main issue is that I want to have the draw2d output
> go to a more reasonable current directory rather than c:\windows.
> 
> 
> 
> --
> Daniel Lakeland
> dlakelan at street-artists.org
> http://www.street-artists.org/~dlakelan
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima