0
votes

I am new to emacs and I was trying to install the Matlab mode for emacs following the instruction on this page: matlab script editing

Everything compiled fine, but I ran into this error:

Symbol's value as variable is void: letion

When I did "emacs --init-debug" it gave me the following:

Debugger entered--Lisp error: (void-variable letion)
eval-buffer(#<buffer  *load*> nil "/home/wjlee/.emacs" nil t)  ; Reading at buffer position 404
load-with-code-conversion("/home/wjlee/.emacs" "/home/wjlee/.emacs" t t)
load("~/.emacs" t t)
#[0 "\205\262

I googled around a bit and some people said it's related to using older versions of emacs (emacs23 or older), however, I have emacs24.3.1, so I am not sure why this is still the case. Does anyone know how to fix this, please?

1
What do you find when look around position 404 in /home/wjlee/.emacs? - Stefan
Just a guess here, but you'll probably find the word letion if you look at line 404 like Stefan's suggesting. - Malabarba
There's actually no line 404 in ~/.emacs, so I am wondering whether it's some component that's not set right while I compiled CEDET - boto

1 Answers

0
votes

I decided to go a clean install of emacs24.3.1 again, without recompiling cedet and the matlab-emacs components, and somehow it works now... It seems like (from what I found on the web) although the newest version of CEDET is not bundled with emacs24, those that are already in there is enough for me to do the matlab-emacs integration.

Since I am very new to using all these, I'll just post what I found here:

To do a clean install of emacs24:

sudo apt-get install python-software-properties

sudo add-apt-repository ppa:cassou/emacs

sudo apt-get update

sudo apt-get purge emacs-snapshot-common emacs-snapshot-bin-common emacs-snapshot emacs-snapshot-el emacs-snapshot-gtk emacs23 emacs23-bin-common emacs23-common emacs23-el emacs23-nox emacs23-lucid auctex emacs24 emacs24-bin-common emacs24-common emacs24-common-non-dfsg

sudo apt-get install emacs24 emacs24-el emacs24-common-non-dfsg

sudo rm /etc/apt/sources.list.d/cassou-emacs-precise.list

Download matlab.el:

cvs -d:pserver:[email protected]:/cvsroot/matlab-emacs login

cvs -z3 -d:pserver:[email protected]:/cvsroot/matlab-emacs co -P matlab-emacs

And modify ~/.emacs:

(add-to-list 'load-path "~/.emacs.d/matlab-emacs")
     (load-library "matlab-load")

I also found the following useful:

(custom-set-variables
 '(matlab-shell-command-switches '("-nodesktop -nosplash")))

And some short-cuts:

Some useful short cuts to begin with:

C-c C-r : run region in matlab

C-c C-s : save and run the file in matlab

C-c C-c E : insert a matching END statment

M-TAB : symbol/variable completion based on the script

M-s : brings up matlab-shell (in a different buffer if available)

M-p, M-n : in matlab-shell (or any emacs shell) cycle through past commands