From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?Bj=C3=B6rn_?= =?UTF-8?Q?Lindstr=C3=B6m?= Newsgroups: gmane.emacs.bugs Subject: bug#71499: [PATCH] Make whitespace.el cleanup add missing final newline Date: Wed, 12 Jun 2024 11:04:18 +0200 Message-ID: References: <9453e7ef-dc31-4074-bba7-55a192313ccd@app.fastmail.com> <86tthy1u37.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34562"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Cyrus-JMAP/3.11.0-alpha0-515-g87b2bad5a-fm-20240604.001-g87b2bad5 Cc: 71499@debbugs.gnu.org To: "Eli Zaretskii" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Jun 12 11:05:29 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 1sHJv7-0008ia-G3 for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 12 Jun 2024 11:05:29 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sHJum-0003Yv-Sx; Wed, 12 Jun 2024 05:05:09 -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 1sHJui-0003Yh-0I for bug-gnu-emacs@gnu.org; Wed, 12 Jun 2024 05:05:04 -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 1sHJuh-00077v-OG for bug-gnu-emacs@gnu.org; Wed, 12 Jun 2024 05:05:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sHJug-0006ej-D3 for bug-gnu-emacs@gnu.org; Wed, 12 Jun 2024 05:05:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: =?UTF-8?Q?Bj=C3=B6rn_?= =?UTF-8?Q?Lindstr=C3=B6m?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 12 Jun 2024 09:05:02 +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.171818308525549 (code B ref 71499); Wed, 12 Jun 2024 09:05:02 +0000 Original-Received: (at 71499) by debbugs.gnu.org; 12 Jun 2024 09:04:45 +0000 Original-Received: from localhost ([127.0.0.1]:37574 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sHJuP-0006dz-BL for submit@debbugs.gnu.org; Wed, 12 Jun 2024 05:04:45 -0400 Original-Received: from fhigh3-smtp.messagingengine.com ([103.168.172.154]:41751) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sHJuO-0006do-Dd for 71499@debbugs.gnu.org; Wed, 12 Jun 2024 05:04:44 -0400 Original-Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailfhigh.nyi.internal (Postfix) with ESMTP id 17833114012B; Wed, 12 Jun 2024 05:04:40 -0400 (EDT) Original-Received: from imap43 ([10.202.2.93]) by compute3.internal (MEProxy); Wed, 12 Jun 2024 05:04:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pobox.com; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm3; t=1718183080; x=1718269480; bh=c2NzxXkOkdPARn9Tgcz0W1QxWEpXZbvZ/XXJBoAoX7U=; b= qei9+A/NVIQxGrmJ3R2OwL2akFUAPB69mtesGps9dvjEc0oDefnC6/i3+U00SnbL IVw8e/XN4B52KDd1CKsXB5WBOdlDN6M5NkoumytRtbULjKdWzPFSAQeMW+Kanvs8 oJQjsQaKRiH7/IXEmVmliZQ8jvspRf2Q97b+xx+AUXLVkqcfwxAvtSqZN7znIG9d Snyw0oTOJTuvR/2V1Xt7/0ygUvumcmUNdbn+iZRCYqkXsKKh9KM0JigX3LjKEMVr fWy1HNsb1CK1PaYlG9LL+zxTdQjauSKjzRKLeYqHH3D4oVDS31dZnvfgTqdxdC3N hU6sQY5OB3pjiwWmsYLbEw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1718183080; x= 1718269480; bh=c2NzxXkOkdPARn9Tgcz0W1QxWEpXZbvZ/XXJBoAoX7U=; b=L DutV0FHEvUP7SnQORvAhN8AyNR39T402IwkxuiWr9l3RDm6iB8amnaqr0+KRC3iQ vcQveKVQhp1498rOhEW6c27SwcL2Eh620JhfZfwd2V3sjzU8ZGpaiF/OCqUU6i32 xnNBBFhDb5FmwntLs6osvCEtqQgLic6Sy9Iiza1RxtunyTC+C9Mh6FwzCEaghhEQ HCLoFBb6H3OzrZ+qFNR2X937m6ExM+21CYagWOJbvC7/GS6iJesbYPvqzhGi5FE/ nF3iKlUDxBA0Zhq/1Hnfmd4h9CZomkYBQoq09W9AxHcsXgEZzJCtC74PMwPMQUEY N/7lFg3X+1IXhJoxHqbHw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrfedugedguddtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhvfevufgtgfesthhqredtreerjeenucfhrhhomhepuehj nphrnhcunfhinhgushhtrhpnmhcuoegskhhhlhesvghlvghkthhruhgsrgguuhhrrdhsvg eqnecuggftrfgrthhtvghrnhephfetheekleetffffhfeifffftdetfeelgfefhefhuddv vddvgefggfffueettddtnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrg hilhhfrhhomhepsghkhhhlsegvlhgvkhhtrhhusggrughurhdrshgv X-ME-Proxy: Feedback-ID: i05c146bc:Fastmail Original-Received: by mailuser.nyi.internal (Postfix, from userid 501) id 87BB52D408B7; Wed, 12 Jun 2024 05:04:39 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface In-Reply-To: <86tthy1u37.fsf@gnu.org> 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:287146 Archived-At: On Wed, Jun 12, 2024, at 09:46, Eli Zaretskii wrote: >> Date: Tue, 11 Jun 2024 20:16:03 +0200 >> From: Bj=C3=B6rn Lindstr=C3=B6m >>=20 >> attaching patch to make the whitespace-cleanup and whitespace-cleanup= -region functions add a final newline to a file if whitespace-style cont= ains `missing-newline-at-eof >>=20 >> I'm aware this somewhat replicates what setting `require-final-newlin= e would do, but I think since whitespace.el with this configuration high= lights 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. Hello, I thought about that, but since whitespace-cleanup generally applies cle= an-up according to white-space style, I thought it was simply an oversig= ht that it doesn't apply a fix when it is set to highlight missing end-o= f-file newline. Adding a separate way to configure this removes the simplicity of config= uring your preferred whitespace-style as a single option. However, If you still disagree I can make another patch somehow maintain= s the old behaviour as the default, so just let me know. Thanks, Bj=C3=B6rn