In the order of the items listed, here is my experience with the ones listed on the page:
- django-mode.el: download link is dead
- django-html-mode.el: download link is dead
- django-html-mumamo-mode: tells you to download the latest branch
- Yasnippet: good for Django autocompletion only
;(require 'django-html-mode) ;(require 'django-mode) ;(yas/load-directory "~/.emacs.d/plugins/django-mode/snippets")The instructions on the Django page are to install the latest branch:
bzr branch lp:nxhtmlThe problem is that you end up downloading the latest snapshot, which caused some problems for me when I tried into enter into django-html-mode. Instead, I downloaded the 4/25/10 release directly from the NXHTML page by visiting http://ourcomments.org/cgi-bin/emacsw32-dl-latest.pl. The release is hard to find on the main page but if you click on Download latest nXHTML (zip file)" you can retrieve the file.
I unzipped this file directly into ~/emacs.d, which creates an nxhtml/ directory.
Inside my .emacs file, I add three lines:
(load "~/.emacs.d/nxhtml/autostart.el") (setq mumamo-background-colors nil) (add-to-list 'auto-mode-alist '("\\.html$" . django-html-mumamo-mode))The first line will invoke the NXHTML script to load. If you have Emacs v23, you shouldn't have to install the NXML library.
The second line deals with an issue of NXHTML changing the color background to blue. For more info, see
The third line will force .HTML files into django-html-mumamo-mode. You can also use django-xhtml-mumamo-mode, which will have a "Valid/Invalid" at the bottom of the Emacs screen to inform you whether your HTML code is presumably XHTML-compliant.