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

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

Re: decode_eol and inconsistent EOL


From: Stefan Monnier
Subject: Re: decode_eol and inconsistent EOL
Date: 26 Apr 2002 09:00:20 -0400
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2.50

>> I'd like to see a cleverer setting of the eol_type.  If almost all of
>> the lines have a particular eol style, use that instead of falling back
>> to CODING_EOL_LF after a single bad line.
> That kind of heuristic is bound to trip some people, I think.  It's
> difficult to set a threshold that will suit everyone.  It's also
> difficult for users to set such a threshold, if we give them an
> option.
> Can't your problem be solved with "C-x RET c dos RET" before the
> command that gives you the trouble?

I think all that we really care about is that the load+save trip is safe
and that the content of the Emacs buffer looks "as right as possible".

In Stephen's case, clearly CRCRLF should be consider as CR+eol and there
does not need to be any heuristic for that.  It's perfectly safe and can
only be the right choice for the internal representation.

I.e. if all LF are preceded by a CR we should use "dos-eol" whether or
not those CRs are sometimes preceded by other CRs.


        Stefan



reply via email to

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