ensime/ensime-emacs — pull request #39 by edani (2014-09-23 16:26:18+00:00)
Title: Toggle between loading "some files" and "all files" in the presentation compiler

This goes with ensime/ensime-server#615. The explanation that follows is as long as the actual code change, but it's important to understand how the user experience is affected.

- I moved all presentation compiler commands to the `C-c C-c` prefix
- The "new behavior" is to not load all sources in the PC at startup.
- The "old behavior" (all files loaded) can be restored by simply typing `C-c C-c a` (formerly `C-c C-v a`). This only need to be done once per session.
- Switching from the "old behavior" back to the "new behavior" is done with `C-c C-c r` ("reload open files").

When the "new behavior" is in effect:
- things won't work well until the project is compiled. This is a major change from a user's point of view.
- editing source code will cause only a few files to be reparsed by the PC so it should be very snappy. The drawback is that type information etc. may not propagate between all open files. This can only be fixed by recompiling. The server will notice that .class files have changed thanks to @fommil's excellent work, and update its state.

The one thing that won't work with the "new behavior" is `C-c C-v r` and `C-c C-r r`: both functions rely on passing all sources to scala-refactoring. I suggest to fix this in a separate ticket. In the meantime, a workaround is to use `C-c C-c c` before a search to revert to the old behavior.