From: Alan <ora...@gm...> - 2011-03-23 20:13:26
|
I just tried your Revision 1.30, and it works with no errors on doing 'emacs blah.m', or loading a .m file with an already open emacs. Thanks for the fix! You're right that the error I got with Rev 1.29 was different from before. With Revision 1.29, I got: "File mode specification error: (void-variable mlfile)" Whereas with Revisions <= 1.28, but >= 1.14, I got: "File mode specification error: (wrong-type-argument stringp nil)" Debug output for this is: Debugger entered--Lisp error: (wrong-type-argument stringp nil) file-name-directory(nil) (expand-file-name "toolbox/emacsinit.m" (file-name-directory (locate-library "matlab"))) (let ((dir ...)) (file-exists-p dir)) (defvar matlab-shell-use-emacs-toolbox (let (...) (file-exists-p dir)) "Add the `matlab-shell' MATLAB toolbox to the MATLAB path on startup.") eval-buffer(#<buffer *load*> nil "/home/alan/matlab.el" nil t) ; Reading at buffer position 152834 load-with-code-conversion("/home/alan/matlab.el" "/home/alan/matlab.el" nil t) matlab-mode() set-auto-mode-0(matlab-mode nil) set-auto-mode() normal-mode(t) after-find-file(t t) find-file-noselect-1(#<buffer blah.m> "~/blah.m" nil nil "~/blah.m" nil) find-file-noselect("~/blah.m" nil nil t) find-file("~/blah.m" t) call-interactively(find-file nil nil) But both these errors have gone away with Rev 1.30. On Wed, Mar 23, 2011 at 3:30 PM, Eric Ludlam <Eri...@ma...> wrote: > I was able to reproduce this explicitly when I executed the code by hand, but for some reason it didn't show up when I loaded in matlab files which is how that got checked in today. I fixed it and checked it in. > > I don't know if that fixed your original issue since the error is different, and you didn't have that patch when you had the stringp issue. > > Eric > > -----Original Message----- > From: Alan [mailto:ora...@gm...] > Sent: Wednesday, March 23, 2011 2:56 PM > To: mat...@li... > Subject: Re: [Matlab-emacs-discuss] File mode specification error: (wrong-type-argument stringp nil) > > I just realized I forgot to CC the email list. Here is the reply I > sent to Eric. Sorry to Eric for getting 2 emails! > > Thanks for the reply. > > Using the latest matlab.el (Revision 1.29), here is the output after > starting 'emacs -nw', then doing M-x toggle-debug-on-error, then C-x > C-f blah.m to create or find a non-existent text file "blah.m": > > Debugger entered--Lisp error: (void-variable mlfile) > (or mlfile "") > (file-name-directory (or mlfile "")) > (expand-file-name "toolbox/emacsinit.m" (file-name-directory (or mlfile ""))) > (let ((mlfile ...) (dir ...)) (and mlfile (file-exists-p dir))) > (defvar matlab-shell-use-emacs-toolbox (let (... ...) (and > mlfile...)) "Add the `matlab-shell' MATLAB toolbox to the MATLAB path > on startup.") > eval-buffer(#<buffer *load*> nil "/home/alan/.matlab.el" nil t) ; > Reading at buffer position 152939 > load-with-code-conversion("/home/alan/.matlab.el" > "/home/alan/.matlab.el" nil t) > matlab-mode() > set-auto-mode-0(matlab-mode nil) > set-auto-mode() > normal-mode(t) > after-find-file(t t) > find-file-noselect-1(#<buffer blah.m> "~/blah.m" nil nil "~/blah.m" nil) > find-file-noselect("~/blah.m" nil nil t) > find-file("~/blah.m" t) > call-interactively(find-file nil nil) > > > Some further info about my setup: I renamed the file matlab.el to > .matlab.el, and used the following code in my .emacs file: > > (autoload 'matlab-mode "~/.matlab" "Enter MATLAB mode." t) > (setq auto-mode-alist (cons '("\\.m\\'" . matlab-mode) > auto-mode-alist)) > (autoload 'matlab-shell "~/.matlab" "Interactive MATLAB mode." t) > > > Any suggestions or hints? > > Thanks, > Alan > > On Wed, Mar 23, 2011 at 9:01 AM, Eric Ludlam <Eri...@ma...> wrote: >> Hi, >> >> Can you do: >> >> M-x toggle-debug-on-error RET >> >> and reproduce the error? The resulting stack will help identify the culprit. >> >> Eric >> >> -----Original Message----- >> From: Alan [mailto:ora...@gm...] >> Sent: Sunday, March 20, 2011 12:57 AM >> To: mat...@li... >> Subject: [Matlab-emacs-discuss] File mode specification error: (wrong-type-argument stringp nil) >> >> Hi, >> >> I'm trying to use just the matlab.el file for editing code. However, >> if I use any version >= 3.3.0 (corresponding to revision number >= >> 1.14), I get the following error: >> >> File mode specification error: (wrong-type-argument stringp nil) >> >> whenever I try to open a .m file in emacs. This happens with emacs >> versions 21 and 23. >> >> Has this happened to anyone before? Know of any fixes? >> >> Thanks for your help, >> >> Alan >> >> ------------------------------------------------------------------------------ >> Colocation vs. Managed Hosting >> A question and answer guide to determining the best fit >> for your organization - today and in the future. >> http://p.sf.net/sfu/internap-sfd2d >> _______________________________________________ >> Matlab-emacs-discuss mailing list >> Mat...@li... >> https://lists.sourceforge.net/lists/listinfo/matlab-emacs-discuss >> > > ------------------------------------------------------------------------------ > Enable your software for Intel(R) Active Management Technology to meet the > growing manageability and security demands of your customers. Businesses > are taking advantage of Intel(R) vPro (TM) technology - will your software > be a part of the solution? Download the Intel(R) Manageability Checker > today! http://p.sf.net/sfu/intel-dev2devmar > _______________________________________________ > Matlab-emacs-discuss mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matlab-emacs-discuss > |