GNU bug report logs - #25157
26.0.50; whitespace-cleanup does not remove single trailing empty line anymore

Previous Next

Package: emacs;

Reported by: Mark Karpov <markkarpov <at> openmailbox.org>

Date: Sat, 10 Dec 2016 14:43:02 UTC

Severity: normal

Tags: confirmed, fixed

Found in version 26.0.50

Fixed in version 26.1

Done: npostavs <at> users.sourceforge.net

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Reuben Thomas <rrt <at> sc3d.org>
To: Noam Postavsky <npostavs <at> users.sourceforge.net>
Cc: Mark Karpov <markkarpov <at> openmailbox.org>, 25157 <at> debbugs.gnu.org
Subject: bug#25157: 26.0.50; whitespace-cleanup does not remove single trailing empty line anymore
Date: Wed, 21 Dec 2016 11:07:12 +0000
[Message part 1 (text/plain, inline)]
On 21 December 2016 at 04:07, <npostavs <at> users.sourceforge.net> wrote:

>
> Sorry I didn't get around to looking at this before you wrote a patch,
> but I think you're overthinking this.


I confirm that your patch seems to work, thanks very much. Adding some
tests is particularly helpful: if I'd done that, I wouldn't have gotten in
this mess in the first place!

How can one overthink a logical problem? It's possible to underthink, but
in this case, I believe I misunderstood what the
whitespace-empty-at-eob-regexp was supposed to match: only empty lines, not
trailing space at the end of non-empty lines (as one of your comments
mentions). (I was trying to make it match ALL the whitespace at the end of
the buffer, as you probably realised.)

The only thing I'd change in your match is, as in mine, remove the FIXME
after save-match-data.​
[Message part 2 (text/html, inline)]

This bug report was last modified 8 years and 201 days ago.

Previous Next


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