GNU bug report logs - #71499
[PATCH] Make whitespace.el cleanup add missing final newline

Previous Next

Package: emacs;

Reported by: Björn Lindström <bkhl <at> elektrubadur.se>

Date: Wed, 12 Jun 2024 04:45:01 UTC

Severity: normal

Tags: patch

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#71499: closed ([PATCH] Make whitespace.el cleanup add missing
 final newline)
Date: Sat, 29 Jun 2024 13:06:01 +0000
[Message part 1 (text/plain, inline)]
Your message dated Sat, 29 Jun 2024 16:05:23 +0300
with message-id <86msn3j3vw.fsf <at> gnu.org>
and subject line Re: bug#71499: [PATCH] Make whitespace.el cleanup add missing final newline
has caused the debbugs.gnu.org bug report #71499,
regarding [PATCH] Make whitespace.el cleanup add missing final newline
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
71499: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=71499
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Björn Lindström <bkhl <at> elektrubadur.se>
To: bug-gnu-emacs <at> gnu.org
Subject: [PATCH] Make whitespace.el cleanup add missing final newline
Date: Tue, 11 Jun 2024 20:16:03 +0200
[Message part 3 (text/plain, inline)]
Hello,

attaching patch to make the whitespace-cleanup and whitespace-cleanup-region functions add a final newline to a file if whitespace-style contains `missing-newline-at-eof

I'm aware this somewhat replicates what setting `require-final-newline would do, but I think since whitespace.el with this configuration highlights this as an error, it should also clean it up when asked.

Best wishes,
Björn
[0001-Make-whitespace.el-cleanup-add-missing-final-newline.patch (text/x-patch, attachment)]
[Message part 5 (message/rfc822, inline)]
From: Eli Zaretskii <eliz <at> gnu.org>
To: Björn Lindström <bkhl <at> elektrubadur.se>
Cc: 71499-done <at> debbugs.gnu.org
Subject: Re: bug#71499: [PATCH] Make whitespace.el cleanup add missing final
 newline
Date: Sat, 29 Jun 2024 16:05:23 +0300
> Date: Sat, 29 Jun 2024 13:59:03 +0200
> From: Björn Lindström <bkhl <at> elektrubadur.se>
> 
> updated patch attached, which ads a note to NEWS, and has a changed implementation of the insertion of missing newline inspired by the one from files.el. It's still slightly different to account for it also being possible to use on a region.
> 
> This time there's also an added test.

Thanks, installed on the master branch, and closing the bug.


This bug report was last modified 1 year and 22 days ago.

Previous Next


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