[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Delete trailing CR?
From: |
Barry Margolin |
Subject: |
Re: Delete trailing CR? |
Date: |
Fri, 02 Nov 2012 11:53:13 -0400 |
User-agent: |
MT-NewsWatcher/3.5.3b3 (Intel Mac OS X) |
In article <mailman.12153.1351870877.855.help-gnu-emacs@gnu.org>,
Anonymous <nobody@slug.slugish.net> 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.
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.
--
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***