Clementson's Blog

Bits and pieces (mostly Lisp-related) that I collect from the ether.

November 2006
Sun Mon Tue Wed Thu Fri Sat
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30
Oct  Dec

Minimal .emacs for Win32

Sunday, November 12, 2006

I've grown accustomed to having my own development environment always available. Even though I do custom coding for clients, I generally do it remotely on my own hardware, so it is rare that I have to use someone else's box. However, the last few weeks I've been doing work for a client who required that I use their hardware. They were ok with me downloading tools that I might need for my work, but they did want me to use their Win32 box.

It's been a while since I've had to use Win32 for development as I normally use my Mac even when I'm connecting to clients that have standardized on Win32. So, the first thing I did was download Emacs. On the Mac, I use CVS Emacs (actually, I use Aquamacs, but it's essentially just CVS Emacs with some bundled elisp libraries) and I've grown accustomed to features in CVS, so I was pleased to find that there's a pre-built CVS Emacs for Win32 available. Since I'm not doing Lisp work for this particular client, I was able to make do with just a very basic set of customizations in my .emacs file:

;; Override defaults
(fset 'yes-or-no-p 'y-or-n-p)           ;replace y-e-s by y
(setq inhibit-startup-message t)        ;no splash screen
(setq ls-lisp-dirs-first t)             ;display dirs first in dired
(tool-bar-mode nil)                     ;no tool bar
(show-paren-mode 1)			;paren matching
(setq mouse-1-click-follows-link 'double)
;; Conventional selection/deletion (pc-selection-mode) (delete-selection-mode t)
;; Convenience keys (global-set-key [f4] 'kill-this-buffer) (global-set-key [f6] 'other-window) (global-set-key [f7] 'delete-other-windows)
(find-file "~/")

It's bit shorter than my normal .emacs file, but it's enough for what I need to do. ;-)

In the past, when Win32 was my primary development OS, I had used Cygwin to add Linux-like utilities to Windows. However, since this is a short assignment and I didn't want to mess about with installing Cygwin, I just downloaded some of the GnuWin32 packages that I needed.

So, it's still Win32 but at least I can live inside Emacs and isolate myself from most of the ugliness of Windows.

emacs Copyright © 2006 by Bill Clementson