From: Gunter K. <gu...@pe...> - 2019-06-12 06:25:37
|
In theory wxMaxima should do the following things: * If the directory the worksheet is in is known when maxima is started the environment variable MAXIMA_INITIAL_FOLDER is set accordingly. This should cause maxima.bat to changes maxima's working directory into the Right Folder => Problem solved * If this is the case once the name of the worksheet file is known wxMaxima sends the following command to maxima: :lisp-quiet (wx-cd <filename>) * The definition of wx-cd is as follows: (defun wx-cd (dir) (handler-case (progn (let ((dir (cond ((pathnamep dir) dir) ((stringp dir) (make-pathname :directory (pathname-directory dir) :host (pathname-host dir) :device (pathname-device dir))) (t (error "cd(dir): dir must be a string or pathname."))))) #+ allegro (excl:chdir dir) #+clisp (ext:cd dir) #+cmu (setf (ext:default-directory) dir) #+cormanlisp (ccl:set-current-directory dir) #+gcl (si::chdir dir) #+lispworks (hcl:change-directory dir) #+lucid (lcl:working-directory dir) #+sbcl (sb-posix:chdir dir) #+sbcl (setf *default-pathname-defaults* (sb-ext:native-pathname (format nil "~A~A" (sb-posix:getcwd) "/"))) #+ccl (ccl:cwd dir) #+ecl (si::chdir dir) ;;; Officially gcl supports (si:chdir dir), too. But the version ;;; shipped with debian and ubuntu (at least in Feb 2017) doesn't. #+gcl (xchdir dir) #+gcl (setf *default-pathname-defaults* dir) #-(or allegro clisp cmu cormanlisp gcl lispworks lucid sbcl ccl ecl) (format t "Info: wxMathml.cpp: Changing the working dir during a maxima session isn't implemented for this lisp.") (namestring dir) (wx-print-variables))) (error (c) (format t "Warning: Can set maxima's working directory but cannot change it during the maxima session :~%~&~%") (values 0 c)))) In theory that should set maxima's current working directory, too. Is the directory you save the worksheets in actually mapped to a drive one can change the current working directory to or are your file on a network share and therefore named something to the likes of \\myshare\path\filename.wxmx? Don't know enough of windows to know if there would be a way to handle that. Kind regards, Gunter. |