Darryl,
The patch certainly changes things. I can write the file now and
preserve the '0xD'. Trouble is, when I hexl-find-file, that `0xD' is
converted into a `0xA'. The underlying file is still OK. This whether
or not I use -vanilla. When I do, the file comes up in `Raw' mode, but
still does the switch on input. When I don't my default-major-mode,
which is text-mode, seems to determine that the coding will be ISO8.
The rest of the situation pertains: when I hexl-find-file the `0xD'
becomes `0xA', but when I write, things are OK.
I spoke too soon. When I describe the coding systems, I get this:
Coding system for saving this buffer:
ISO8:t -- iso-2022-8-mac
Default coding system (for new files):
ISO8 -- iso-2022-8
No no no, it's not true!
With -vanilla, the story is similar:
Coding system for saving this buffer:
Raw:t -- raw-text-mac
Default coding system (for new files):
ISO8 -- iso-2022-8
Jan asked for a recipe, and I just realized that I am now one step
removed from my original problem. This looks like a promising problem
in its own right, though.
Peter
Darryl Okahata wrote:
Jan Vroonhof <vroonhof(a)math.ethz.ch> wrote:
> "Peter B. West" <pbwest(a)netscape.net> writes:
>
> > Having earlier experienced under-the-bonnet changes of 0x0D to 0x0A when
> > using hexl-mode to edit a file, whose coding had been set to binary, I
> > have just re-compiled from the latest CVS sources, and the problem
> > persists. Did I mention that I compile --with-mule?
>
> This is of course an inexcusable bug. Can you give a recipe to
> reproduce? Note that you must specify the coding system before reading
> in the file.
The bug is caused by file-coding, the design of which is, well,
"very sub-optimal".
Try this patch (which I made long ago when I went mad while
venturing into the dark recesses of file-coding). I'm not sure it's
complete, though (you may need some C source code changes).
[ P.S. -- crypt.el is also broken. We talked about this a while back,
but I never got around to submitting any patches. ]
--
__ /__ Peter B. West pbwest(a)netscape.net
/
http://www.powerup.com.au/~pbwest
/ "Lord, to whom shall we go?"