Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 665307
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T23:41:37+00:00 2026-05-13T23:41:37+00:00

I would like to edit matlab scripts in two cases (1) In matlab Command

  • 0

I would like to edit matlab scripts in two cases

(1) In matlab Command window running in a linux terminal, how to create and edit a script file? use

edit(filename)

will invoke the interactive editor, which is not desired while operating on a linux server.

(2) In emacs, is there any way to edit matlab script conveniently? Which is better, using MATLAB-Emacs or EmacsLink?

when I am trying to cvs checkout MATLAB-Emacs from http://sourceforge.net/scm/?type=cvs&group_id=154105, which modulename should I specify?

Thanks!


EDIT:

When installing MATLAB-emacs, there is some problem. I thought my CEDET is installed here:

/usr/share/emacs22/site-lisp/cedet-common   
/usr/share/emacs22/site-lisp/cedet-contrib  

My CEDET is of version 1:1.0pre4-3 (intrepid) on Ubuntu. So I type the command:

$ make "LOADPATH=/usr/share/doc/cedet-common /usr/share/doc/cedet-contrib"    
 for loadpath in . /usr/share/doc/cedet-common /usr/share/doc/cedet-contrib; do \    
       echo "(add-to-list 'load-path \"$loadpath\")" >> autoloads-compile-script; \    
    done;    
 "emacs" -batch --no-site-file -l autoloads-compile-script -f cedet-batch-update-autoloads matlab-load.el .    
 Generatim autoloads for cedet-matlab.el...    
 Generatim autoloads for cedet-matlab.el...done    
 Generatim autoloads for matlab.el...    
 Generatim autoloads for matlab.el...done    
 Generatim autoloads for mlint.el...    
 Generatim autoloads for mlint.el...done    
 Generatim autoloads for semantic-matlab.el...    
 Generatim autoloads for semantic-matlab.el...done    
 Generatim autoloads for tlc.el...    
 Generatim autoloads for tlc.el...done    
 Generatim autoloads for semanticdb-matlab.el...    
 Generatim autoloads for semanticdb-matlab.el...done    
 Updatim header...    
 Updatim header...done    
 Wrote /home/tim/.emacs.d/matlab-emacs/matlab-load.el    
 make: *** No rule to make target `matlab-publish.el', needed by `lisp'.  Stop.    

What’s wrong? Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T23:41:38+00:00Added an answer on May 13, 2026 at 11:41 pm

    You should be aware that starting with version R2009a EmacsLink has been removed from Matlab, so I would say that at this point Matlab-Emacs is a better alternative. The main strength of EmacsLink was tighter and integration with Matlab, especially when using the debugger, but current version of Matlab-Emacs is quite capable and will probably satisfy most people’s needs just as well as EmacsLink.

    In order to invoke Emacs from Matlab, the cleanest solution is to run the Emacs server (M-x server-start). The edit() command can then be set up to open the script in Emacs. The detailed instructions on how to do this, as well as on running matlab-shell as inferior process are provided here:

    http://blogs.mathworks.com/desktop/2009/09/14/matlab-emacs-integration-is-back/

    Regarding CVS checkout: modulename is “matlab-emacs”. You used to be able to download an archive and simply unpack into your elisp directory.

    EDIT: I decided to reinstall matlab-emacs; here is a step-by-step of what I did. (The steps are pretty obvious, but this might still be useful seeing how it’s easy to run into a compilation error or to misinterpret some instructions). Note that matlab-emacs didn’t compile until I reinstalled CEDET.

    Download CEDET from http://cedet.sourceforge.net/ (1.0pre7 in my case)
    Uncompress the archive into ~/.emacs.d/elisp/ (now have ~/.emacs.d/elisp/cedet-1.0pre7/ directory)
    Compile CEDET via make EMACS=/usr/bin/emacs
    While in ~/.emacs.d/elisp, do the cvs checkout:

    cvs -z3 -d:pserver:anonymous@matlab-emacs.cvs.sourceforge.net:/cvsroot/matlab-emacs co -P matlab-emacs
    

    Compile matlab-emacs via

    make "LOADPATH=../cedet-1.0pre7/common ../cedet-1.0pre7/eieio ../cedet-1.0pre7/semantic/bovine/ ../cedet-1.0pre7/semantic/"
    

    Ideally, everything should compile; now it’s time to edit startup files: in the .emacs add

    (setq load-path (cons "~/.emacs.d/elisp/matlab-emacs/" load-path))
    (load-library "matlab-load")
    

    and in matlab’s startup.m add

    addpath('~/.emacs.d/elisp/matlab-emacs/toolbox','-begin');
    rehash;
    emacsinit;
    

    That should do it! Launch emacs, and do M-x matlab-shell. If edit foo.m doesn’t open foo.m in emacs, make sure that the server has been launched (M-x server-start).

    To be most productive, you might wish to figure out what works for you in terms of sending commands from the edit buffer to matlab process (experiment with the shortcuts in the mode help). Finally, if you need to debug stuff, do dbstop in foo, and when you run foo you can either use use dbstop family commands (look them up) or turn on toolbar (M-x tool-bar-mode) and use the buttons there to control breakpoints, stepping, continuing, etc. When finished, type dbquit.

    Unfortunately, if you are on Windows, matlab-shell is not an option (which is a little surprising, seeing how I can run pretty much everything else under the sun from the command line — Mathematica, R, numpy…) — so your options for tight emacs/matlab integration are somewhat limited (unless you don’t mind running an old matlab version that supports emacslink).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 377k
  • Answers 377k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer You can use the suffixes option in your vimrc to… May 14, 2026 at 8:46 pm
  • Editorial Team
    Editorial Team added an answer If you control both sides of the wire, you could… May 14, 2026 at 8:46 pm
  • Editorial Team
    Editorial Team added an answer One of the tenets of Rails is you shouldn't really… May 14, 2026 at 8:46 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.