From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dave U. Random Newsgroups: gmane.emacs.help Subject: Re: Delete trailing CR? Date: Mon, 5 Nov 2012 17:33:30 +0100 (CET) Message-ID: References: NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1352134050 23181 80.91.229.3 (5 Nov 2012 16:47:30 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 5 Nov 2012 16:47:30 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Nov 05 17:47:40 2012 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TVPpr-0005g6-TS for geh-help-gnu-emacs@m.gmane.org; Mon, 05 Nov 2012 17:47:40 +0100 Original-Received: from localhost ([::1]:51783 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TVPpj-0001Lt-58 for geh-help-gnu-emacs@m.gmane.org; Mon, 05 Nov 2012 11:47:31 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:50694) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TVPcG-0006SW-7a for help-gnu-emacs@gnu.org; Mon, 05 Nov 2012 11:33:38 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TVPcC-0001JR-6K for help-gnu-emacs@gnu.org; Mon, 05 Nov 2012 11:33:36 -0500 Original-Received: from v220110691795706.yourvserver.net ([188.40.182.78]:40090 helo=whattheflag.info) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TVPcC-0001J5-08 for help-gnu-emacs@gnu.org; Mon, 05 Nov 2012 11:33:32 -0500 Original-Received: by whattheflag.info (Postfix, from userid 104) id 0E2F522E516; Mon, 5 Nov 2012 17:33:30 +0100 (CET) Comments: This message did not originate from the Sender address above. It was remailed automatically by anonymizing remailer software. Please report problems or inappropriate use to the remailer administrator at . In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 188.40.182.78 X-Mailman-Approved-At: Mon, 05 Nov 2012 11:47:25 -0500 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:87539 Archived-At: Hi Barry, > In article , > Anonymous 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