On 10/3/26 14:38, Gavin Smith wrote:
The claim that files should CRLF line endings should always be treated the
same as LF line endings appears to be based on wishful thinking rather than
reflecting common practice.

I made no claim about "common practice". My claim is that "best practice"
is to treat LF and CRLF the same in most cases. There may be some cases where
compatibility or historical or other reasons make that difficult,
but I don't think there are any such reasons that apply for texinfo source 
files.

What is the alternative? Is there any reason for a texinfo-processing program
to handle CRLF differently from LF?

If you prefer you can treat this as a special case of white-space at the end of 
lines:
If a program acts differently based on what kind if any invisible white-space 
there is
at the end of a line, that is a design flaw. Example: if a program uses 
backslash-newline
as a line-continuation indicator, it should allow and ignore arbitrary 
horizontal white-space
(space, tab, or cr) after the backslash.

All the text editors I tried (emacs, gedit, kate, vim - on Fedora) silently 
open files
with CRLF line endings, silently removing the CR.  I.e. cursor motion
does not act as if there is an extra white-space character at the end of each 
line.

Output files are a different matter. Generally, I believe it is OK to write
output files using just LF even on Windows. (However, I don't have enough
Windows experience to be sure,)
--
        --Per Bothner
[email protected]   http://per.bothner.com/


Reply via email to