From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Theodor Thornhill via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#60197: 30.0.50; beginning-of-defun broken after new treesit impl Date: Wed, 21 Dec 2022 08:42:38 +0100 Message-ID: <81D7EE3A-4548-40FF-9644-391738DFF145@thornhill.no> References: <7C88E19F-63AC-4551-AC06-D2B067990A5A@gmail.com> Reply-To: Theodor Thornhill 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="16560"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 60197@debbugs.gnu.org To: Yuan Fu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Dec 21 08:45:38 2022 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 1p7tnF-00047u-G0 for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 21 Dec 2022 08:45:37 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p7tkr-00072x-Lk; Wed, 21 Dec 2022 02:43:09 -0500 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 1p7tkk-00070b-JR for bug-gnu-emacs@gnu.org; Wed, 21 Dec 2022 02:43:04 -0500 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 1p7tkk-00049p-Ai for bug-gnu-emacs@gnu.org; Wed, 21 Dec 2022 02:43:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p7tkj-0003O6-Ug for bug-gnu-emacs@gnu.org; Wed, 21 Dec 2022 02:43:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Theodor Thornhill Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 21 Dec 2022 07:43:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60197 X-GNU-PR-Package: emacs Original-Received: via spool by 60197-submit@debbugs.gnu.org id=B60197.167160857113016 (code B ref 60197); Wed, 21 Dec 2022 07:43:01 +0000 Original-Received: (at 60197) by debbugs.gnu.org; 21 Dec 2022 07:42:51 +0000 Original-Received: from localhost ([127.0.0.1]:50103 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p7tkZ-0003Ns-HQ for submit@debbugs.gnu.org; Wed, 21 Dec 2022 02:42:51 -0500 Original-Received: from out-156.mta0.migadu.com ([91.218.175.156]:57100) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p7tkX-0003Nm-9G for 60197@debbugs.gnu.org; Wed, 21 Dec 2022 02:42:50 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=thornhill.no; s=key1; t=1671608566; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=4ZEWqFU8TnPDm0DOUkk6aVrdd37d2TdNrjzBQFVHHlQ=; b=boHINsfGwu6uA3L4DTfzRfJnutrYE63QAbnp+VA9JcxmjQ9oMf1bqdnM3iWEpel+pgau/D gl2v0pVAJvgSZMMHSkhyTWszt7vj+Qx+CYn3WsrdcNHcDenyRNy2wb8XNShpd2Wk7uN51c hnNMWRxXx+FjWP2zT8nvGCRF40m0FoJTeWPzaLOhzqBIb6OygpvTRWCTsOsfAMekayuwW1 czT1e7qebiXKc1yK6ZW0Tuy6cjB6TROM3uAqlm9YekOuePaov9tLRffLj536tlQ0i0kOmf OWfHakdCcXBZyK8Z4gwQx9aubIyRmDdTjh2h7/DqDpMIg/oelQu5mEK72wwdWw== X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. In-Reply-To: <7C88E19F-63AC-4551-AC06-D2B067990A5A@gmail.com> X-Migadu-Flow: FLOW_OUT 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:251572 Archived-At: On 21 December 2022 07:50:04 CET, Yuan Fu wrote: > >Yuan Fu writes: > >> Theodor Thornhill writes: >> >>> Hi, Yuan! >>> >>> It seems 'prog-fill-reindent-defun' is broken after the latest changes >>> to treesit-beginning-of-defun=2E The culprit is that we now use remap >>> instead of setting the beginning-of-defun-function=2E What is the >>> reasoning behind that change? Can't we just rely on the variable >>> beginning-of-defun-function? >> >> Not really, end-of-defun uses beginning/end-of-defun-function in a way >> that=E2=80=99s incompatible with nested defuns[1]=2E So if we want to s= upport >> navigation nested defuns reliably we need to remap the commands instead= =2E >> In the future (ie emacs 30), we can extend the current >> beginning/end-of-defun to support nested defuns, then we don=E2=80=99t = need to >> remap the commands anymore=2E > >I see the problem now=2E=2E=2E Many other functions uses >beginning/end-of-defun=2E I didn=E2=80=99t thought about that initially := -( > >But I don=E2=80=99t want to make big changes to beg/end-of-deun, hmmm=2E > >Yuan I think you can set the functions and remap, right? Maybe you can force th= e beginning-of-defun-function variant to choose the smallest scope as a def= ault? Or just follow the same tactic the user set? Theo