From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#71499: [PATCH] Make whitespace.el cleanup add missing final newline Date: Wed, 12 Jun 2024 10:46:52 +0300 Message-ID: <86tthy1u37.fsf@gnu.org> References: <9453e7ef-dc31-4074-bba7-55a192313ccd@app.fastmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="33420"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 71499@debbugs.gnu.org To: =?UTF-8?Q?Bj=C3=B6rn_?= =?UTF-8?Q?Lindstr=C3=B6m?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Jun 12 09:48:24 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 1sHIiV-0008XA-7u for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 12 Jun 2024 09:48:23 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sHIiC-0003dd-JP; Wed, 12 Jun 2024 03:48: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 1sHIiB-0003dU-DF for bug-gnu-emacs@gnu.org; Wed, 12 Jun 2024 03:48: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 1sHIiB-0001mX-6W for bug-gnu-emacs@gnu.org; Wed, 12 Jun 2024 03:48:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sHIi9-0004Zq-Sc for bug-gnu-emacs@gnu.org; Wed, 12 Jun 2024 03:48:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 12 Jun 2024 07:48: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.171817842217531 (code B ref 71499); Wed, 12 Jun 2024 07:48:01 +0000 Original-Received: (at 71499) by debbugs.gnu.org; 12 Jun 2024 07:47:02 +0000 Original-Received: from localhost ([127.0.0.1]:37461 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sHIhC-0004Yh-AA for submit@debbugs.gnu.org; Wed, 12 Jun 2024 03:47:02 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:49962) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sHIhA-0004YC-KC for 71499@debbugs.gnu.org; Wed, 12 Jun 2024 03:47:01 -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 1sHIh6-0001XY-5y; Wed, 12 Jun 2024 03:46:56 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=SzMp2V43CWp/NuLI+u5A7B3Nku9LeCgLsda1uvK35qs=; b=lGYoebTYf/MNd32B/3Ui YswCSwA/qpIKoDgOmIV9ojRHmsGVRyoIR2irAjPwcmcGBQwIsR6YO6JN8WY3KWqhqEasaM5+U3TqW NambmMlHGr4wbF6emUchlhJA7sgqtGOtXHDU8/GlX8IMklBselC8pzTA2inX44XHLkFe5hELyggPC YcuKGb6wlD81ew/oedbyEt//MIm9vmir/teJjmB4tfS64fy/PPCu0FnYaAySR3otD43mOeCn1xTeB T3OmNMTaaSRwff1d2VDlfY2XiD2OhokW61EY2UXSaMRn2dYtU6dLX6u5rL6PcR0HcOJlh5yL3Y2KQ OmNlO1gCq+5g8w==; In-Reply-To: <9453e7ef-dc31-4074-bba7-55a192313ccd@app.fastmail.com> (message from =?UTF-8?Q?Bj=C3=B6rn_?= =?UTF-8?Q?Lindstr=C3=B6m?= on Tue, 11 Jun 2024 20:16:03 +0200) 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:287138 Archived-At: > Date: Tue, 11 Jun 2024 20:16:03 +0200 > From: Björn Lindström > > 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. This is an incompatible change of behavior on behalf of whitespace-cleanup, so I don't think we can accept it as in this patch (or the next one you sent). Se we'd need some new user option, by default off, to turn on this new feature. Or maybe a new action for whitespace-action? Thanks.