From: Conrad Taylor <conradwt(a)yahoo.com>
How are you doing?
I am almost there. I had to define a printer driver with no spaces in
its name. I'm still unable to print (I get an lseek error) with (setq
lpr-command ""), but (setq lpr-command "print") works, except for
using
the wrong write-coding system.
I was wondering, what directory
should one place the file, dos-w32.el? If this needs
to be compiled, how does one compile it?
Put it anywhere in your load-path. You don't need to compile it, but
you can use byte-compile-file if you want to. You'll need to define
subst-char-in-string (this definition was taken from FSF emacs 20.4
subr.el)
(defun subst-char-in-string (fromchar tochar string &optional inplace)
"Replace FROMCHAR with TOCHAR in STRING each time it occurs.
Unless optional argument INPLACE is non-nil, return a new string."
(let ((i (length string))
(newstr (if inplace string (copy-sequence string))))
(while (> i 0)
(setq i (1- i))
(if (eq (aref newstr i) fromchar)
(aset newstr i tochar)))
newstr))
You may also need to do something about...
(or (eq coding-system-for-write 'no-conversion)
(setq coding-system-for-write
(aref eol-type 1)))
...because an eol-type of nil can't be aref'd.