help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: set-buffer-file-coding-system and list-coding-systems


From: Eli Zaretskii
Subject: Re: set-buffer-file-coding-system and list-coding-systems
Date: Sat, 15 Mar 2008 16:58:11 +0200

> From: Xah Lee <xah@xahlee.org>
> Date: Fri, 14 Mar 2008 21:25:15 -0700 (PDT)
> 
> when i use “M-x set-buffer-file-coding-system RET unix” to turn a
> file's line ending from classic mac or dos to unix. However, when i
> use list-coding-systems, i see no value that is unix, mac, or dos.

That's because `unix' is an alias for `undecided-unix'; try "C-h C
unix RET".  list-coding-systems only shows the basic encodings, not
all their aliases.

> I'm a bit confused by this, and the fact that emacs coding systems
> seems to marry file encoding with line ending.

EOL format is an orthogonal feature of encoding the text.  The reason
it is part of coding systems is because conceptually writing a file
in, say, DOS format converts text from the Emacs internal format
(where each line ends in a single Newline character) into external
format, where each line ends with a CR-LF pair of characters.  Such
conversions are at the heart of coding systems.





reply via email to

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