CLOS / MOP discussion archives for Thunderbird
From: Pascal Costanza (costanza_at_web.de)
Date: Thu, 25 Nov 2004 18:04:05 +0100
The ftp site ftp://parcftp.xerox.com/pub/pcl/ contains an archive of
what seems to be the original mailing list for the designers of CLOS and
its MOP. There is a lot of information contained in it that explains the
ideas and rationale behind the design decisions.
The problem with that archive is that it is stored in a format that
doesn't seem to comply with current mailbox formats. A friend of mine
(Axel Katerbau from http://www.objectpark.net/ ) has some experience
with such formats, and so has written one of his first Lisp programs to
convert the format of that archive to one that is accepted by
Thunderbird / Mozilla. The conversion is not perfect, but makes the
archive much more readable. (Unfortunately, the conversion doesn't work
well for Apple Mail, and probably other mail clients.)
Anyway, here is the program for doing the conversion (I have polished it
a bit). I hope this is helpful to some.
(defun received-line-p (line)
"Test whether it's a line beginning with Received: "
(eql (search "Received: " line) 0))
(defun copy-header (input output)
"Read rest of message header"
(loop for line = (read-line input nil "")
until (equal line "")
do (format output "~A~%" line)))
(defun from-quoted-body-line (line)
(if (eql (search "From " line) 0)
(format nil ">~A" line)
(defun convert-ml (path)
"Converts a strange mailinglist archive (e.g. mob.text)
at the given path into mbox format (<path>.mbox)"
(with-open-file (input path :direction :input)
(with-open-file (output (format nil "~A.mbox" path)
:direction :output :if-exists :supersede)
(loop for line = (read-line input nil 'eof)
until (eq line 'eof)
if (received-line-p line)
(format output "From <new msg marker>~%~A~%" line)
(copy-header input output)
(format output "~%"))
else do (format output "~A~%"
-- Tyler: "How's that working out for you?" Jack: "Great." Tyler: "Keep it up, then."