GNU bug report logs - #17947
24.3; ruby-mode sets require-final-newline unconditionally

Previous Next

Package: emacs;

Reported by: Ethan Glasser-Camp <ethan.glasser.camp <at> gmail.com>

Date: Sat, 5 Jul 2014 18:09:01 UTC

Severity: minor

Found in version 24.3

Done: Stefan Monnier <monnier <at> iro.umontreal.ca>

Bug is archived. No further changes may be made.

Full log


Message #14 received at 17947 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Ethan <ethan.glasser.camp <at> gmail.com>
Cc: 17947 <at> debbugs.gnu.org
Subject: Re: bug#17947: 24.3;
 ruby-mode sets require-final-newline unconditionally
Date: Sat, 05 Jul 2014 21:38:28 +0300
> From: Ethan <ethan.glasser.camp <at> gmail.com>
> Date: Sat, 5 Jul 2014 14:19:06 -0400
> Cc: 17947 <at> debbugs.gnu.org
> 
> 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.

It seems to me that if the buffer being checked has
require-final-newline set to a non-nil value, ethan-wspace should
simply refrain from checking the final newline, because obviously the
user and/or the mode took control of that issue.  Wouldn't this be
better than bitching at users for setting this option?

And I don't think introducing yet another option would solve it.  If
the user or mode set require-final-newline, IMO that is a clear
declaration that the final newline issue is that user's or mode's
responsibility; no further options are needed to make that clear.
Don't you agree?




This bug report was last modified 10 years and 324 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.