all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Andrea Corallo <acorallo@gnu.org>
To: Stefan Kangas <stefankangas@gmail.com>
Cc: "Eli Zaretskii" <eliz@gnu.org>,
	"Björn Lindström" <bkhl@elektrubadur.se>,
	71499@debbugs.gnu.org
Subject: bug#71499: [PATCH] Make whitespace.el cleanup add missing final newline
Date: Thu, 13 Jun 2024 03:38:42 -0400	[thread overview]
Message-ID: <yp1sexhjnr1.fsf@fencepost.gnu.org> (raw)
In-Reply-To: <CADwFkmnvPuxugjAA6MSve6q7sdd6zBm+Nbo+z9gJJ5emXA7vyw@mail.gmail.com> (Stefan Kangas's message of "Wed, 12 Jun 2024 12:38:57 +0000")

Stefan Kangas <stefankangas@gmail.com> writes:

> Eli Zaretskii <eliz@gnu.org> writes:
>
>>> I thought about that, but since whitespace-cleanup generally applies
>>> clean-up according to white-space style, I thought it was simply an
>>> oversight that it doesn't apply a fix when it is set to highlight
>>> missing end-of-file newline.
>>>
>>> Adding a separate way to configure this removes the simplicity of
>>> configuring your preferred whitespace-style as a single option.
>>>
>>> However, If you still disagree I can make another patch somehow
>>> maintains the old behaviour as the default, so just let me know.
>>
>> Let's see what others think, and take it from there.
>>
>> Stefan, Andrea: WDYT about this change?
>
> AFAIU, the purpose of whitespace.el is to detect and eventually fix
> incorrect whitespace, and it has two ways of doing this:
>
> - Visual highlighting
> - Commands to fix problems (`whitespace-report` and
>   `whitespace-cleanup).
>
> Since it is mostly configured in the centralized option,
> `whitespace-style`, it seems natural that if a user wants to detect
> `missing-newline-at-eof`, she would also want this to be fixed by
> `whitespace-cleanup`.  This seems even more natural given that
> `whitespace-report` already considers that a problem worthy of
> reporting.  IOW, I tend to agree that this not already being the case
> looks like an oversight.
>
> So I think the existing options are fine, and the patch could go in
> as-is, despite the fact that it is backwards-incompatible.  If users
> really hate it, I guess we will hear about it and can react.
>
> If we want to be really cautious, we might want to consider waiting with
> this change until Emacs 31.  That should provide ample time for people
> to notice the new behaviour and react.
>
> My two cents.

I'm as well for having the patch in, but I guess would be safer in 31 so
we have plenty of time to react if needed.

  Andrea





  reply	other threads:[~2024-06-13  7:38 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-11 18:16 bug#71499: [PATCH] Make whitespace.el cleanup add missing final newline Björn Lindström
2024-06-12  5:21 ` Björn Lindström
2024-06-12  7:46 ` Eli Zaretskii
2024-06-12  9:04   ` Björn Lindström
2024-06-12  9:41     ` Eli Zaretskii
2024-06-12 12:38       ` Stefan Kangas
2024-06-13  7:38         ` Andrea Corallo [this message]
2024-06-13  8:30           ` Eli Zaretskii
2024-06-14 12:23             ` Robert Pluim
2024-06-14 12:50               ` Eli Zaretskii
2024-06-20  7:55                 ` Stefan Kangas
2024-06-20  8:22                   ` Robert Pluim
2024-06-20  8:55                     ` Stefan Kangas
2024-06-20  9:45                       ` Robert Pluim
2024-06-20 11:23                         ` Stefan Kangas
2024-06-27  7:37             ` Eli Zaretskii
2024-06-29 11:59               ` Björn Lindström
2024-06-29 13:05                 ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=yp1sexhjnr1.fsf@fencepost.gnu.org \
    --to=acorallo@gnu.org \
    --cc=71499@debbugs.gnu.org \
    --cc=bkhl@elektrubadur.se \
    --cc=eliz@gnu.org \
    --cc=stefankangas@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.