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#67117: [PATCH] Tree-sitter: fix an issue when searching subtree backward Date: Sun, 19 Nov 2023 07:47:13 +0200 Message-ID: <831qcmmh0e.fsf@gnu.org> References: <87h6lruah2.fsf@yandex.ru> <83y1ezqhhk.fsf@gnu.org> <3B375BD3-CF92-4473-AC46-50D6052B79C2@gmail.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27005"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 67117@debbugs.gnu.org, dvzubarev@yandex.ru To: Yuan Fu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Nov 19 06:48:14 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 1r4afG-0006tE-EK for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 19 Nov 2023 06:48:14 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r4af4-0002PX-WA; Sun, 19 Nov 2023 00:48:03 -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 1r4af2-0002PI-Vp for bug-gnu-emacs@gnu.org; Sun, 19 Nov 2023 00:48:01 -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 1r4af2-00086e-OH for bug-gnu-emacs@gnu.org; Sun, 19 Nov 2023 00:48:00 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1r4af3-0001T3-Uh for bug-gnu-emacs@gnu.org; Sun, 19 Nov 2023 00:48:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 19 Nov 2023 05:48:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 67117 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 67117-submit@debbugs.gnu.org id=B67117.17003728645528 (code B ref 67117); Sun, 19 Nov 2023 05:48:01 +0000 Original-Received: (at 67117) by debbugs.gnu.org; 19 Nov 2023 05:47:44 +0000 Original-Received: from localhost ([127.0.0.1]:49767 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r4aek-0001R0-V9 for submit@debbugs.gnu.org; Sun, 19 Nov 2023 00:47:43 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39078) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r4aej-0001QY-2o for 67117@debbugs.gnu.org; Sun, 19 Nov 2023 00:47:41 -0500 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 1r4aec-0006oh-8z; Sun, 19 Nov 2023 00:47:34 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=v5x5u8l7Q2x0iUMmhL7Ufj1J/4ZRA8OQrqOhAGHCMIc=; b=OjOYe7vbpi0D Y74/N+VtgqMGVCm29SG2XhLokunVgylQ+JGEHUZZnEE6jHPmm2/om582o9thFq3tXnDyhkQPuMQxb WmPx0rHI78IuYN3FVMJRjCxQjblhnDopcQT1KMFswGysbDA0HqzmEUAnfA3mUVs/Rp2Bj6SEfKQRK UMrcwCAhOl06KOeAo8A4lIdOkxyEg63kWRxjQjR8pmFkY+0n3Kv+MNC+faIeeEbyNXA9cckAldhoT UnBl01ej1nqHvdoirgUikaXaZzzK+wl7ug5t/XCbTGsq5JzMHJ7dVZZDwiQ8RMwRzqRu+5o2GhyKV KvALwpfPk5cAwAVok1+QdA==; In-Reply-To: <3B375BD3-CF92-4473-AC46-50D6052B79C2@gmail.com> (message from Yuan Fu on Sat, 18 Nov 2023 10:47:47 -0800) 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:274586 Archived-At: > From: Yuan Fu > Date: Sat, 18 Nov 2023 10:47:47 -0800 > Cc: Denis Zubarev , > 67117@debbugs.gnu.org > > > >> Steps to reproduce the issue: > >> 1. emacs -Q > >> 2. M-x find-file /tmp/t.py > >> 3. paste to the buffer > >> > >> Temp(1, 2) > >> > >> 4. M-x python-ts-mode > >> 5. Call search-subtree with backward flag > >> M-x eval-expression (treesit-search-subtree > >> (treesit--thing-at (point) "call") > >> (lambda (n) (equal (treesit-node-type n ) "integer")) > >> t) > >> It should return the second int node (#), but it returns nil. > > > > Yuan, any comments to the patch and the issue in general? > > LGTM. Thanks Denis, and Eli :-) Should we install this on the emacs-29 branch or on master?