Hi Eric, I had the same issue as Shervin using matlab-mode installed via MELPA with emacs 26.3 on OS X 10.15.1. The MELPA version number for matlab-mode is 20191223.2012. The issue was that the toolbox/+emacs directory was for some reason not installed by emacs; after checking out the repo and manually copying it in, everything seems to be working fine.
Cheers, Roman $ emacs --version GNU Emacs 26.3 $ uname -s -r Darwin 19.0.0 MELPA package information: matlab-mode is an installed package. Status: Installed in ‘matlab-mode-20191223.2012/’ (unsigned). [Delete] Version: 20191223.2012 Summary: Major mode for MATLAB(R) dot-m files Homepage: http://sourceforge.net/projects/matlab-emacs/ Keywords: [matlab] [programming] [language] [(X)emacs] Other versions: 20191010.653 (installed), 20180928.1526 (installed), 20191223.2012 (melpa). On Tue, Dec 31, 2019 at 3:14 PM Eric Ludlam <ericlud...@gmail.com> wrote: > > Hi Shervin, > > It looks like you have two different versions of matlab-emacs on your > two machines. I changed how things are setup to be clearer. emacsinit > now deals with the path, and debugging stuff. The 'emacs' package in > matlab includes a set command (thus : emacs.set) for configuring tools, > such as emacsclient. > > On linux, you indicate it is setting the preference in emacsinit. In > the new version of matlab-emacs, that is now part of emacs.set. On the > MAC version, it is trying to run emacs.set (sent from emacs to ML) but > it doesn't exist. This means one of two things: > > 1) Your MAC version is using Emacs code for the new version of > matlab-emacs, but is using the toolbox directory from the old version of > matlab-emacs. > 2) On MAC, emacsinit is failing to set the path so that emacs.set is on > the path. > > If you check your path (ie - 'which emacsinit') and see if there is a > +emacs directory in the directory where emacsinit is. I'm assuming it > is there because emacsinit is calling emacs.Breakpoints and emacs.Stack > to set up breakpoint and stack managers. > > Hope this helps. > Eric > > On 12/28/19 8:37 PM, Shervin Safavi wrote: > > Hi Uwe, > > > > I follow your advice. emacsinit is running smoothly and it prints: > > > > > > Updating MATLAB Path to support Emacs toolbox: addpath(... > > > > But it give an error when running the following: > > > > emacs.set('clientcmd', 'emacsclient -n -s > > /var/folders/r5/zx0tj5sd3gg3dpynd41gr5s80000gn/T/emacs501/server-9483'); > > > > Error is “Unable to resolve the name emacs.set.” > > > > I dig into to codes a bit. This is related to the part which we tell > > MATLAB to use emacs as the editor. So now if type “edit > > <functionName>” it will be opened in the editor. > > > > When I check it on the Linux machine with same version of MATLAB, this > > functionality is implemented in the “emacsinit” through this line: > > > > com.mathworks.services.Prefs.setStringPref('EditorOtherEditor', > > clientcommand); > > > > Where “clientcommand“ is the input to the emacsinit which “emacsclinet > > -n”. If I do the same thing in the Mac OS doesn’t work, i.e. “edit > > <functionName>” will open the file in MATLAB editor (of course I also > > tried server-start on emacs). > > > > So I think the issue is in Mac OS we don’t know how to instruct MATLAB > > to use emac as its editor. > > > > Hope that help to solve the issue; otherwise please let me know. > > > > Best, > > Shervin > > > > On Sat, Dec 28, 2019 at 9:36 AM Uwe Brauer <o...@mat.ucm.es > > <mailto:o...@mat.ucm.es>> wrote: > > > > >>> "SS" == Shervin Safavi > > <neuroprinciplist-re5jqeeqqe8avxtiumw...@public.gmane.org > > <mailto:neuroprinciplist-re5jqeeqqe8avxtiumw...@public.gmane.org>> > > writes: > > > > Hello Shervin, > > > > > Dear everyone, > > > I'm setting up matlab-mode on a laptop with mac OS. When I > > run matlab-shell > > > I get the following error: > > > > > "Unable to resolve the name emacs.set." > > > > > when it's running: "emacs.set('clientcmd', 'emacsclient -n -s > > > > > > > /var/folders/r5/zx0tj5sd3gg3dpynd41gr5s80000gn/T/emacs501/server-28543');" > > > > > MATLAB version is: > > > > > R2019b Update 1 (9.7.0.1216025) 64-bit (maci64) > > > > > I tried to find the issue by googling and checking the codes > > but wasn't > > > successful. > > > > > I should note that I set up matlab-mode on a Linux machine > > with the same > > > version works smoothly. > > > > > If someone has a clue to solve this, please let me know. > > > > Eric, who, for some reason, was not subscribed to the list, got > > finally > > your email and proposed that you should debug the file emacsinit.m > > > > To quote his email: > > > > ,---- > > | > > | The emacsinit command should print out "Updating MATLAB path ...". > > | > > | If it doesn't then the auto-path update will need to be debugged. > > `---- > > > > So you can cd to the matlab-emacs-src/toolbox directary, then edit > > emacsinit.m, and set a breakpoint at the beginning. Step through and > > see why it doesn't add toolbox to the path. > > > > Could you do this and tell us, what you observe? > > > > Thanks > > > > Uwe > > _______________________________________________ > > > > > > _______________________________________________ > Matlab-emacs-discuss mailing list > Matlab-emacs-discuss@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/matlab-emacs-discuss _______________________________________________ Matlab-emacs-discuss mailing list Matlab-emacs-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matlab-emacs-discuss