EOL created by .write or .encode
Aidan Kehoe
kehoea at parhasard.net
Sat Apr 9 19:11:14 EDT 2005
Ar an naoiú lá de mí Aibréan, scríobh Xah Lee:
> If you open a file in emacs, it will open fine regardless whether the
> EOL is ascii 10 or 13. (unix or mac) This is a nice feature. However,
> the what-cursor-position which is used to show cursor position and the
> char's ascii code, says the EOL is ascii 10 when it is in fact ascii
> 13.
This _is_ the right thing to do--there’s no reason naive programs written in
Emacs Lisp should have to worry about different on-disk representations of
line-endings. If you want to open a file which uses \015 as its line
endings, and have those \015 characters appear in the buffer, open it using
a coding system ending in -unix. C-u C-x C-f /path/to/file RET
iso-8859-1-unix RET in XEmacs, something I don’t know but I’m certain exists
in GNU Emacs.
--
“I, for instance, am gung-ho about open source because my family is being
held hostage in Rob Malda’s basement. But who fact-checks me, or Enderle,
when we say something in public? No-one!” -- Danny O’Brien
More information about the Python-list
mailing list