Here, I'll give you a small descripiton to put NTEmacs (Emacs on
Windows) into your USB flash memory! You can bring your Emacs anywhere ;) Only you
need is USB flash memory 256+ MB.
emacs+auctex by Ralf Angeli
Ralf Angeli, one of the main developpers of AUCTeX,
compiles the latest Emacs CVS with AUCTeX bundle for Windows. I call this
distribution emacs+auctex for windows. emacs+auctex is available at
The latest version of emacs+auctex is checked out and packaged on 2006-06-24.
Read the Release note for details.
The file emacs+auctex-w32-<date>.zip includes the pre-compiled package
while emacs+auctex-src-<date>.zip holds the source code and build
instructions in case you want to look at it or compile it yourself.
Instlattion
For installing the package, simply unpack emacs+auctex-w32-<date>.zip
at the desired location. Then, copy the directory emacs+auctex-w32-<date>
into your USB flash memory. It takes some minutes to copy all the files because
emacs+auctex is very big package.
You can start Emacs by executing runemacs.exe in the bin subdirectory.
.emacs and site-lisp customization
Emacs for Windows looks for your .emacs file in c:/Document and
Setting/USERNAME by default. But USB application must find its init
files in the USB memony.
Here the tips!
Put the following codes into
f:/emacs+auctex-w32-<date>/Emacs/site-lisp/site-start.el.
(defvar usb-drive-letter (substring data-directory 0 3))
(defvar usb-home-dir (concat usb-drive-letter "home/"))
(setenv "HOME" usb-home-dir)
In this section, I use f: for the drive letter of USB flash
memory. But please remmember that the drive letter will be changed by each of
machines. Do not write the drive letter directly to your init files. Use the
variable usb-drive-letter for the drive letter.
Now make directory home in f:/. This is the simple
.emacs file in f:/home/
;;
;; Portable Emacs init file.
;;;
(setq user-full-name "YOUR NAME")
(setq user-mail-address "YOUR EMAIL ADDRESS")
;;
;; Set environment
;;
(defvar usb-site-lisp-dir (expand-file-name "site-lisp" usb-home-dir))
(setq load-path (cons usb-site-lisp-dir load-path))
(let ((dir (delete nil (mapcar (lambda (f)
(unless (string-match "\\.elc?\\'" f) f))
(cddr (directory-files usb-site-lisp-dir t))))))
(setq load-path (append dir load-path)))
Additional Elisp files should be saved in f:/home/site-lisp/.
Update emacs+auctex
Just remove old emacs+auctex directory, and copy new one into USB flash memory.
Then put above codes for site-start.el into new site-start.el.
Acknowledgment
Thanks go to Ralf Angeli and AUCTeX develop members!