[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: What does `undecided' do for encoding text?

From: Stefan Monnier
Subject: Re: What does `undecided' do for encoding text?
Date: Mon, 16 Feb 2009 08:47:08 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.90 (gnu/linux)

>>>> It looks like `undecided' works the same as `raw-text' for encoding
>>>> text.  Is that true in general?
>> > Yes.  More exactly, it is the same as `raw-text-unix'.
>> Which I prefer calling `binary'.

> What do you mean by "calling"?

> raw-text-unix and binary are different when
> coding-system-change-text-conversion and
> coding-system-change-eol-conversion are called.

Good point, I tend to forget about this.  But in the context of "how is
`undecided' treated during write", this doesn't make any difference.

>>>> I think this should be reflected in the ELisp manual.
>> > I don't think so because it is just a fallback behavior, and
>> > Elisp programmer should avoid specifying `undecided' on
>> > encoding.

>> Then why do we even allow it?  We should signal an error.

> It seems difficult to find a good point of signaling an
> error.  At least, visiting an ascii only file, inputting
> ascii only, and saving it should be a valid operation.  At
> that time, buffer-file-coding-system is undecided-unix.

Then an error should only be signalled when we end up trying to encode
a non-ASCII char.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]