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#74963: Ambiguous treesit named and anonymous nodes in ruby-ts-mode Date: Thu, 26 Dec 2024 03:00:38 +0200 Message-ID: <8dc10f82-4400-4924-bb6b-dcd98bcb598d@gutov.dev> References: <87plox4mtp.fsf@masteringemacs.org> <86ed4zg1cc.fsf@mail.linkov.net> <87zflac68t.fsf@mail.linkov.net> <87jzcdlxdp.fsf@mail.linkov.net> <87o71jocgs.fsf@mail.linkov.net> <5192B278-66C0-48AE-B881-E57CCBB6B501@gmail.com> <87frmtbc9z.fsf@mail.linkov.net> <86bjxh1h86.fsf@gnu.org> <87y10l8h6k.fsf@mail.linkov.net> <87ldwl8g60.fsf@mail.linkov.net> <87wmg53rdj.fsf@mail.linkov.net> <87a5d0n651.fsf@mail.linkov.net> <87zfktphks.fsf@mail.linkov.net> <87ttb0rwni.fsf_-_@mail.linkov.net> <4DFCFBC8-A353-48F2-8257-D6CFB155A030@gmail.com> <87ttatpnii.fsf@mail.linkov.net> <8abcb53c-1636-450d-ac0c-fdf44566ab95@gutov.dev> <87cyhg2nyu.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="4823"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird Cc: Yuan Fu , 74963@debbugs.gnu.org To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Dec 26 02:01:21 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 1tQcFd-00016r-0x for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 26 Dec 2024 02:01:21 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tQcFN-0005WY-7R; Wed, 25 Dec 2024 20:01:05 -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 1tQcFL-0005WL-A7 for bug-gnu-emacs@gnu.org; Wed, 25 Dec 2024 20:01:03 -0500 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 1tQcFL-00022R-1t for bug-gnu-emacs@gnu.org; Wed, 25 Dec 2024 20:01:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=In-Reply-To:From:References:MIME-Version:Date:To:Subject; bh=V7mrbDQp69bMq9T7n6sgLE4m/WsFjKutbQ6RC5LW+DY=; b=qYq2BUtpJAfIBMkXSdmI68ETLBMi4+kuTPuMKnrkUvwsV3yIdD7jJPRQ+k0GN7pSs8Tds1TOZ/yzZEZ4hN5akL9EecmhlNo17PziuAG+OcF6UMTwwtN4SJggSZ2WbJRErleq/9xpCWWJrfT11XJ5i212Bm++dygpeUCVa02mFbGcBR7gH76CPYdhfUv/4ZnGKM+uTON5DvqWFbYS07WBwN7VySHvQ1jRW9X53OfGpfTnDbPBEeV6uZanFdVp4+eHCMAlOOwdYJ74q5Hy9181rJU0QGmk4v1rUNR7dyypjyJvEgPqwABsH8/31fpxsX5ibgt1RB2MXnBk3hevRQIVIQ==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tQcFK-00040q-1b for bug-gnu-emacs@gnu.org; Wed, 25 Dec 2024 20:01:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 26 Dec 2024 01:01:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74963 X-GNU-PR-Package: emacs Original-Received: via spool by 74963-submit@debbugs.gnu.org id=B74963.173517485115394 (code B ref 74963); Thu, 26 Dec 2024 01:01:02 +0000 Original-Received: (at 74963) by debbugs.gnu.org; 26 Dec 2024 01:00:51 +0000 Original-Received: from localhost ([127.0.0.1]:39438 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tQcF9-00040E-4z for submit@debbugs.gnu.org; Wed, 25 Dec 2024 20:00:51 -0500 Original-Received: from fhigh-a8-smtp.messagingengine.com ([103.168.172.159]:48061) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tQcF7-0003zw-3c for 74963@debbugs.gnu.org; Wed, 25 Dec 2024 20:00:50 -0500 Original-Received: from phl-compute-06.internal (phl-compute-06.phl.internal [10.202.2.46]) by mailfhigh.phl.internal (Postfix) with ESMTP id 116351140114; Wed, 25 Dec 2024 20:00:43 -0500 (EST) Original-Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-06.internal (MEProxy); Wed, 25 Dec 2024 20:00:43 -0500 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:subject:subject:to:to; s=fm3; t=1735174843; x=1735261243; bh=V7mrbDQp69bMq9T7n6sgLE4m/WsFjKutbQ6RC5LW+DY=; b= hIZ2eC0tiUr6BYZ87QQNin+UHiK1hd8Xiz4iMLQXyKIH9GJm0GvYYU/fq0Gp4z+/ rZyOsXvN1GiIr0JczXGaIZRFROLSbWLZrH5iba6bMuLXGjCbWlCjbY/XeP7id7Lz B1UPlHSk3Y91oE759Xq1LNlzyi7kBpx1T8M2dchCMXonw21MLSc6wTcahSs/NR2j UT4suR5WzsXr0Ca+1LBrbgvxs1ul71RwzhFcA4sCtMYjoWGCc9k66mjRLIlWBZOx 6myGGPRYaGtIzz9G+S+J4t/FTTlNN7YV6BVrYA5bkab/ZbbkiKGRMwLr3/HGoXZG vE6pun4TZ7F6/Jbe9CIuEQ== 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-sender:x-me-sender:x-sasl-enc; s=fm2; t=1735174843; x= 1735261243; bh=V7mrbDQp69bMq9T7n6sgLE4m/WsFjKutbQ6RC5LW+DY=; b=Q CfX6OS5kgOJYihbFFYVXLYnt1RKexgZYrg7f8pte98t5jTQmlh7FJwgl2hdTRPMU +P8bkCTrgqupNz97O5r/EXEUsYqtBlDhujBgZt1cg2l+czBGbyGs66rT0IweGCgA d1TWDavm+68Hfvv/QM6qKLqN4SHfCplAdNWDzfN2V6TxNmvIVMh85NGq+FyWZJVM zjNUeZjgSJHSshL2pdTsdZEVtDua63U9UJdg40y66twSIrsVcs3tOaH9t5S9kWfJ 4i/NHu75p2S7p/Fn7YUGuCJnfNzxjPgXW82wO0aDCgkekGhbjrmQ7vYmqv3taxe3 m5JecWsmDSNVQ93FEyppw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddruddujedgfedtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh htshculddquddttddmnecujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtvdej necuhfhrohhmpeffmhhithhrhicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdrug gvvheqnecuggftrfgrthhtvghrnhepteduleejgeehtefgheegjeekueehvdevieekueef tddvtdevfefhvdevgedujeehnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpe hmrghilhhfrhhomhepughmihhtrhihsehguhhtohhvrdguvghvpdhnsggprhgtphhtthho peefpdhmohguvgepshhmthhpohhuthdprhgtphhtthhopehjuhhriheslhhinhhkohhvrd hnvghtpdhrtghpthhtoheptggrshhouhhrihesghhmrghilhdrtghomhdprhgtphhtthho peejgeelieefseguvggssghughhsrdhgnhhurdhorhhg X-ME-Proxy: Feedback-ID: i07de48aa:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 25 Dec 2024 20:00:40 -0500 (EST) Content-Language: en-US In-Reply-To: <87cyhg2nyu.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:297743 Archived-At: On 25/12/2024 09:52, Juri Linkov wrote: >> Given that we're already calling a predicate every time (in >> ruby-ts-mode), we might as well add one more check. See the patch at the >> end. > > Thanks, I tried the patch. It was broken, so needed to edit manually. Maybe something regarding whitespace at the end? > Also the new key 'w' doesn't work in diff buffers, need to fix it as well. The binding for 'diff-kill-ring-save'? Seems to work here, as long as the diff buffer is in read-only mode. >> Adding the check for "named" fixes the first two cases, but then C-M-f >> inside "def" jumps to after "baaz". Could be worked around with a >> special case, but I wonder what this difference comes from (haven't >> properly debugged yet). > > I see no problems with your patch. Everything works nicely. Hmm, I can't reproduce it either anymore. Thanks for testing, pushed to master now (unfortunately the commit message refers to bug#73404).