From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?UTF-8?Q?=E6=9D=8E=E9=93=B6=E7=92=A0?= Newsgroups: gmane.emacs.bugs Subject: bug#7497: problem about auto adding newline at the end of file Date: Fri, 3 Dec 2010 14:27:36 +0800 Message-ID: References: <83mxov54np.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=485b3973e9d76b5d4b04967ba2ec X-Trace: dough.gmane.org 1291358725 14783 80.91.229.12 (3 Dec 2010 06:45:25 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 3 Dec 2010 06:45:25 +0000 (UTC) Cc: 7497@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Dec 03 07:45:20 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 1POPOR-0001hx-O9 for geb-bug-gnu-emacs@m.gmane.org; Fri, 03 Dec 2010 07:45:20 +0100 Original-Received: from localhost ([127.0.0.1]:34200 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1POPOR-00008Q-0w for geb-bug-gnu-emacs@m.gmane.org; Fri, 03 Dec 2010 01:45:19 -0500 Original-Received: from [140.186.70.92] (port=38919 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1POPOK-00008J-PZ for bug-gnu-emacs@gnu.org; Fri, 03 Dec 2010 01:45:14 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1POPOJ-0005tV-Is for bug-gnu-emacs@gnu.org; Fri, 03 Dec 2010 01:45:12 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:49958) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1POPOJ-0005tQ-FH for bug-gnu-emacs@gnu.org; Fri, 03 Dec 2010 01:45:11 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1POP1t-0007rc-Sp; Fri, 03 Dec 2010 01:22:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: =?UTF-8?Q?=E6=9D=8E=E9=93=B6=E7=92=A0?= Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 03 Dec 2010 06:22:01 +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.129135731630213 (code B ref 7497); Fri, 03 Dec 2010 06:22:01 +0000 Original-Received: (at 7497) by debbugs.gnu.org; 3 Dec 2010 06:21:56 +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 1POP1o-0007rG-A1 for submit@debbugs.gnu.org; Fri, 03 Dec 2010 01:21:56 -0500 Original-Received: from mail-wy0-f172.google.com ([74.125.82.172]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1POP1m-0007qv-0k for 7497@debbugs.gnu.org; Fri, 03 Dec 2010 01:21:54 -0500 Original-Received: by wyf23 with SMTP id 23so8337200wyf.3 for <7497@debbugs.gnu.org>; Thu, 02 Dec 2010 22:27:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=aho3+7SPor6QGZgemIoLbcuwUaMJeyo505Ce8Ub+Tww=; b=qmvNZ8Hc4JI4DoDnKRjHQ5cHZOJOUdnbLkL99MdA6IuhudPUKqWzbswpNW4pm4JLmj 5IEnZwAQbHnETEPF84pgSSnNCBejyxgbZg0bYthrIMU8Q9w3c/IyRj/QDI/5jtWvHMkZ XDg+Y+fSbyQD+CY1xmL7RMjLePESBm+VqWmUA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=h4jL62ei70jeY0v6KKlrjs27qCmi1xGq2X8I17EeOZmNwLFTitpqPVUzCcq/f3pjwE xj5IdIj+DfzLFr6IPjAd1Fw9SY1jmMcDGvUZZb840D8hBLwf/onP9kZcJrRoqDxyOj1a NnNvmovWOWvbA0jXg2PNcg4/AqBrknP8OimIk= Original-Received: by 10.227.196.7 with SMTP id ee7mr1407628wbb.10.1291357656931; Thu, 02 Dec 2010 22:27:36 -0800 (PST) Original-Received: by 10.227.146.69 with HTTP; Thu, 2 Dec 2010 22:27:36 -0800 (PST) In-Reply-To: <83mxov54np.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Fri, 03 Dec 2010 01:22:01 -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:42094 Archived-At: --485b3973e9d76b5d4b04967ba2ec Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Dear sir/lady, I have fixed my problem. It turned out to be no bug. It was a major mode that use mode-require-final-newline. Thank you very muc= h for your instructions. I used almost one week to understand the instruction= s (I was quite new to emacs). Sorry if I wasted your time. On Sat, Nov 27, 2010 at 8:31 PM, Eli Zaretskii wrote: > > Date: Sat, 27 Nov 2010 18:53:17 +0800 > > From: =E6=9D=8E=E9=93=B6=E7=92=A0 > > Cc: > > > > My emacs does not behave as stated in the documentation, > > > http://www.gnu.org/software/emacs/manual/html_node/emacs/Customize-Save.h= tml#Customize-Save > > . > > > > 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 ended wi= th > > 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) > > > > 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 mode > which uses mode-require-final-newline to set the buffer-local value of > 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. > --485b3973e9d76b5d4b04967ba2ec Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Dear sir/lady,
I have fixed my problem. It turned out to be no bug.
= It was a major mode that use mode-require-final-newline. Thank you very muc= h for your instructions. I used almost one week to understand the instructi= ons (I was quite new to emacs).
Sorry if I wasted your time.

On Sat, Nov = 27, 2010 at 8:31 PM, Eli Zaretskii <eliz@gnu.org> wrote:
> Date: Sat, 27 Nov 2010 18:53:17 +0800
> From: =E6=9D=8E=E9=93=B6=E7=92=A0 <linfeixb27@gmail.com>
> Cc:
>
> My emacs does not behave as stated in the documentation,
> http://www.gnu.org/soft= ware/emacs/manual/html_node/emacs/Customize-Save.html#Customize-Save > .
>
> 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 ended w= ith
> 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)
>
> 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. =C2=A0Please 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 mode
which uses mode-require-final-newline to set the buffer-local value of
require-final-newline. =C2=A0In that case, you may wish to customize
mode-require-final-newline, or maybe reset require-final-newline in a
mode hook.

--485b3973e9d76b5d4b04967ba2ec--