This article is not intended to insult any project or point fingers, it is my opinion and mine alone, that is my disclaimer.
Emacs is, according to its users (me included), the most powerful editor currently available. I use it to write code, blog posts, documentation and many more things. However I often miss the things that make IDEs like Eclipse or Visual Studio so attractive to use.
A small list:
- Project centric facilities
- True context sensitive code completion
- Context sensitive documentation lookup
- Edit time error / improvement indication
- Refactoring tools
These are a few things that make life in an IDE good. You define a project and its dependencies, and all these features become accessible. Anyone using IDEs will tell you that it is an absolute pain to setup and manage configurations on large projects. Take a Java based multi module project in eclipse for instance, since Eclipse does not have multi module support you are forced to create multiple projects and manage their dependencies. Granted, tools like maven simplify this task greatly, but it is still very time consuming.
Jetbrains has the best IDE as far as I am concerned, although it still is a pain to setup when you need to do some more complex things, but perhaps the closest to Emacs editing power in their area; multi module projects, settings per project, good intelligence to aid the developer and a good plugin api and automated plugin installation.
So, how could we make this situation better? I want to use Emacs for my code editing, simply because of its extensibility and powerful editing features, but I also want the things in my above list and I want it for as many languages as possible.
CEDET provides some great tools for semantic analysis of code, but I believe it can do much better. I have been studying ANTLR, a parser generator, and came to the following ‘draft’ conclusion.
What we need is a domain specific language (DSL) to specify language agnostic projects which can be used inside Emacs to create the project centric nature for editing files.
To ‘understand’ the actual files inside a project we would need a parser/lexer that generates a language agnostic description of each source file that can easily be read by an LISP based engine, to provide context sensitive intelligence in any languages (which methods are defined on the current object, which fields are accessible from he current scope, is the variable assignable with the return type of the method called, etc.). This is wat Semantic does now, but moving the creation of this intermediate form outside of Emacs as a companion program will make it that Emacs can focus on editing and providing information.
In the realm of Java, C and C++ editing, xrefactory provides this means, which works really well, however it needs yet another configuration file and currently it is poorly maintained except for the C++ functionality (which is where they make their money).
So, what do I actually want? I want to create a program that provides Emacs with the information that describes
- syntax highlighting rules for each language and the required editing mode
- validity of the currently edited document
- improvement notes in the current document
- completions within context of the request
- documentation within context of the request
- refactoring
- Seamless debugging support
If you take a list of Emacs modules that provide you with each little bit of the described functionality, you can get a long way, however most of these projects are not up to speed with the current world. Java has JDEE and xrefactory, both suffer greatly in Java 1.5 and up and cannot give you things like code completion anymore. C and C++ have great modes in Emacs, but code completion is far from usefull as well as documentation support. So it is time to start over, learn from the past and bring these features up to par with the rest of them.
I have begun designing a new set of modes and programs to actually start this work. But what I am more curious about is how you feel about the current state of Emacs as an IDE and what you want to see changed.