programming
Compilation queue (cq.el)
By voyager - Posted on October 6th, 2008
The following is part of my home-grown compilation environment in emacs.
(defvar funclist) (defvar cq-compilation-started 'nil) (defun cg-init () (setq compilation-finish-functions 'cq-call) ;; this function called when compilation has finished - see compile.el (setq compilation-exit-message-function (lambda (status code msg) ;; If M-x compile exists with a 0 (when (and (eq status 'exit) (zerop code)) ;; then bury the *compilation* buffer, so that C-x b doesn't go there (bury-buffer "*compilation*")
XML processing in Elisp
By voyager - Posted on August 26th, 2008
Recent versions Emacs has built in xml support, and there are libraries available that give you DOM and even XPath capabilities. I've started experimenting with it as I want to process Eclipse Workspaces. Ideally, I should be using XPath, but that has too many dependencies for now (it depends on parts of Semantic).
So, using the xml-parse examples on EmacsWiki.org, here is some simple code to get a the "userid" attibutes from all the "to" elements of the following xml data:
<?xml version="1.0" encoding="ISO-8859-1"?> <note topic="weekend plans"> <to userid="1">Tove</to> <from userid="2">Jani</from> <heading>Reminder</heading> <body>Don't forget me this weekend!</body> <to userid="3">Bob</to> <from userid="4">Sammy</from> <heading>Alas!</heading> <body>A new week!</body> </note>
Compiling Emacs
By voyager - Posted on August 12th, 2008
So, I'm back to trying to compile emacs-nt again, having discovered that the required W32 headers are in fact conveniently supplied by Mingw (albeit in a different package). Now I'm getting an "Unknown Processor" error. gcc -dumpmachine tells me I have an arm processor on my PC... perhaps this is the problem o_0
UPDATE: It turns out the Symbian SDK also provides a gcc, and this was in my path before the Mingw one. Hence the strange architecture.
