From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Yuan Fu Newsgroups: gmane.emacs.bugs Subject: bug#67117: [PATCH] Tree-sitter: fix an issue when searching subtree backward Date: Fri, 22 Dec 2023 23:09:24 -0800 Message-ID: References: <87h6lruah2.fsf@yandex.ru> <83y1ezqhhk.fsf@gnu.org> <3B375BD3-CF92-4473-AC46-50D6052B79C2@gmail.com> <831qcmmh0e.fsf@gnu.org> <31EB2F37-286D-4910-958B-0152A85E970F@gmail.com> <838r6ukss1.fsf@gnu.org> <87051700392856@mail.yandex.ru> <83zfzaj7b4.fsf@gnu.org> <1302931702945138@mail.yandex.ru> <6D360CF2-666F-4BFE-AF6E-98F47829B338@gmail.com> <83y1dqgmn4.fsf@gnu.org> <631791703005524@mail.yandex.ru> Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.700.6\)) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15262"; mail-complaints-to="usenet@ciao.gmane.io" Cc: "67117@debbugs.gnu.org" <67117@debbugs.gnu.org>, Eli Zaretskii To: Denis Zubarev Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Dec 23 08:10:17 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 1rGw9J-0003ny-O0 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 23 Dec 2023 08:10:17 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rGw91-00017D-30; Sat, 23 Dec 2023 02:09:59 -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 1rGw8z-00016r-Sj for bug-gnu-emacs@gnu.org; Sat, 23 Dec 2023 02:09:57 -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 1rGw8z-0008RB-Ju for bug-gnu-emacs@gnu.org; Sat, 23 Dec 2023 02:09:57 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rGw94-0006UQ-AX for bug-gnu-emacs@gnu.org; Sat, 23 Dec 2023 02:10:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Yuan Fu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 23 Dec 2023 07:10:02 +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.170331538924924 (code B ref 67117); Sat, 23 Dec 2023 07:10:02 +0000 Original-Received: (at 67117) by debbugs.gnu.org; 23 Dec 2023 07:09:49 +0000 Original-Received: from localhost ([127.0.0.1]:48416 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rGw8q-0006Tv-Pd for submit@debbugs.gnu.org; Sat, 23 Dec 2023 02:09:49 -0500 Original-Received: from mail-io1-xd31.google.com ([2607:f8b0:4864:20::d31]:50298) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rGw8o-0006Ti-QE for 67117@debbugs.gnu.org; Sat, 23 Dec 2023 02:09:47 -0500 Original-Received: by mail-io1-xd31.google.com with SMTP id ca18e2360f4ac-7b7d65d4eecso106656439f.0 for <67117@debbugs.gnu.org>; Fri, 22 Dec 2023 23:09:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1703315376; x=1703920176; darn=debbugs.gnu.org; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=QbJy3Et+ATOKNe8H4c/H59S1x4AWB+tw5/7rf17BQSc=; b=eobSK0cMT4gHzM27+nMjQ/KqdX3BYEk85SjaYoRu2DxQeG2JFdxwXUm1HAFBUaMtTV JIbKUuoZpA0ndRuX9hp0tUJnmGQ5lt7MJ8tovpx5dp+i3cyLPKPB+baP1nVFH9I2x7ZA E/8BKUhA2xyanmvlOzuULUl2vlz1U2Lk37DRYtdBxu+JziknTTyLpToASlohxlc800w7 33ER1z5gZpxvN5QfRxiSnbAzy00nUc3+I5Z29g/dCrZ+YyWTu0mEBAOkV4V8E26Pt7cq /BU0ue2T6mM/1idpgiozkVQV9guBkJP6aqeh9vcp2P8fEIu83frmcJjIm6g76Nb4SgU8 0ZIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703315376; x=1703920176; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=QbJy3Et+ATOKNe8H4c/H59S1x4AWB+tw5/7rf17BQSc=; b=QYsZXofHi6I6VLpwJGffUw9EP2b7brP4KpPnm11dhhAcuM26dNO0GFBAAYgZgulJNN 3Un91Ff+G4vCF4IBu3vHvUzUcKp4XjPYtjUYq90xIPaqNd87of9zPH1fYSdjErX/n+RW mnf2LKt9+3ixGter9givbh8nWzpYfimGTI1UHsvB7OCYcQ7XbW/JbkMBLDxmm+uacj7s BG4C33D87+yyo5qbfI5AjHkpWuAnc+/ea6H3C+M2Hy4lIB3ibmUQm+u6ECpRMilHk188 MzPHnAOPvJyCb9hj9vY2dIXr/6Wa70w/w/d6B5I16mX3H0fD6jWA5KzNDUQmujI/D5pe 9tsQ== X-Gm-Message-State: AOJu0YwlC/2qPwWdk/NIYDQmvqnHFfF0n2RpW5EU5A0dpDpM+WuvkFDH QvzOkWHqACV4xsNE1Tfphz8= X-Google-Smtp-Source: AGHT+IEdLSQmY7LOKvh/R846kLX+RaasKIEVkSvsnY+9Y8bfyZVHSXpeoTS1TE1s89Nm/avIRj386w== X-Received: by 2002:a05:6e02:148e:b0:35f:b61f:a8a8 with SMTP id n14-20020a056e02148e00b0035fb61fa8a8mr3772788ilk.26.1703315376014; Fri, 22 Dec 2023 23:09:36 -0800 (PST) Original-Received: from smtpclient.apple (172-117-161-177.res.spectrum.com. [172.117.161.177]) by smtp.gmail.com with ESMTPSA id m20-20020a170902c45400b001d316770044sm4532665plm.56.2023.12.22.23.09.35 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 22 Dec 2023 23:09:35 -0800 (PST) In-Reply-To: <631791703005524@mail.yandex.ru> X-Mailer: Apple Mail (2.3731.700.6) 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:276702 Archived-At: > On Dec 19, 2023, at 9:08 AM, Denis Zubarev = wrote: >=20 > I replaced treesit--thing-at with the function from emacs 29.1 in the = last version of the patch. > Attached it here. > 19.12.2023, 19:53, "Eli Zaretskii" : > From: Yuan Fu > Date: Mon, 18 Dec 2023 18:26:30 -0800 > Cc: Eli Zaretskii , > 67117-done@debbugs.gnu.org > =20 > > On Dec 18, 2023, at 4:24 PM, Denis Zubarev = wrote: > > > > Just FYI, my paperwork is done. > > > =20 > Great, applied! Closing this bug. >=20 > The new tests fail here: >=20 > ELC src/treesit-tests.elc >=20 > In end of data: > src/treesit-tests.el:1094:17: Warning: the function = `treesit--thing-at' is not known to be defined. > [...] > Test treesit-search-subtree-backward-1 backtrace: > (treesit--thing-at (point) "call") > (treesit-search-subtree (treesit--thing-at (point) "call") = #'(lambda > (let ((node (treesit-search-subtree (treesit--thing-at (point) = "call > (closure (t) nil (let* ((fn-621 #'treesit-language-available-p) = (arg > ert--run-test-internal(#s(ert--test-execution-info :test = #s(ert-test > ert-run-test(#s(ert-test :name treesit-search-subtree-backward-1 = :do > ert-run-or-rerun-test(#s(ert--stats :selector ... :tests ... = :test-m > ert-run-tests((not (or (tag :unstable) (tag :nativecomp))) = #f(compil > ert-run-tests-batch((not (or (tag :unstable) (tag :nativecomp)))) > ert-run-tests-batch-and-exit((not (or (tag :unstable) (tag = :nativeco > eval((ert-run-tests-batch-and-exit '(not (or (tag :unstable) (tag = :n > command-line-1(("-L" ";." "-l" "ert" "-l" "src/treesit-tests.el" = "-- > command-line() > normal-top-level() > Test treesit-search-subtree-backward-1 condition: > (void-function treesit--thing-at) > FAILED 24/25 treesit-search-subtree-backward-1 (0.000000 sec) at = src/treesit-tests.el:1100 > Can't guess python-indent-offset, using defaults: 4 > Test treesit-search-subtree-forward-1 backtrace: > (treesit--thing-at (point) "call") > (treesit-search-subtree (treesit--thing-at (point) "call") = #'(lambda > (let ((node (treesit-search-subtree (treesit--thing-at (point) = "call > (closure (t) nil (let* ((fn-609 #'treesit-language-available-p) = (arg > ert--run-test-internal(#s(ert--test-execution-info :test = #s(ert-test > ert-run-test(#s(ert-test :name treesit-search-subtree-forward-1 = :doc > ert-run-or-rerun-test(#s(ert--stats :selector ... :tests ... = :test-m > ert-run-tests((not (or (tag :unstable) (tag :nativecomp))) = #f(compil > ert-run-tests-batch((not (or (tag :unstable) (tag :nativecomp)))) > ert-run-tests-batch-and-exit((not (or (tag :unstable) (tag = :nativeco > eval((ert-run-tests-batch-and-exit '(not (or (tag :unstable) (tag = :n > command-line-1(("-L" ";." "-l" "ert" "-l" "src/treesit-tests.el" = "-- > command-line() > normal-top-level() > Test treesit-search-subtree-forward-1 condition: > (void-function treesit--thing-at) > FAILED 25/25 treesit-search-subtree-forward-1 (0.015625 sec) at = src/treesit-tests.el:1086 >=20 > The function treesit--thing-at is only available on = master.<0002-Fix-an-issue-when-searching-subtree-backward.patch> Thanks, applied this patch, and all tests pass now. Yuan