From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ethan Newsgroups: gmane.emacs.bugs Subject: bug#17947: 24.3; ruby-mode sets require-final-newline unconditionally Date: Sat, 5 Jul 2014 14:19:06 -0400 Message-ID: References: <87wqbrllwr.fsf@betacantrips.com> <83ionbekv1.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=047d7b6760023929b504fd7648bf X-Trace: ger.gmane.org 1404584424 24204 80.91.229.3 (5 Jul 2014 18:20:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 5 Jul 2014 18:20:24 +0000 (UTC) Cc: 17947@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Jul 05 20:20:17 2014 Return-path: Envelope-to: geb-bug-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 1X3UZM-0001d2-OY for geb-bug-gnu-emacs@m.gmane.org; Sat, 05 Jul 2014 20:20:16 +0200 Original-Received: from localhost ([::1]:43652 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X3UZM-0005AD-2H for geb-bug-gnu-emacs@m.gmane.org; Sat, 05 Jul 2014 14:20:16 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36452) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X3UZD-00056G-H1 for bug-gnu-emacs@gnu.org; Sat, 05 Jul 2014 14:20:12 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X3UZ8-0003ea-MJ for bug-gnu-emacs@gnu.org; Sat, 05 Jul 2014 14:20:07 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:53176) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X3UZ8-0003e3-Jm for bug-gnu-emacs@gnu.org; Sat, 05 Jul 2014 14:20:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1X3UZ8-0005HH-2g for bug-gnu-emacs@gnu.org; Sat, 05 Jul 2014 14:20:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Ethan Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 05 Jul 2014 18:20:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17947 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 17947-submit@debbugs.gnu.org id=B17947.140458437520233 (code B ref 17947); Sat, 05 Jul 2014 18:20:02 +0000 Original-Received: (at 17947) by debbugs.gnu.org; 5 Jul 2014 18:19:35 +0000 Original-Received: from localhost ([127.0.0.1]:44326 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X3UYh-0005GF-2A for submit@debbugs.gnu.org; Sat, 05 Jul 2014 14:19:35 -0400 Original-Received: from mail-vc0-f179.google.com ([209.85.220.179]:45019) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X3UYe-0005G2-0h for 17947@debbugs.gnu.org; Sat, 05 Jul 2014 14:19:32 -0400 Original-Received: by mail-vc0-f179.google.com with SMTP id id10so2504070vcb.24 for <17947@debbugs.gnu.org>; Sat, 05 Jul 2014 11:19:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=i3YZaZ1js7QV2Jq9j3ADkLO76AMu2b8QLK4iyQDrj9c=; b=t2ZJFxmAROpK71gksuw3cF53UttmQ+1DNXfQR1PVu4LOXWlJMMJvaj+EFFHw5XTibf kAfsRsSftbza6S4jFpo+sCHD+9KTXSrNxaSkc33+vKkWKVfSVN91b+LYUmnmdkHlpTTu 3XB1BfuwxMwWHW3JvFc3LgjX3GMAWw+Vznl6BO0EmUYHxa+GN4n1b5ilYWLrBPVAJxs0 F9VqlMY45AAL7vI50DveW0THXSbt8PNMUKpcECc2APktn0dY0PCiu63AZHBGKKXOM+nN unj58nR0TFreEYMUBOINr3G1wHdyg5y4GQmNDKFhAlLQgn+ayix2kghrVCUxE3jDbqEZ MGPQ== X-Received: by 10.58.149.170 with SMTP id ub10mr4019523veb.0.1404584366514; Sat, 05 Jul 2014 11:19:26 -0700 (PDT) Original-Received: by 10.58.142.3 with HTTP; Sat, 5 Jul 2014 11:19:06 -0700 (PDT) In-Reply-To: <83ionbekv1.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 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: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:91216 Archived-At: --047d7b6760023929b504fd7648bf Content-Type: text/plain; charset=UTF-8 The idea behind the package is that bad whitespace is highlighted, not automatically cleaned up. So if the file doesn't have a final newline when it is first loaded, no final newline will be added without explicit user action -- instead a red "eof" marker is placed where the final newline ought to be. require-final-newline obviously interferes with this. ethan-wspace could therefore set it to nil when it is operating, unconditionally. However, I added functionality to complain if require-final-newline was set -- not because *users* set it, but because *modes* do, and I wanted to get notice when that happened. So if you really think ruby-mode should unconditionally set require-final-newline, it's easy to remove the warning, make it optional, override require-final-newline on a buffer-local basis, etc. Ethan On Sat, Jul 5, 2014 at 2:11 PM, Eli Zaretskii wrote: > > From: Ethan Glasser-Camp > > Date: Sat, 05 Jul 2014 14:07:16 -0400 > > > > If ethan-wspace discovers that require-final-newline is set to t, it > > admonishes the user. > > Why does ethan-wspace need to admonish users for setting > require-final-newline? Can this be avoided? > --047d7b6760023929b504fd7648bf Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
The idea behind the package is that bad whitespace is= highlighted, not automatically cleaned up. So if the file doesn't have= a final newline when it is first loaded, no final newline will be added wi= thout explicit user action -- instead a red "eof" marker is place= d where the final newline ought to be.

require-final-newline obviously interferes with this. ethan-wspac= e could therefore set it to nil when it is operating, unconditionally. Howe= ver, I added functionality to complain if require-final-newline was set -- = not because *users* set it, but because *modes* do, and I wanted to get not= ice when that happened. So if you really think ruby-mode should uncondition= ally set require-final-newline, it's easy to remove the warning, make i= t optional, override require-final-newline on a buffer-local basis, etc.

Ethan



On Sat, Jul 5, 2014 at 2:11 PM, = Eli Zaretskii <eliz@gnu.org> wrote:
> From: Ethan Glasser-Camp <ethan.glasser.camp@gmail.com><= br> > Date: Sat, 05 Jul 2014 14:07:16 -0400
>
> If ethan-wspace discovers that require-final-newline is set to t, it > admonishes the user.

Why does ethan-wspace need to admonish users for setting
require-final-newline? =C2=A0Can this be avoided?

--047d7b6760023929b504fd7648bf--