Red Antigua Logo
Yet another piece of web.
Search this site (by Google)
Tools    (top)
Check a site for broken links
(W3C)

Perl modules    (top)
Tree::Numbered::Tools
(CPAN)
Perl tutorials    (top)
Perl modules
HTML::Template
CGI::Application
Cookies with CGI::Application
Upload files with CGI::Application
Download files with CGI::Application
Redirect with CGI::Application
CPAN shell
Install DBD::mysql from the CPAN shell
Perl trim function
Validate an IP with Perl
Run suid Perl scripts under Apache
Perl taint mode
Perl date functions with Date::Calc

In Spanish
Curso de Perl

C tutorials    (top)
C - Introduction
C - Absolute beginner's Emacs
C - Examples for beginners
C - Makefile examples
C - Autotools examples
Server configurations    (top)
DNS
Apache
Apache Authentication and Access Control
mod_perl on FreeBSD
MySQL
MySQL add account
phpMyAdmin
Squid
DHCP

UNIX on Windows    (top)
MSYS2 - UNIX environment for MS Windows 32/64 bits
Apache setup on Windows
MySQL setup on Windows
PHP setup on Windows
Perl setup on Windows
Emacs setup on Windows
PuTTY
WinSCP
GIMP on Windows
MinGW - gcc on Windows
MSYS - UNIX-styled shell on Windows
msysDTK - autotools on Windows
GDB for MinGW on Windows

Misc. FreeBSD/UNIX    (top)
'portupgrade' on FreeBSD
'ipf' on FreeBSD
'pf' on FreeBSD
'su' on FreeBSD
Mount an ISO image under FreeBSD
Load the correct sound driver under FreeBSD without knowing what sound card you are using
Simultaneous sound channels on FreeBSD
FreeBSD network stuff
DOS-to-UNIX file conversion
favicon.ico on UNIX
Emacs tips
Command Line Calculator
Save multimedia streams with 'mplayer'
xargs - solution to 'Argument list too long'
Process multiple images from the command line using 'ImageMagick'
Turn the system bell off under X Windows
Process each line in an input file from the command line (or in a shell script)
How to keep a program running in the background using 'nohup'
How to remove symbolic links in the current directory using 'find' and 'rm'
How to remove Emacs backup files in the current directory and all subdirectories using 'find' and 'rm'
How to execute .profile without logging in
Configure X to handle non-English characters
How to move /var to /usr/var

Redirect a web page    (top)
Redirect to another web page
Apache redirect
C redirect
Perl redirect
PHP redirect
HTML redirect
JavaScript redirect

Javascript    (top)
Trim function
Login form
Register form
Popup window

Emacs setup on Windows
Emacs setup on Windows

See also:
Emacs tips
Absolute beginner's Emacs

This tutorial describes how to setup Emacs on Windows.
  1. .emacs-win (save as .emacs on your local box)
See Emacs stuff for general Emacs info.

Install the Emacs binary
Emacs W64 (64-bit only)
You can unpack the tarball wherever you want; I chose C:\.
That's all what's needed, now run C:\emacs-21.3\bin\runemacs.exe (either by double-clicking the executable icon, or from the command prompt, both ways work fine).
If you want Emacs to appear in your Start Menu, run C:\emacs\bin\addpm.exe.

Configure Emacs to use packages
Most Emacs packages are written in Emacs Lisp (with the .el file extension), so they are platform independent and will thus work fine on Windows.
Let's say you have a friend using Emacs on any UNIX-like platform.
Just ask her/him for a copy of the folder of the Emacs packages.
(If you don't have any UNIX-like friends, you can also search the Net for Emacs packages. ;-)
Save the folder on your computer as C:\emacs-packages\.
Edit the C:\.emacs file (created automatically the first time you use Emacs).
Add the following lines, so Emacs can find the path to the packages:
(setq load-path
      (cons "c:\emacs-packages" load-path))
An example:
To use the package highlight-current-line.el, add the following lines to .emacs (requires the package to be installed as C:\emacs-packages\highlight-current-line.el):
(require 'highlight-current-line)
;; If you want to mark only to the end of line:
(highlight-current-line-whole-line-on nil)
;; switch highlighting on
(highlight-current-line-on t)
(highlight-current-line-set-bg-color "#dfdfe0")
(highlight-current-line-set-fg-color "#666666")
Exit and run Emacs again, the current line of editing should now be highlighted.

Configure Emacs to different setups depending on Emacs version
Add the following lines to .emacs:
(cond ((< emacs-major-version 21)
       ;; Emacs 20 customization. (non-existing)
       (setq custom-file "~/.emacs20.el"))
      ((and (= emacs-major-version 21) (< emacs-minor-version 4))
       ;; Emacs 21 customization, before version 21.4.
       (setq custom-file "~/.emacs21.el"))
      ((< emacs-major-version 22)
       ;; Emacs version 21.4 or later. (non-existing).
       (setq custom-file "~/.emacs21.4.el"))
      (t
       ;; Emacs version 22.1 or later.
       (setq custom-file "~/.emacs22.el")))

(load custom-file)


If Emacs hangs (for any reason), type:
C-g
and you should return to life. ;-)

To save a highlighted source code in Emacs as HTML, use htmlize, included in Emacs W32.
Just select a region in any file, type
htmlize-region
and Emacs will create a new buffer with a HTML version of your file, with highlighted text and everything.
Last modified: Thu Sep 8 06:09:09 EDT 2016