Mailing List Archive


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

DOS/Mac/Unix Newlines . . . . . . . . (Re: [tlug] More joy with MMM Mode in XEmacs)



Jim writes:

 >    tr '\015' '\012'

Whether this is a good idea depends on whether he's going to send
the (modified) file back to the original author.

BTW, it occurred to me that there is one situation where Emacs will
use CR to separate lines, and that's in leaf-hiding modes like
outline-mode and hideif.  The CR tells redisplay to ignore the CR
itself, and everything up to the next line break.  Ie, a buffer
containing

    Header<CR>Line 1<CR>Line2<LF>

will appear in the editor window as

    Header

while

    Header<LF>Line 1<LF>Line2<LF>

will appear in the editor window as

    Header
    Line 1
    Line 2

Normally Emacs will save such a buffer to a file *only after
converting the <CR>s to <LF>s*, but in certain circumstances
(autosaves, crash recovery) I suppose that might not happen.

Of course this is a horrible hack, but I believe it goes way back to
the TECO version.




Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links