Installing Emacs to work with Swindle - the Quick Way
-
First of all, download the Emacs version for windows - it can be found at
ftp://ftp.cs.washington.edu/pub/ntemacs/latest/i386
There is a README file there, but all you have to know is that you should
download the em2031_*.zip files.
Note: to learn more about the Windows version and about Emacs in general,
you can start at the
NTEmacs page.
-
Unzip the files in an appropriate place, remember to use directory names -
so you'll get a directory named "emacs-20.3.1". It can
be renamed to something more sensible like "emacs-20".
-
In the Emacs directory that you get there is a "bin" directory, with a small
program called "addpm.exe", run it to install Emacs. All this step does is
adding a menu item and a small entry in the registry. No extra DLL's or
whatever is needed.
At this point Emacs is installed, but what you get when running it is the
default configuration, it doesn't look good and its quite hard to manage it (at
least according my taste). So the next step is to get my environment running.
This is the point where you should start doing things in the case that you are
using a Linux machine (assuming it already comes with an installed Emacs). In
this case you should ignore step 6 (naturally).
-
First of all download
Environment.zip.
This is a small version of my environment - "just" 4Mb (unzipped).
If this is a problem, I can add an even much smaller (and limited) version -
around 200Kb.
-
Unzip this file somewhere, again - use directory structure when unzipping.
The only thing left is to get it loaded. When Emacs starts, it reads an
initialization file from your home directory. The problem is where is your
home directory... There are several ways to do this, you can read about it in
ntemacs.html (look for "Where do I put my .emacs (or _emacs) file?"),
I only describe one way that seems to be the most sensible. Note that the
following step is for creating a home directory - you can skip that and put the
initialization file in C:\, but organizing things in directories is
probably a better idea.
-
Create a directory to use as your "home" directory. To make this
be your home directory, set the HOME environment variable to this
directory. In a Windows 95 machine you can add a line similar to this to
your autoexec.bat:
set HOME=C:\HOME\
In Windows NT you should do this from the control panel (it's in system -
the environment tab).
Reboot the machine.
-
Now add an initialization file - named "_emacs" in your
home directory. In this file you only need one line:
(load "c:/EliEmacs/Environment/eli-all.elc")
except that the file location should be changed to point to wherever you've
created the EliEmacs directory.
Thats all.
Mail me (eli@cs.cornell.edu)
if you have any problems.
Some quick notes:
-
You should note that DrSwindle won't realize that the file that is opened is
modified whenever you save the file in Emacs. For this, the I have modified
DrSwidle, so there is a small checkbox next to the Execute button - if you
chek it, then DrSwindle will revert the file whenever you click execute, so
you can edit the file in Emacs and DrSwindle on the same file. This is part
of patch 7.
-
Arrow keys move normally, with control you move word-by-word, with meta (the
emacs name for alt) you move by expressions (enclosed by balanced parens).
With shift you move and select text. C-ins (ctrl+ins) copies,
S-del (shift+del) cuts, S-ins pastes. C-del cuts
the next word, M-del (alt+del) the next expression, the same with
backspace going backwards.
-
The mode line is the red line on the lower part of the screen - it tells you
some useful information such as the file that you're working on and its
mode. Modes are what Emacs uses to treat files according to some rules -
when you'll open files that have a ".ss" sufix, you will
use Swindle-mode which will give you automatic indentation and colors.
-
Some useful keys:
- F1 opens a file (called find-file)
- F2 saves a file
- F7 does i-search (incremental search)
- F5 does interactive find/replace
- F10 kills a buffer (close the file)
- If you get several windows in emacs then C-tab will move
between them (or you can use the mouse)
- F12 will get delete all windows except for the one that you're
now in (in case you get more than one)
- Ins toggles overwrite mode
- Tab indents the current line
- To switch buffers (files) use C-f1 (ctrl+f1) and enter on your
buffer, or use the "Buffers" menu.
-
If you want to read about what a key is used for - hit
"C-h k" (ctrl+h, then k) and then the key you want to
check. This also works for menu items.
-
Emacs is much more than that. The hugh amount of stuff that you've
downloaded is doing much more than MS-junk is doing with stuff that get
shipped in whole CD's. Again - I will answer all questions happily - Emacs
is a religion.