From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#7497: problem about auto adding newline at the end of file Date: Sat, 27 Nov 2010 14:31:38 +0200 Message-ID: <83mxov54np.fsf@gnu.org> References: Reply-To: Eli Zaretskii NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE X-Trace: dough.gmane.org 1290861904 25961 80.91.229.12 (27 Nov 2010 12:45:04 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 27 Nov 2010 12:45:04 +0000 (UTC) Cc: 7497@debbugs.gnu.org To: =?UTF-8?Q?=E6=9D=8E=E9=93=B6=E7=92=A0?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Nov 27 13:44:58 2010 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PMK9B-0007p6-Go for geb-bug-gnu-emacs@m.gmane.org; Sat, 27 Nov 2010 13:44:57 +0100 Original-Received: from localhost ([127.0.0.1]:37283 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PMK9A-0006yp-Sz for geb-bug-gnu-emacs@m.gmane.org; Sat, 27 Nov 2010 07:44:56 -0500 Original-Received: from [140.186.70.92] (port=50819 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PMK95-0006yf-Qj for bug-gnu-emacs@gnu.org; Sat, 27 Nov 2010 07:44:52 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PMK94-0002we-Gd for bug-gnu-emacs@gnu.org; Sat, 27 Nov 2010 07:44:51 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:57151) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PMK94-0002wZ-Ds for bug-gnu-emacs@gnu.org; Sat, 27 Nov 2010 07:44:50 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1PMJpu-0004kM-26; Sat, 27 Nov 2010 07:25:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 27 Nov 2010 12:25:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 7497 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 7497-submit@debbugs.gnu.org id=B7497.129086067718212 (code B ref 7497); Sat, 27 Nov 2010 12:25:02 +0000 Original-Received: (at 7497) by debbugs.gnu.org; 27 Nov 2010 12:24:37 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PMJpU-0004jh-QQ for submit@debbugs.gnu.org; Sat, 27 Nov 2010 07:24:37 -0500 Original-Received: from mtaout22.012.net.il ([80.179.55.172]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PMJpR-0004jT-V3 for 7497@debbugs.gnu.org; Sat, 27 Nov 2010 07:24:35 -0500 Original-Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0LCJ00K00MGS2Q00@a-mtaout22.012.net.il> for 7497@debbugs.gnu.org; Sat, 27 Nov 2010 14:29:30 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([84.229.63.39]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0LCJ00JQYMP5W740@a-mtaout22.012.net.il>; Sat, 27 Nov 2010 14:29:30 +0200 (IST) In-reply-to: X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Sat, 27 Nov 2010 07:25:02 -0500 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:41925 Archived-At: > Date: Sat, 27 Nov 2010 18:53:17 +0800 > From: =E6=9D=8E=E9=93=B6=E7=92=A0 > Cc:=20 >=20 > My emacs does not behave as stated in the documentation, > http://www.gnu.org/software/emacs/manual/html_node/emacs/Customize-= Save.html#Customize-Save > . >=20 > In the documentation, it is said that, if require-final-newline is = set to > nil, no changes would be adapted to my files, leaving them not ende= d with > newline (0x0d0a). > My emacs, on the other hand, always adds newline at the end of file= , > automatically, even when I add (setq-default require-final-newline = nil); or > (setq require-final-newline nil);to .emacs. (I tried them both) >=20 > I don't know if it is a bug, or it is caused by my wrong operation.= I'm > using Ubuntu 10.10, emacs 23.1.1 I cannot reproduce this in Emacs 23.1. Please show a complete recipe= , starting with "emacs -Q", to reproduce this problem. One possibility is that you see this in a file that turns a major mod= e which uses mode-require-final-newline to set the buffer-local value o= f require-final-newline. In that case, you may wish to customize mode-require-final-newline, or maybe reset require-final-newline in a mode hook.