NT Emacs

I first discovered Emacs when I installed SlackWare Linux a few years ago, as an experiment... I found it frightening and hard to manage. When my programming lecturer suggested the 32bit Windows port of it as the ideal Java editor I seriously doubted it could ever be that. However... I was wrong. The latest version of NT Emacs is extraordinarily powerful, completely customizable (no matter how you like to code) and totally stable.

It has taken me a while to get it exactly how I like it though, so for the benefit of anyone starting out with it, I've put my customizations on here as a starter to getting the whole thing working nicely for Java programming.

Emacs thinks that your "C:\" root directory of your C-Drive is the equivalent of your home-drive under UNIX (from whence Emacs originates), this means that the easiest place to put your start-up file - containing all your customizations, is in the root directory of your C Drive. This avoids having to set environment variables, or anything similar. If you do want to put it somewhere else, read the section on setting the home directory. You also need the Java extensions, which add menu commands and coding helpers to Emacs' menus and tools, and you need the "print-NT" extensions to allow printing on a normal desktop printer. I've provided some of these here, so you can get them from the one spot, the larger ones I've linked to their home sites.

  1. Download NT-Emacs and unzip it into your C:\ directory, letting Winzip (or a similar program) use the folder structure already in the zip file. Rename the new "emacs-20.3.4" directory (or whatever it called itself ) to just "c:\emacs". Open the c:\emacs folder, open the folder called "bin", and double click the program "addpm.exe". A window will pop up and ask you if emacs is installed in c:\emacs. Just agree with it, and it will add a shortcut to the start menu so that you can start the program.
  2. You might need to hold shift while you click the following link: download my startup file and copy it to your C:\ directory.
  3. Download the JDE extensions (they're in a zip file) and unzip them into your C Drive.. they have a built in folder structure, so if you let Winzip (or a similar program) "use folder names", you can just unzip it straight into C:\. It will make a folder called "jde1.2.1" or something similar. It's best to rename this folder to just JDE, to make it easier to specify where your extensions are in your startup file. My startup file is designed for the directory to be called just "JDE", so you'll need to alter it if you want to put the JDE anywhere else.
  4. Download the cua-mode extension and put it straight into the c:\jde directory.
  5. Download the print-NT extension and also put this into the c:\jde directory.
  6. The way I've set up the print-NT extension, you'll need to make sure that there is a copy of "Wordpad.exe" in your c:\windows directory. Just to a Start-Find-Files for it, and if it isn't in the windows directory, copy it in there!
  7. Now go into your start menu and find Emacs... run it!

The key-stroke commands can take some getting use to, but once you know them, they're extremely quick and easy to use. You can find some commands to start you off here.

These may be handy:

The Java Extensions user's guide - this links to your own hard drive
The NT-Emacs FAQ - this is on my site... it's a good idea to download it
Notes on printing from Emacs

The startup file is setup so that indenting of braces means the braces are lined up with the opening braces of each block, that's how I like to code. Some people prefer to have the braces lined up with the first statement in the block, you can change the offset values from "+" to 0 in my startup file to make this happen.

Mail me with any further questions...

Have fun. :o)

Gareth.

Home NT Emacs My CV Computer Science Applications