|
From: Uwe B. <ou...@ma...> - 2016-01-23 18:41:40
|
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
|