[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: why unrmail fails with raw-text on version 22 [WAS: Re: help needed
Re: why unrmail fails with raw-text on version 22 [WAS: Re: help needed with coding systems (unrmail problems)]
Sun, 09 Jan 2011 03:25:11 -0500
> Date: Sat, 08 Jan 2011 21:52:27 -0800
> From: Mark Lillibridge <address@hidden>
> Reply-To: address@hidden
> ;; Read in the old Rmail file with no decoding.
> (let ((coding-system-for-read 'raw-text))
> (insert-file-contents file))
> ;; But make it multibyte.
> (set-buffer-multibyte t)
> (setq buffer-file-coding-system 'raw-text-unix)
> Not obvious, but important: with-temp-buffer creates a multibyte buffer
> so that insert-file-contents is decoding from raw-text to a multibyte
> buffer, producing raw 8-bit bytes for x80-xff.
But doesn't insert-file-contents make the buffer unibyte due to the
fact that raw-text is being used for decoding?
> My testing so far shows that this problem can be fixed for version
> 22 by switching to the Rmail way of doing things (e.g., read unibyte and
> only convert to multibyte at the end). A more complicated solution will
> be needed for version 23. Should I produce a patch for version 22 given
> that it will not work for version 23?
Version 22 is no longer maintained, so providing patches for it would
be pointless, especially as Emacs 23 has fundamentally changed the way
raw bytes are represented and handled.
Emacs 23.3 is in pretest, so if you hurry, you could get the fix into
it (and into all the later versions).