From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Andrea Corallo Newsgroups: gmane.emacs.bugs Subject: bug#71499: [PATCH] Make whitespace.el cleanup add missing final newline Date: Thu, 13 Jun 2024 03:38:42 -0400 Message-ID: References: <9453e7ef-dc31-4074-bba7-55a192313ccd@app.fastmail.com> <86tthy1u37.fsf@gnu.org> <86cyom1os2.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25759"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Eli Zaretskii , =?UTF-8?Q?Bj=C3=B6rn_?= =?UTF-8?Q?Lindstr=C3=B6m?= , 71499@debbugs.gnu.org To: Stefan Kangas Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jun 13 09:39:26 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1sHf3N-0006N1-QP for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 13 Jun 2024 09:39:25 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sHf32-0008C5-Rg; Thu, 13 Jun 2024 03:39:04 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sHf31-0008Bx-6i for bug-gnu-emacs@gnu.org; Thu, 13 Jun 2024 03:39:03 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sHf30-0003Uu-T6 for bug-gnu-emacs@gnu.org; Thu, 13 Jun 2024 03:39:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sHf30-0004Uu-28 for bug-gnu-emacs@gnu.org; Thu, 13 Jun 2024 03:39:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Andrea Corallo Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 13 Jun 2024 07:39:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 71499 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 71499-submit@debbugs.gnu.org id=B71499.171826434117278 (code B ref 71499); Thu, 13 Jun 2024 07:39:01 +0000 Original-Received: (at 71499) by debbugs.gnu.org; 13 Jun 2024 07:39:01 +0000 Original-Received: from localhost ([127.0.0.1]:59110 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sHf2y-0004UY-9N for submit@debbugs.gnu.org; Thu, 13 Jun 2024 03:39:00 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:40036) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sHf2v-0004U7-T3 for 71499@debbugs.gnu.org; Thu, 13 Jun 2024 03:38:58 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sHf2p-0003Ru-K4; Thu, 13 Jun 2024 03:38:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=6h4og7P64Eao8PVMhIoaxxPxxYg1GW21wtqZyiVknRU=; b=fiBQ1K+mM2I3CP3ps4EW p7awu27DYkJSHMvV1GfABcIY5yRet/LRg7+72y0uXK+4EKEbrb+PrnV29lP8OpIfz29wk4az3aLqQ zcIU/X3VD5+e+hlEoEDhCTnqdSoWsrMKHYrMU1bGUN3XBpG8ZQwvDyTIQrN4OFH6XFge/+GJa87yY K2UDh/44AvBItVWbbOG5Z99M4RfBDYc0U2fWbxjMw4I8STWbiXmhd6JUTZMkwyptpw0HU/TKFRV/5 BpLc68PtWWmKOtxIQB1DC/b9SfRjjBZOaa0bH8M57c8GNgpsm0IxRnYSClLgoF/mgDH6Z85xuYrWt bi0s4crth6yngQ==; Original-Received: from acorallo by fencepost.gnu.org with local (Exim 4.90_1) (envelope-from ) id 1sHf2g-0004h0-Ez; Thu, 13 Jun 2024 03:38:50 -0400 In-Reply-To: (Stefan Kangas's message of "Wed, 12 Jun 2024 12:38:57 +0000") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:287183 Archived-At: Stefan Kangas writes: > Eli Zaretskii 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