Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

I can find several Emacs libraries for Mathematica, but I'm not aware of a clear favourite, a definitive list, or of a library which is actively maintained and developed. None of these appear to be in the Emacs Lisp Package Archive or Milkypostman’s Emacs Lisp Package Archive.

I have been using the first one on the list for a while, but the indentation engine is not ideal. What do people use for editing Mathematica source code in Emacs? I'm just talking about editing source code; I don't need to evaluate Mathematica expressions in a subsidiary kernel process, etc. The important features for me are

  • indentation,
  • syntax-highlighting,
  • forward/backward/up/down in Mathematica bracketed expressions.

Additional "IDE" features would be very welcome, especially imenu support.

share|improve this question

1 Answer 1

You want all the basic stuff, the same stuff I do, but unfortunately it seems support here is pretty thin on the ground. Some others I've found:

  • https://github.com/melton1968/math - seems to be a full attempt at a parser, which is amazing, but it doesn't appear to be functioning properly right now. As much as I'd like to deep dive on that, I don't have the bandwidth. Perhaps someone here does?

  • https://github.com/kawabata/wolfram-mode - is a derivative of math++, I think, and the current revision uses a standard emacs smie parser to do basic syntax highlighting and indentation. Unfortunately this one also seems buggy, but this one stands some chance of being fixed given its fairly modest goals and use of a standard parser. The main problem I have is that it is confused about Association syntax in Mathematica 10, and using basic parens to group statements inside a function definition seems to freak out the indentation.

The approach I might take is to start from scratch with a new smie parser, and add functionality to it as I need it, so that I can understand the indenting rules. Sorry this isn't a complete answer, but I hope it's inspirational to someone or useful as a starting point.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.