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

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

Re: Delete trailing CR?


From: Dave U . Random
Subject: Re: Delete trailing CR?
Date: Mon, 5 Nov 2012 17:33:30 +0100 (CET)

Hi Barry,

> In article <address@hidden>,
>  Anonymous <address@hidden> wrote:
> 
> > Hi. In Emacs how do I edit a file without Emacs adding a 0a byte to the end?
> > And how do I delete that character if it is already in the file? 
> > M-x delete-trailing-whitespace leaves this character at the end of the file.
> > Thank you.
> 
> That's not a CR (CR is 0d), it's an LF, i.e. newline.  The variable you 
> want to customize is require-final-newline.

Thanks alot on both counts!

> But why would you want to remove it? Text files should be a sequence of 
> lines, and each line should end with a newline. Some programs don't 
> process the last line correctly if it doesn't end with a newline.

I was working on test data and I needed to check files of certain
lengths. Before I read your reply I accomplished it by using hexl-mode and
changing the last character to data.

Thanks for the info for future use!

Chuck




reply via email to

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