From: Eric L. <Eri...@ma...> - 2012-07-17 18:12:59
|
Hi, I believe you need to add MATLAB's bin directory to your exec path. Thus, from the command line if you can type: matlab -nodesktop and have that work, then Emacs will also be able to find and run MATLAB if you start Emacs from the same shell you start MATLAB from. Also, make sure your command switches includes the -nodesktop option, otherwise you will get the MATLAB desktop, and not get MATLAB in Emacs. Good Luck Eric From: André Luiz Tietböhl Ramos [mailto:and...@gm...] Sent: Sunday, July 15, 2012 6:44 PM To: mat...@li... Subject: [Matlab-emacs-discuss] Setup installation problem with MATLAB 2009 in ubuntu 12.04 Hello, I'm trying to run this MATLAB configuration to no avail. It cannot start MATLAB from emacs despite having the menu setup correctly. The MATLAB/bin directory is in the path variable too. My .emacs is below. ;; MATLAB mode ;; Turn off Matlab desktop (setq matlab-shell-command-switches '("-nojvm")) ;; ;; Add local lisp folder to load-path (setq load-path (append load-path (list "~/elisp"))) ;; Add matlab location (add-to-list 'load-path "/opt/MATLAB_2009/bin") ;; Replace path below to be where your matlab.el file is. (add-to-list 'load-path "/usr/share/emacs/site-lisp/matlab-emacs") (add-to-list 'load-path "/usr/share/emacs/site-lisp/emacs-goodies-el") (autoload 'matlab-mode "matlab" "Enter MATLAB mode." t) (setq auto-mode-alist (cons '("\\.m\\'<file:///\\.m\'>" . matlab-mode) auto-mode-alist)) (autoload 'matlab-shell "matlab" "Interactive MATLAB mode." t) ;; User Level customizations (You need not use them all): (setq matlab-indent-function-body t) ; if you want function bodies indented (setq matlab-verify-on-save-flag nil) ; turn off auto-verify on save (defun my-matlab-mode-hook () (setq fill-column 76)) ; where auto-fill should wrap (add-hook 'matlab-mode-hook 'my-matlab-mode-hook) (defun my-matlab-shell-mode-hook () '()) (add-hook 'matlab-shell-mode-hook 'my-matlab-shell-mode-hook) Thanks for any help! Andre Luiz |