Archive for December, 2008

0

One of the things I love about Emacs is its extensibility. It has all sorts of different edit modes for different file types. For example, SGML mode comes standard for editing XML & HTML. It’s a step up from normal text edit mode, it renders tags in color fonts. But it’s pretty plain vanilla editing– no syntax validation nor smart tag completion.

I started to use nxml-mode earlier this week and am liking it. Here’re some of the nice features:

  • Smarter rendering of tags
  • Real-time syntax checking
  • Tag completion
  • Support of folding
  • Link handling

You can download nxml-mode here. The latest file as of this writing is “nxml-mode-20041004.tar.gz”. Unzip the package into the standard emacs “site-lisp” directory (it’s /usr/share/emacs/site-lisp on my macbook).

Configure it to auto-load and bind to various file extension via the following configuration in your .emacs file:

(load “rng-auto.el”)
(add-to-list ‘auto-mode-alist
              (cons (concat “\\.” (regexp-opt ‘(“xml” “xsd” “sch” “rng” “xslt” “svg” “rss”) t) “\\'”)
                    ‘nxml-mode))
(setq magic-mode-alist
      (cons ‘(“<???xml ” . nxml-mode)
            magic-mode-alist))
(fset ‘xml-mode ‘nxml-mode)
(fset ‘html-mode ‘nxml-mode)

0

We took the girls to see Santa at the History Park this past weekend. They got to meet with Santa, did some art projects, rode a trolley as well as a handcar and posed for snapshots by their old dad. The highlight for the kids was when Santa arrived in this old fire truck. Santa was basically mobbed by the kids as soon as he stepped out of the truck!

It was the first time I’ve been to the place. The park houses and preserves quite a few Victorian buildings. It has a running cable car and a barn that contains countless historical artifacts from the gold rush era. There was this old cable car operator that was nice enough to indulge me and posed for a few pictures. Overall, it was a much more enjoyable alternative than going to the malls, at least for me anyway. Plus, the place was a goldmine of photo opps… 🙂


dec2008-11
dec2008-20
dec2008-25dec2008-1
dec2008-24dec2008-18
dec2008-30dec2008-1-2
dec2008-7dec2008-8