From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#63790: 30.0.50; prog-fill-reindent-defun regression Date: Tue, 6 Jun 2023 04:41:55 +0300 Message-ID: References: <864jnv6pf8.fsf@mail.linkov.net> <382ab3bd-b9ed-ea18-1ae5-9458ffb1b85c@gutov.dev> <86r0qrtaig.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="40170"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Cc: 63790@debbugs.gnu.org To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Jun 06 03:43:18 2023 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 1q6LjB-000AIo-9z for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 06 Jun 2023 03:43:18 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q6Liy-0004M7-3S; Mon, 05 Jun 2023 21:43: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 1q6Liw-0004Ly-Jf for bug-gnu-emacs@gnu.org; Mon, 05 Jun 2023 21:43:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q6Liw-00037P-Ax for bug-gnu-emacs@gnu.org; Mon, 05 Jun 2023 21:43:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1q6Liw-0002NF-7E for bug-gnu-emacs@gnu.org; Mon, 05 Jun 2023 21:43:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 06 Jun 2023 01:43:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 63790 X-GNU-PR-Package: emacs Original-Received: via spool by 63790-submit@debbugs.gnu.org id=B63790.16860157259051 (code B ref 63790); Tue, 06 Jun 2023 01:43:02 +0000 Original-Received: (at 63790) by debbugs.gnu.org; 6 Jun 2023 01:42:05 +0000 Original-Received: from localhost ([127.0.0.1]:50610 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q6Li0-0002Lv-Nf for submit@debbugs.gnu.org; Mon, 05 Jun 2023 21:42:05 -0400 Original-Received: from out4-smtp.messagingengine.com ([66.111.4.28]:55753) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q6Lhy-0002LR-AL for 63790@debbugs.gnu.org; Mon, 05 Jun 2023 21:42:03 -0400 Original-Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 42F3E5C00FB; Mon, 5 Jun 2023 21:41:57 -0400 (EDT) Original-Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Mon, 05 Jun 2023 21:41:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; 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:sender:subject:subject:to:to; s=fm3; t= 1686015717; x=1686102117; bh=VwGYl0jTEy4rwy9pwwppCt8L6ii6j9sb9wc zK4+NvLY=; b=fxbJ3RGukcgSPbtf1ulmJg2aggQ7w5EapQWrYUIann9ja2BBsEA +yxG9PZKEaZsPgkWtW5TYGDoPpBp1D/0Z5Iz81wl9eELc1EO0zNaYzNPmqa6gH3v KQtK+36LWhY+VA+S06SzhWJOCS1xnV28rfFHxakUqG9MpZXYm+0JfHRL0NOcomlC BN/nfniRDFQn+pBdx4Vqg1UAvVJrvV9dHezHudD6rXfqyZEnBWvjVEjeCer5XDY/ D5/LdY3s2q4iHuvZzNrBh6dFTUoUcy0wftMLrPSYFAIvQ6OpdIaO0+ijizrxzaNw LZV1S0OKW1iPw70uS1UX9RXnC81diCry5dA== 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:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1686015717; x=1686102117; bh=VwGYl0jTEy4rwy9pwwppCt8L6ii6j9sb9wc zK4+NvLY=; b=dBYwzbELI6y3ICEXdjmnGY7IyjXqsftcyujmfKpBhbtYNmrMrg/ atmTMXsz9uug45/NuY7n7eEKoAAD08ds3qTurC8RHxPq9wzDnN0swFZDe90+2Xrg Jj7nkUTUMpaWx82m/qbJt2XxSrQ8uA2EeQx7IWEAe1/93SIeVAni1Z52bg4Tpdf4 u7ZQ9w0Rt02Lt4trfSwhrkk/9B+N0QlwWL9JA8zRe1RLiTWimAex6hhRVC6O8BrI oo7zJXz+IZ6DO8XWEPWKTsdcxeXylXj1AqEXoooXPDvOeHFE0GaHvV/vyeZPoy7i 3afTCBq9KyyVWmmPRwi/K4C0/ejrwU4vIeA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrgedttddggeejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtfeejnecuhfhrohhmpeffmhhi thhrhicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdruggvvheqnecuggftrfgrth htvghrnhepiefgteevheevveffheeltdeukeeiieekueefgedugfefgefhudelgfefveel vdevnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepug hmihhtrhihsehguhhtohhvrdguvghv X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 5 Jun 2023 21:41:56 -0400 (EDT) Content-Language: en-US In-Reply-To: <86r0qrtaig.fsf@mail.linkov.net> 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:263039 Archived-At: On 04/06/2023 20:14, Juri Linkov wrote: >>> This regression is in master, not in emacs-29. >> If it is a regression, then compared to what? emacs-29 doesn't have this >> function. Compared to some earlier revision? > Sorry, the subject was not precise. This is more elaborate: > the new function 'prog-fill-reindent-defun' caused a regression for > 'M-q' compared to emacs-29 where 'M-q' was bound to 'fill-paragraph'. Thanks for the clarification. >>> 0. emacs-30 -Q >>> 1. add to the beginning of the*scratch* buffer a list, so that >>> *scratch* looks like this: >>> (+ >>> 1 >>> 2 >>> 3) >>> ;; This buffer is for text that is not saved, and for Lisp evaluation. >>> ;; To create a file, visit it with C-x C-f and enter text in its buffer. >>> 2. Activate the region with the beginning at the start of the line with >>> the first comment, and the region end with point at the end of the buffer. >>> 3. Type 'M-q' (prog-fill-reindent-defun) >>> It indents the list instead of the comment. >>> But when point is at the region beginning then 'M-q' correctly indents >>> the comments. >> This happens because in this scenario point ends up outside of the comment >> (at eob). So when the function is called, in looks for a defun. >> >> Did we at some point add (or decide to add) a condition when, if a region >> is active, it should only refill and not reindent? > Maybe the logic of region detecting/handling could be copied from > 'fill-paragraph' to 'prog-fill-reindent-defun'? Makes sense. Do you want to suggest a patch?