Hi Here is the scenario.
- I open a matlab file in dir1, - start the matlab shell, - open a matlab file in dir2, now I cannot run matlab directly but have to change the shell: In xemacs the following code worked (defun matlab-cd-dir-actual () (interactive) (setq saved-default-directory default-directory) (matlab-shell-run-command (concat "cd " (file-name-directory (buffer-file-name)))) (message (concat "*MATLAB* (& lisp) dir: " (default-directory))) (setq command-line-default-directory (file-name-directory (buffer-file-name))) (cd (file-name-directory (buffer-file-name))) (setq default-directory saved-default-directory) (message (concat "Xemacs dir should be: " (default-directory)))) But in GNU emacs it does not, because of default-directory which is a function in xemacs but not in GNU emacs and I don't want to import all the code from the Xemacs dired version to GNU emacs. Anybody has a better solution, that actually works in GNU emacs Regards Uwe Brauer ------------------------------------------------------------------------------ Site24x7 APM Insight: Get Deep Visibility into Application Performance APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month Monitor end-to-end web transactions and take corrective actions now Troubleshoot faster and improve end-user experience. Signup Now! http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140 _______________________________________________ Matlab-emacs-discuss mailing list Matlab-emacs-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matlab-emacs-discuss