Flymake for RELAX NG compact syntax

Inasmuch as the Wisent parsing and other CEDET/Speedbar/Semantic goodness for RELAX NG compact syntax files that I’m currently working on may not be ready for prime time for a while, here’s something to add to your .emacs so `flymake' runs Jing in the background to find syntax errors in your RELAX NG compact syntax files:

(require 'flymake)
(defun flymake-rnc-init ()
  (let* ((temp-file (flymake-init-create-temp-buffer-copy
		     'flymake-create-temp-inplace))
     	 (local-file (file-relative-name
		      temp-file
		      (file-name-directory buffer-file-name))))
    (list "jing" (list "-c" local-file))))
(add-to-list 'flymake-allowed-file-name-masks
      '(".+\\.rnc$"
	flymake-rnc-init
	flymake-simple-cleanup
	flymake-get-real-file-name))
(add-hook 'rnc-mode-hook
	  'flymake-mode)

xslide alive!

Inasmuch as you, like me, may have missed xslide’s “Template” menu when editing XSLT using Emacs’ nXML-mode, I’ve made available my “xslide2” XSLT mode for Emacs that I’ve been using for a while. This new xslide is a derived mode that uses nXML-mode for nearly everything and adds back some of the XSLT-specific parts of xslide.

Future development is happening on the Trac and Subversion for the xslide SourceForge project. See https://sourceforge.net/apps/trac/xslide/wiki/WikiStart.

X11 connection rejected because of wrong authentication

Inasmuch as using a frame from Emacs running on the laptop on the larger screen of the desktop machine using `make-frame-on-display' is one of life’s pleasures, it was less than a pleasure when it stopped working with a “X11 connection rejected because of wrong authentication” message after an upgrade of one of the machines.

Several upgrades and much thrashing later, the solution by Gregory Grubbs at http://gregorygrubbs.com/development/get-remote-x-working-in-karmic/ works for me, and the script in the fifth comment by Ben Hyde for running emacsclient makes things even easier than I was used to. Continue reading “X11 connection rejected because of wrong authentication”

Opening EPUB in Emacs

Inasmuch as there’s not, yet, an EPUB reader for Emacs, you can still set up Emacs to be able to open .epub files to see what’s inside them, since they are, after all, just ZIP files:

(setq auto-mode-alist
 (append
 (list
 '("\\.epub$" . archive-mode))
 auto-mode-alist))
(setq auto-coding-alist
 (append
 (list
 '("\\.epub$" . no-conversion))
 auto-coding-alist))