From debbugs-submit-bounces@debbugs.gnu.org Fri Apr 18 14:57:18 2025 Received: (at submit) by debbugs.gnu.org; 18 Apr 2025 18:57:19 +0000 Received: from localhost ([127.0.0.1]:52859 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1u5qto-0007Ol-7E for submit@debbugs.gnu.org; Fri, 18 Apr 2025 14:57:18 -0400 Received: from lists.gnu.org ([2001:470:142::17]:36144) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1u5qtl-0007NM-JC for submit@debbugs.gnu.org; Fri, 18 Apr 2025 14:57:14 -0400 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 1u5qtf-0007E8-Mx for bug-gnu-emacs@gnu.org; Fri, 18 Apr 2025 14:57:07 -0400 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1u5qtd-000378-QR for bug-gnu-emacs@gnu.org; Fri, 18 Apr 2025 14:57:07 -0400 Received: by mail-wr1-x430.google.com with SMTP id ffacd0b85a97d-39c0e0bc733so1981039f8f.1 for ; Fri, 18 Apr 2025 11:57:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1745002623; x=1745607423; darn=gnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc:subject:date:message-id:reply-to; bh=SSx+vRAqoHVGQoWVsnd1vtZay1OBTT4aGoJ3R6YxrsA=; b=F8lxTCxoCOGUWkdq5a64QijzzDvqivq6gQMgwWwcK6jga098eQ3QUR0LktTK6Zg/8y aADVYfYIxGB1gioqLUq5b34MGSay+W7YBwE4JxzKKPaySKa2ZkQ1pAjCAoPzwPJE5lfu q5LSH/fJzBgtvcVrpG5nBwCcZX9jdebC5qFQxD202/GsRNDEzAY6vd5DDO0+5DOUJuAt /zQ4AGLs/QjAYHJW2nDFj1lxXzDU4aQHAevzwd70hSGke0Sm6mY96x/Rg8lQLD+88LqX Z57r0bcTbHY3rBCdQuWKRjgbKCNAFVX3VdcuUexGxL1zBQ4BoytjaJMoT4XnW9k/aZWA Xdpw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745002623; x=1745607423; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=SSx+vRAqoHVGQoWVsnd1vtZay1OBTT4aGoJ3R6YxrsA=; b=CppPfSa5YI3VpMLoz+FIsDDFEdjDlYAMN7E5cOQCHfg4/93J0+zcQm+LizCAq/IkHb yWBoZmPX1O2YJY1BSgvmW7E56Kp6N2PjLZs8yhhBR8VbHbFyrSWxD0KhpSV1Ts7cqgOk OMEhoCoqN44nPKouRh37EdPSpRJY2+zfahSiUnGXPLdtwGHz0+QbunAjqfgOF5rZgC5C gjw3glIH3I4GKtR95hi3fjkC80NqFUcrLB7KKm6nbW64i8RyChFPK1HtfFitAl6fWNxN sVI2HZhposB1XFymy2BaKm7752VJ8dmxkqe1/vdqGETLyWx8r/f6eKMRqhsH5M7HUsMb VquQ== X-Gm-Message-State: AOJu0YxZ/mHmk/Qe4ykR+M4pKQlAx5TL87GXRs1bPFI7goxBRJ6LTnRH +moIAcmA9B/iQ3f53JMYjcBfhEloQkXvMPmNY7eibmxaezztoBndaSGwAQ== X-Gm-Gg: ASbGncughsy/6nvYVDXRa1a73lpX9XEW4dasbqxRGcastzCJSvx0d9qe6dshTrKtsN0 Bc+h2hUxicw+U7De5Aupd1X6tJURfzoC8WuMslfbEAT8XnFi4FPKpQANwoV9bWRZKMFDMREBRDL IEG9lukC1XkQJbgMcEKB6OJcgnZlhpMUSScQ9WNR1rYABrhOCzGRjEw/g7dUCVf5Rom5soMWb8E AsGEweiDaBJKDBf6EnsxyKBpaqVgAQNpwr/w41Zi8agBLjjTS40iEKhWAcWM7jiaTitLvC/GaRo 2qZmhc04cujE0Gzcc7Te4q/AIsBp3hG5AWEAiuWQfXizdJHfAB3niuuNI1YBjw3MBC4hjFfa/+0 uohjOwXDmGICtXKY= X-Google-Smtp-Source: AGHT+IF+fhVP7b3qIbo6ACbIl/EXrUHgu+8/CHMLsAtBIsFa6r7lQhTX93meuF+6r/Ccp91ycbw/qA== X-Received: by 2002:a05:6000:188e:b0:390:e9b5:d69c with SMTP id ffacd0b85a97d-39efba61aa5mr3142681f8f.25.1745002623222; Fri, 18 Apr 2025 11:57:03 -0700 (PDT) Received: from fedora.localnet (2-230-139-124.ip202.fastwebnet.it. [2.230.139.124]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4406d5ccd43sm31583015e9.26.2025.04.18.11.57.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Apr 2025 11:57:02 -0700 (PDT) From: Vincenzo Pupillo To: Bug Emacs Subject: 31.0.50; php-js-mode and js-ts-mode: treesit-show-paren-data--categorize: peculiar error: ("Cannot find the definition of the predicate in `treesit-thing-settings'" list) Date: Fri, 18 Apr 2025 20:57:01 +0200 Message-ID: <3544088.LZWGnKmheA@fedora> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="utf-8" Received-SPF: pass client-ip=2a00:1450:4864:20::430; envelope-from=v.pupillo@gmail.com; helo=mail-wr1-x430.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) Ciao, both php-ts-mode and js-ts-mode show the same error. It is similar to bug #75456. It was fixed by me at the time, for js-ts-mode, with a patch to js--treesit-language-at-point. The problem arises when there are languages other than the main language in the buffer. The following snippet shows the problem, just put the cursor at the end of the comment (jsdoc parser required): function MyBigFunc(param1, param2) { const abc = 'def'; } /** * Rapresent * @param {int} a dada */| <-- cursor here var variablename = function(a) { console.log("text"); // dada /** dada */ // dada }; With php it is even worse because of the number of embedded languages. Any idea? Thanks. Vincenzo From debbugs-submit-bounces@debbugs.gnu.org Sun Apr 20 02:27:54 2025 Received: (at 77906) by debbugs.gnu.org; 20 Apr 2025 06:27:54 +0000 Received: from localhost ([127.0.0.1]:43896 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1u6O9h-0002MM-Pf for submit@debbugs.gnu.org; Sun, 20 Apr 2025 02:27:54 -0400 Received: from relay4-d.mail.gandi.net ([217.70.183.196]:38289) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1u6O9c-0002Lk-Kn for 77906@debbugs.gnu.org; Sun, 20 Apr 2025 02:27:49 -0400 Received: by mail.gandi.net (Postfix) with ESMTPSA id 4E2D141D1E; Sun, 20 Apr 2025 06:27:38 +0000 (UTC) From: Juri Linkov To: Vincenzo Pupillo Subject: Re: bug#77906: 31.0.50; php-js-mode and js-ts-mode: treesit-show-paren-data--categorize: peculiar error: ("Cannot find the definition of the predicate in `treesit-thing-settings'" list) In-Reply-To: <3544088.LZWGnKmheA@fedora> Organization: LINKOV.NET References: <3544088.LZWGnKmheA@fedora> Date: Sun, 20 Apr 2025 09:19:18 +0300 Message-ID: <8734e3e4nt.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/31.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-GND-State: clean X-GND-Score: -100 X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddvfeejudelucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuifetpfffkfdpucggtfgfnhhsuhgsshgtrhhisggvnecuuegrihhlohhuthemuceftddunecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvfevufgjohhffffkfgggtgesthdtredttdertdenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucggtffrrghtthgvrhhnpeffgeetfeevlefhleejfeeuheeiudeitdffhfdutdekfeffgffhveehteegueekheenucfkphepledurdduvdelrddutdehrdduudejnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepledurdduvdelrddutdehrdduudejpdhhvghlohepmhgrihhlrdhgrghnughirdhnvghtpdhmrghilhhfrhhomhepjhhurhhisehlihhnkhhovhdrnhgvthdpnhgspghrtghpthhtohepfedprhgtphhtthhopeejjeeltdeiseguvggssghughhsrdhgnhhurdhorhhgpdhrtghpthhtoheptggrshhouhhrihesghhmrghilhdrtghomhdprhgtphhtthhopehvrdhpuhhpihhllhhosehgmhgrihhlrdgtohhm X-GND-Sasl: juri@linkov.net X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 77906 Cc: Yuan Fu , 77906@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) > both php-ts-mode and js-ts-mode show the same error. It is similar to bug > #75456. It was fixed by me at the time, for js-ts-mode, with a patch to > js--treesit-language-at-point. The problem arises when there are languages > other than the main language in the buffer. > The following snippet shows the problem, just put the cursor at the end of the > comment (jsdoc parser required): > > function MyBigFunc(param1, > param2) { > const abc = 'def'; > } > /** > * Rapresent > * @param {int} a dada > */| <-- cursor here > var variablename = function(a) { > console.log("text"); // dada > /** dada */ > // dada > }; > > With php it is even worse because of the number of embedded languages. > > Any idea? I noticed the same problem that the end of a range unexpectedly belongs to its host that breaks many things such as navigation to the start of the embedded root node from its end. Instead it uses the host node. Maybe point at the end of the range should belong to the embedded parser? From debbugs-submit-bounces@debbugs.gnu.org Sun Apr 20 10:55:27 2025 Received: (at 77906) by debbugs.gnu.org; 20 Apr 2025 14:55:27 +0000 Received: from localhost ([127.0.0.1]:50501 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1u6W4t-0004S6-2I for submit@debbugs.gnu.org; Sun, 20 Apr 2025 10:55:27 -0400 Received: from mail-pg1-x530.google.com ([2607:f8b0:4864:20::530]:58747) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1u6W4o-0004Qu-MZ for 77906@debbugs.gnu.org; Sun, 20 Apr 2025 10:55:25 -0400 Received: by mail-pg1-x530.google.com with SMTP id 41be03b00d2f7-af28bc68846so2816715a12.1 for <77906@debbugs.gnu.org>; Sun, 20 Apr 2025 07:55:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1745160916; x=1745765716; 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=omeHKX1kiH07K5rRriTrOXbR6D10ymLx/TS8fj3XTX4=; b=ODHofauyS18I+/tNN3NeadTAc7B6/+qKMqxC8LwZbnU1c1CdJ+WQi53SIFqsuCAhC5 631kLnxLDS7YcjHM3cgzmPLUDWMjCKcGIBYDA1tJTqVyfX1TI2GRwELDnEg6CLQsI4wH +Pz6Zgb9tSjxLIyrrMpz+6DtPnhjWNdA2nDulZxXT+KEawxJvhuXXgzm0sy/JFWEoVsD oT7Po0OQQHWbTNmJehVoDow6kzwNaOkAL1qC4PHLZWhDNeK0xHiMSJCBVw0BftM2eI2/ vPS6ZrOjVkKSJr+wpILZq3ffPXbStrBUkJdmL7/kRuXaWoK5rt5gU5/57SwlQaT7w0QC SkBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745160916; x=1745765716; 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=omeHKX1kiH07K5rRriTrOXbR6D10ymLx/TS8fj3XTX4=; b=XLfbH8Q0GiLiezVYricM/cP/t/hch3UyHxyEqivk409L+lmkBItNhcHWxAOVuZDV7Q tVSqgU+LUmBycLBByy2EZ0iDQSuL7jCB+DR7n/Hva/LCZyLgyWgp390MCdKrl8hcv5D0 2DoM4n+CYzkbA+NyDB4G0/QZ6Kvfe/uc2nGTf3tZ2Q0JtnxbHAPA5l5r+V85nbD9bE0b xP7ZInEFQzcnt7/zkkc7LDzaaI6RH+Xn5JJCZN/DLxBpgq+y3wZBsJECkPe556ePyfif C6H82nO2nnYyN0/rkbdt7g4s5AuFtmmAU9HHmavhsyVnZWkWUVBkmneNGJb2cLym4yJf FWpg== X-Forwarded-Encrypted: i=1; AJvYcCVtY57D5yitaM3UjjyAnMx5s5+FS9tjID0jAIP/L17/LwV07ZV/517N4RA10TWRr5jWRlAyyA==@debbugs.gnu.org X-Gm-Message-State: AOJu0YwbcztWfCVXCrke+BhDGwWujrcb/ELGo5lsQNq7k0u3EHmCRGvX QlM/YE4p1sRzY9pqTE3g/W35g9/Y072ohtDAo8+ZiXG65TD2gyX8 X-Gm-Gg: ASbGncvrH5wPuoKZqf6R/stHxTFHYyGIRiVVDA6Hb4GeFBNRgFlICBXlO6035bA0Abk n45Qp6OxRVzwU+VrQUqOkuppr/fQgNUA7gtcpHbH8lo27rACuoY/yr57JuQcTRgal05z2IGQQdv D1cYkoSA8e9A70Se6U2NnDyuA420BzTr65Tn3x2KbmjgGllFWiivyQ8TMEzvuo4LvrCEs4zEyqV yczBYBCRWlfHIpSV/eawFkivvCQnkiy9g0qPinGzGudC17h4RH9rdK6A/lAuu5wpqe5s/1d+8CV /qpHknNtnaDnXZzRsUrhiwEEeY7knMT1VO6r5M4AAYQOMThXO0drN94cKug4StJA X-Google-Smtp-Source: AGHT+IGB/WmpGRnmMRMWFTrHJwe8jqSVPVS5J+S2LH9OcAEhI2gJ9yJDDwP1LFPxl71GSPGixIUNxQ== X-Received: by 2002:a17:903:40cc:b0:223:5c33:56b4 with SMTP id d9443c01a7336-22c53583807mr113653905ad.20.1745160916476; Sun, 20 Apr 2025 07:55:16 -0700 (PDT) Received: from smtpclient.apple ([2601:646:8f81:6120:9db2:4caa:f4da:502f]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-22c50fdb97esm48603985ad.219.2025.04.20.07.55.15 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 20 Apr 2025 07:55:15 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3826.400.131.1.6\)) Subject: Re: bug#77906: 31.0.50; php-js-mode and js-ts-mode: treesit-show-paren-data--categorize: peculiar error: ("Cannot find the definition of the predicate in `treesit-thing-settings'" list) From: Yuan Fu In-Reply-To: <8734e3e4nt.fsf@mail.linkov.net> Date: Sun, 20 Apr 2025 07:55:04 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: <31AF2138-2D14-476B-B3D4-587C38869EE6@gmail.com> References: <3544088.LZWGnKmheA@fedora> <8734e3e4nt.fsf@mail.linkov.net> To: Juri Linkov X-Mailer: Apple Mail (2.3826.400.131.1.6) X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 77906 Cc: Vincenzo Pupillo , 77906@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > On Apr 19, 2025, at 11:19=E2=80=AFPM, Juri Linkov = wrote: >=20 >> both php-ts-mode and js-ts-mode show the same error. It is similar to = bug=20 >> #75456. It was fixed by me at the time, for js-ts-mode, with a patch = to=20 >> js--treesit-language-at-point. The problem arises when there are = languages=20 >> other than the main language in the buffer. >> The following snippet shows the problem, just put the cursor at the = end of the=20 >> comment (jsdoc parser required): >>=20 >> function MyBigFunc(param1, >> param2) { >> const abc =3D 'def'; >> } >> /** >> * Rapresent >> * @param {int} a dada >> */| <-- cursor here >> var variablename =3D function(a) { >> console.log("text"); // dada >> /** dada */ >> // dada >> }; >>=20 >> With php it is even worse because of the number of embedded = languages. >>=20 >> Any idea? >=20 > I noticed the same problem that the end of a range > unexpectedly belongs to its host that breaks many things > such as navigation to the start of the embedded root node > from its end. Instead it uses the host node. >=20 > Maybe point at the end of the range should belong > to the embedded parser? The end position of a region has always been considered not part of a = region, not only in Emacs, but pretty much everywhere. Let=E2=80=99s fix = treesit-show-paren-data=E2=80=94categorize instead. We can add optional = arguments to treesit-language-at and friends to make it easier to handle = the end-of-range case. Yuan= From debbugs-submit-bounces@debbugs.gnu.org Sun Apr 20 14:32:11 2025 Received: (at 77906) by debbugs.gnu.org; 20 Apr 2025 18:32:12 +0000 Received: from localhost ([127.0.0.1]:53206 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1u6ZSd-0000I9-HP for submit@debbugs.gnu.org; Sun, 20 Apr 2025 14:32:11 -0400 Received: from relay3-d.mail.gandi.net ([217.70.183.195]:33325) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1u6ZSZ-0000HO-6M; Sun, 20 Apr 2025 14:32:08 -0400 Received: by mail.gandi.net (Postfix) with ESMTPSA id 5DC791FCE8; Sun, 20 Apr 2025 18:31:58 +0000 (UTC) From: Juri Linkov To: Yuan Fu Subject: Re: bug#77906: 31.0.50; php-js-mode and js-ts-mode: treesit-show-paren-data--categorize: peculiar error: ("Cannot find the definition of the predicate in `treesit-thing-settings'" list) In-Reply-To: <31AF2138-2D14-476B-B3D4-587C38869EE6@gmail.com> Organization: LINKOV.NET References: <3544088.LZWGnKmheA@fedora> <8734e3e4nt.fsf@mail.linkov.net> <31AF2138-2D14-476B-B3D4-587C38869EE6@gmail.com> Date: Sun, 20 Apr 2025 21:29:47 +0300 Message-ID: <87wmbe7kkk.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/31.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-GND-State: clean X-GND-Score: -100 X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddvfeekieegucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuifetpfffkfdpucggtfgfnhhsuhgsshgtrhhisggvnecuuegrihhlohhuthemuceftddunecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvfevufgjohhffffkfgggtgfgsehtkeertddtreejnecuhfhrohhmpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqnecuggftrfgrthhtvghrnhepieffteejgeehffejuedtiefhudekgeejteekiefgveeuheetvdefgeekkeevkedunecukfhppeeluddruddvledruddthedruddujeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpeeluddruddvledruddthedruddujedphhgvlhhopehmrghilhdrghgrnhguihdrnhgvthdpmhgrihhlfhhrohhmpehjuhhriheslhhinhhkohhvrdhnvghtpdhnsggprhgtphhtthhopeegpdhrtghpthhtoheptghonhhtrhholhesuggvsggsuhhgshdrghhnuhdrohhrghdprhgtphhtthhopeejjeeltdeiseguvggssghughhsrdhgnhhurdhorhhgpdhrtghpthhtohepvhdrphhuphhilhhlohesghhmrghilhdrtghomhdprhgtphhtthhopegtrghsohhurhhisehgmhgrihhlrdgtohhm X-GND-Sasl: juri@linkov.net X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 77906 Cc: Vincenzo Pupillo , 77906@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) close 77906 31.0.50 thanks > The end position of a region has always been considered not part of > a region, not only in Emacs, but pretty much everywhere. Let’s fix > treesit-show-paren-data—categorize instead. Ah, I missed that this bug report is about treesit-show-paren-data--categorize because it was mentioned only in the subject, and who reads subjects 😄 So now fixed the off-by-one error in treesit-show-paren-data--categorize. From debbugs-submit-bounces@debbugs.gnu.org Sun Apr 20 14:58:19 2025 Received: (at 77906) by debbugs.gnu.org; 20 Apr 2025 18:58:19 +0000 Received: from localhost ([127.0.0.1]:53503 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1u6Zru-00068D-DN for submit@debbugs.gnu.org; Sun, 20 Apr 2025 14:58:18 -0400 Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]:60853) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1u6Zrp-00066n-Nr for 77906@debbugs.gnu.org; Sun, 20 Apr 2025 14:58:17 -0400 Received: by mail-wr1-x42f.google.com with SMTP id ffacd0b85a97d-39ee5ac4321so3500543f8f.1 for <77906@debbugs.gnu.org>; Sun, 20 Apr 2025 11:58:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1745175487; x=1745780287; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=BOY+P4M+/kLUbBt0hsrDlzlM5t0+mu05mju3m1W5deM=; b=JR7KWVH2KcND8JNAwW7IHOb7RY9+K2lgY8pYf7gE0cltLX2H1LKhGrEJPTmDf1f+yv C5GApKusdn20QGxe8TAekPkur2cJW/2+ymxuxCAcBNtjlgpDO5vHvIeGKK12PeOtBcXR Nv+4kp/jNh56vQo8s3kg8nfwVx6SlyHKAAbtc7SsCRmk3tK8XHxzxNdtAYBkcflKqgNQ iPRWV06JjSHeZ2VcYawKKcDnobqdhxzGx7bf9Tg3DG0S5K8N4JdgmQpyjKrSym2XX2Tl ycYT/6Ts08rtmZNgGReUn9TPIRbxfEOMbslSCGXJOCoxei86wfcsOrMUcyFWeCUMuF9z /7BA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745175487; x=1745780287; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=BOY+P4M+/kLUbBt0hsrDlzlM5t0+mu05mju3m1W5deM=; b=ke+HBGWDs2MzAM6dn9/G2sXCDbOGt8/NLHFeTKsPZzDsnWSm9A8S0xLb2eclz9PaG3 AByTAjtCCKwFtOBoKFc8Nc7q79V/ZQJ/4rxkBtU0xrYllUMz7BPMqag5nJV8KNlsChfw aKJTyKl2ULvBUC6cBaWxX5rMdvhVcp4N5rIKtBRqhggKIALDnrgqhjEaWErZfBGt8IUD +C7tM8P5HA2ym0/kl5SGhCFv90yY1AiL8PTeA92cSBkDdFb1ZZNAZMi3amZ3PbEQWFEQ mFOLyC6qRseR7e5+sQQEW6kW45JLlhWrSWah8mNgE4PpCjWi+VJ+4eIsy3eiblNHTo1b qH9A== X-Gm-Message-State: AOJu0YytWyMmynedy8awY1XaH4qH+TcdvwArigxv3gGf9JhOET9PNuFn /4U0CCaIW0tXzfoqPVlCYo88auqWpIhTUfWDutlEHJ7rz+o1wZ4n X-Gm-Gg: ASbGnctjJ6pk85ERTndMfhgX9iVqhIMhanjAP/kSV1NvAZU8RGgOK7+n0iTIOaEB6Im WbJmWq3iXPewwZzJt6MWQeJ+awTbgeB6ORSw44XCyMFGsri1wLmooAgsqdtYUCN7mAY7pSjIlCk ynSUDVXjcQSSmUcGXvgrJ69G/v6RfMaDeJPGgBPzHi2+rzt1Qjz18KNcpz4TheuGzEr6WaxVNts LrOWFmmLf8tN5KctGUhZ2p/M/ZTn7d8+AcD8BqXx67niZ9nC4CKoqQ5WI2MiDmEK3BX3xkb0Dm4 GyE0yiTxarYIKjgyKCFxURtPVa219xIj8z5GO9hk1VdctX9k/0FSSFMbZOAHpi58Yd9NM5ouJCc tdvFY X-Google-Smtp-Source: AGHT+IGyOSfWerJBsrPqMrPWd46TH6uADZYdZRRfOqLalRtjRSGvuKXrABPRayp5K4UrBKigI2l5+A== X-Received: by 2002:a05:6000:4313:b0:39c:2688:6edf with SMTP id ffacd0b85a97d-39efba45635mr7567827f8f.14.1745175487058; Sun, 20 Apr 2025 11:58:07 -0700 (PDT) Received: from fedora.localnet (2-230-139-124.ip202.fastwebnet.it. [2.230.139.124]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-39efa433429sm9640412f8f.37.2025.04.20.11.58.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 20 Apr 2025 11:58:06 -0700 (PDT) From: Vincenzo Pupillo To: Yuan Fu , Juri Linkov Subject: Re: bug#77906: 31.0.50; php-js-mode and js-ts-mode: treesit-show-paren-data--categorize: peculiar error: ("Cannot find the definition of the predicate in `treesit-thing-settings'" list) Date: Sun, 20 Apr 2025 20:58:05 +0200 Message-ID: <4805184.vXUDI8C0e8@fedora> In-Reply-To: <87wmbe7kkk.fsf@mail.linkov.net> References: <3544088.LZWGnKmheA@fedora> <31AF2138-2D14-476B-B3D4-587C38869EE6@gmail.com> <87wmbe7kkk.fsf@mail.linkov.net> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 77906 Cc: 77906@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) In data domenica 20 aprile 2025 20:29:47 Ora legale dell=E2=80=99Europa cen= trale, Juri=20 Linkov ha scritto: > close 77906 31.0.50 > thanks >=20 > > The end position of a region has always been considered not part of > > a region, not only in Emacs, but pretty much everywhere. Let=E2=80=99s = fix > > treesit-show-paren-data=E2=80=94categorize instead. >=20 > Ah, I missed that this bug report is about > treesit-show-paren-data--categorize because it was mentioned only in the > subject, and who reads subjects =F0=9F=98=84 :-D >=20 > So now fixed the off-by-one error in treesit-show-paren-data--categorize. Thanks Juri. Vincenzo From debbugs-submit-bounces@debbugs.gnu.org Sun Apr 20 22:01:34 2025 Received: (at 77906) by debbugs.gnu.org; 21 Apr 2025 02:01:35 +0000 Received: from localhost ([127.0.0.1]:57505 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1u6gTR-0007u8-Ea for submit@debbugs.gnu.org; Sun, 20 Apr 2025 22:01:33 -0400 Received: from mail-pf1-x435.google.com ([2607:f8b0:4864:20::435]:53749) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1u6gTA-0007rB-5l for 77906@debbugs.gnu.org; Sun, 20 Apr 2025 22:01:23 -0400 Received: by mail-pf1-x435.google.com with SMTP id d2e1a72fcca58-736a7e126c7so2818677b3a.3 for <77906@debbugs.gnu.org>; Sun, 20 Apr 2025 19:01:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1745200865; x=1745805665; 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=brnac3R1eNhHwYC3jxOZjfPOM7j3BtOMgjfGtE6gYEg=; b=EFHIlC1oPQcAr0/qpNb8AXAAAl9yDjKi6ooA41iOJMnJeTpWWnDPjXV8RY+OUY1P/R 3V7xzfvAgp70fhV1ojywoto3P3KVMUzT5VTH9YhCsEtUF5tK1h5FtqFlfxMJ9mckLCDK yLzBM4j+JbIfBmaa5aDYVbOWi8dIIxcsjrcfgzROTq11C77IYndrzs1b4luEtySHW3Xb HcASjI+3ciGKRF1MMcKDMuno+6JYotyu9HE/X+gOXUg2AKdx/YbR2PBBPNfGbPASspRL Jxzu6plJIPTXdk3SLjlypPhw4Ho/LJf6paAQIyxg1j0A4qjEXuPCiCCuf+xd0ez8LjiB kh+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745200865; x=1745805665; 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=brnac3R1eNhHwYC3jxOZjfPOM7j3BtOMgjfGtE6gYEg=; b=CilKnRkgt6gCjp8WbMOOwPQBFeGyHwFgda1bRNLOCddsxK7ThZxuzT/iFFjT+kDR3s wi026N7aGDIWVff6vcGNE413gAho7/kIqPkdvI5qLp4Sq3HOsEDJMxBiedLutICieHo+ WnuS9KV0TcLqVYyRQw/ISVSe0cxYU5rKPg/WUPEvJMtAR6Z+SdfuWv6ZHeueuu+Pxs7c o+hivtL+5aBFel5fwzR9hnULR4l2cGjrF20iW53gPDWyuGKVv+r2FXrv3EQiANV430Un QfXTH8yBZ0SbJWGnR91VWnOPAcZS65wtic4uPhsqIYvkNGUi1390E9FZh4c2KTN64/0K UpOg== X-Forwarded-Encrypted: i=1; AJvYcCXb+7jBrCSdWO+kyRaVqDqsEm/KtG6Rjbx2OPsgV/6eWjCshlDRDQUi2QDwbKQE5qC101qxxw==@debbugs.gnu.org X-Gm-Message-State: AOJu0Yzj6EPHkSdCFkLPBebOSPGDiCQ0TCc4VLVJv2r6MSm2tspORCBe vDsfTgzsTwdEK+AiRh3M9/W/jiB1g1uZj5f26l8wE6ctBdQLEG2v X-Gm-Gg: ASbGnct01lUd8b7Tx07lxv3XdnSdd8PhwEEBX//A9deayJOoXJUE7rvp5FaGZPTr5LG aaosH+ogxWHUl5QAF5YN6DN7otdn81i+y9cwdS/4B6h7c5gVpo3DjVaRKWJb2SJnQpku4KvcbCc vjR8GfL/iprwjF4/ltOUG64RM8CmB6qpsAqQ4TsEoqHfXdFiV5KJnP47YyN9oVEr9aCbIWk6gIT 9oWF/Fior6pBy/oYASGbjj1028JgjgqfqJCTrBrnc9S3FVqfxw/9KA5rhUUJXrsEszg9oeoNqov y2V6RKSZR04Piz/N2kZgu0t1wjCURGdrWnv0IJXvRy0VWkJLmj4HmWepRABHSwWb X-Google-Smtp-Source: AGHT+IEGD6pUeK7OvTEeeHh8DF7HrHj62zSDauFqYXOldN6fxx0mj25ZcYfc2ADXQRQQ7hwK3xDGSw== X-Received: by 2002:a05:6a20:e608:b0:1f5:8e94:2e83 with SMTP id adf61e73a8af0-203cbc2714dmr14370535637.8.1745200865350; Sun, 20 Apr 2025 19:01:05 -0700 (PDT) Received: from smtpclient.apple ([2601:646:8f81:6120:9db2:4caa:f4da:502f]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-b0db148591fsm3581782a12.70.2025.04.20.19.01.04 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 20 Apr 2025 19:01:04 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3826.400.131.1.6\)) Subject: Re: bug#77906: 31.0.50; php-js-mode and js-ts-mode: treesit-show-paren-data--categorize: peculiar error: ("Cannot find the definition of the predicate in `treesit-thing-settings'" list) From: Yuan Fu In-Reply-To: <87wmbe7kkk.fsf@mail.linkov.net> Date: Sun, 20 Apr 2025 19:00:54 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: <1186F98B-F7C4-4F68-92CE-0AFE4996E0DA@gmail.com> References: <3544088.LZWGnKmheA@fedora> <8734e3e4nt.fsf@mail.linkov.net> <31AF2138-2D14-476B-B3D4-587C38869EE6@gmail.com> <87wmbe7kkk.fsf@mail.linkov.net> To: Juri Linkov X-Mailer: Apple Mail (2.3826.400.131.1.6) X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 77906 Cc: Vincenzo Pupillo , 77906@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > On Apr 20, 2025, at 11:29=E2=80=AFAM, Juri Linkov = wrote: >=20 > close 77906 31.0.50 > thanks >=20 >> The end position of a region has always been considered not part of >> a region, not only in Emacs, but pretty much everywhere. Let=E2=80=99s = fix >> treesit-show-paren-data=E2=80=94categorize instead. >=20 > Ah, I missed that this bug report is about = treesit-show-paren-data--categorize > because it was mentioned only in the subject, and who reads subjects = =F0=9F=98=84 >=20 > So now fixed the off-by-one error in = treesit-show-paren-data=E2=80=94categorize. Thanks! Yuan= From debbugs-submit-bounces@debbugs.gnu.org Tue Apr 22 13:38:20 2025 Received: (at 77906) by debbugs.gnu.org; 22 Apr 2025 17:38:20 +0000 Received: from localhost ([127.0.0.1]:49743 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1u7HZc-0007CQ-H3 for submit@debbugs.gnu.org; Tue, 22 Apr 2025 13:38:20 -0400 Received: from relay8-d.mail.gandi.net ([2001:4b98:dc4:8::228]:45237) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1u7HZZ-0007C7-Jb for 77906@debbugs.gnu.org; Tue, 22 Apr 2025 13:38:18 -0400 Received: by mail.gandi.net (Postfix) with ESMTPSA id EF6C043B3B; Tue, 22 Apr 2025 17:38:07 +0000 (UTC) From: Juri Linkov To: Yuan Fu Subject: Re: bug#77906: 31.0.50; php-js-mode and js-ts-mode: treesit-show-paren-data--categorize: peculiar error: ("Cannot find the definition of the predicate in `treesit-thing-settings'" list) In-Reply-To: <1186F98B-F7C4-4F68-92CE-0AFE4996E0DA@gmail.com> Organization: LINKOV.NET References: <3544088.LZWGnKmheA@fedora> <8734e3e4nt.fsf@mail.linkov.net> <31AF2138-2D14-476B-B3D4-587C38869EE6@gmail.com> <87wmbe7kkk.fsf@mail.linkov.net> <1186F98B-F7C4-4F68-92CE-0AFE4996E0DA@gmail.com> Date: Tue, 22 Apr 2025 20:36:03 +0300 Message-ID: <87jz7c85fg.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/31.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-GND-State: clean X-GND-Score: -100 X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddvgeegfeehucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuifetpfffkfdpucggtfgfnhhsuhgsshgtrhhisggvnecuuegrihhlohhuthemuceftddunecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvfevufgjohhffffkfgggtgfgsehtkeertddtreejnecuhfhrohhmpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqnecuggftrfgrthhtvghrnhepieffteejgeehffejuedtiefhudekgeejteekiefgveeuheetvdefgeekkeevkedunecukfhppeeluddruddvledruddthedruddujeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpeeluddruddvledruddthedruddujedphhgvlhhopehmrghilhdrghgrnhguihdrnhgvthdpmhgrihhlfhhrohhmpehjuhhriheslhhinhhkohhvrdhnvghtpdhnsggprhgtphhtthhopeefpdhrtghpthhtohepjeejledtieesuggvsggsuhhgshdrghhnuhdrohhrghdprhgtphhtthhopehvrdhpuhhpihhllhhosehgmhgrihhlrdgtohhmpdhrtghpthhtoheptggrshhouhhrihesghhmrghilhdrtghomh X-GND-Sasl: juri@linkov.net X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 77906 Cc: Vincenzo Pupillo , 77906@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) >> So now fixed the off-by-one error in treesit-show-paren-data—categorize. > > Thanks! Now added this docstring to the internal function 'treesit-show-paren-data--categorize': "Return a list suitable for `show-paren-data-function' (which see). If the optional argument END-P is non-nil, interpret the position POS as belonging to the node that ends before POS (by subtracting 1 from POS)." I guess more functions will need such flag, e.g. 'backward-sexp' at the end of the range doesn't skip to the embedded node's start. From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 23 12:57:27 2025 Received: (at 77906) by debbugs.gnu.org; 23 Apr 2025 16:57:27 +0000 Received: from localhost ([127.0.0.1]:58622 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1u7dPb-0003GG-Cr for submit@debbugs.gnu.org; Wed, 23 Apr 2025 12:57:27 -0400 Received: from relay5-d.mail.gandi.net ([2001:4b98:dc4:8::225]:43675) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1u7dPY-0003ER-I3 for 77906@debbugs.gnu.org; Wed, 23 Apr 2025 12:57:25 -0400 Received: by mail.gandi.net (Postfix) with ESMTPSA id 8552043A42; Wed, 23 Apr 2025 16:57:13 +0000 (UTC) From: Juri Linkov To: Yuan Fu Subject: Re: bug#77906: 31.0.50; php-js-mode and js-ts-mode: treesit-show-paren-data--categorize: peculiar error: ("Cannot find the definition of the predicate in `treesit-thing-settings'" list) In-Reply-To: <87jz7c85fg.fsf@mail.linkov.net> Organization: LINKOV.NET References: <3544088.LZWGnKmheA@fedora> <8734e3e4nt.fsf@mail.linkov.net> <31AF2138-2D14-476B-B3D4-587C38869EE6@gmail.com> <87wmbe7kkk.fsf@mail.linkov.net> <1186F98B-F7C4-4F68-92CE-0AFE4996E0DA@gmail.com> <87jz7c85fg.fsf@mail.linkov.net> Date: Wed, 23 Apr 2025 19:55:34 +0300 Message-ID: <87bjsmddh5.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/31.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-GND-State: clean X-GND-Score: -100 X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddvgeejudefucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuifetpfffkfdpucggtfgfnhhsuhgsshgtrhhisggvnecuuegrihhlohhuthemuceftddunecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvfevufgjohhffffkfgggtgesthdtredttdertdenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucggtffrrghtthgvrhhnpeffgeetfeevlefhleejfeeuheeiudeitdffhfdutdekfeffgffhveehteegueekheenucfkphepledurdduvdelrddutdehrdduudejnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepledurdduvdelrddutdehrdduudejpdhhvghlohepmhgrihhlrdhgrghnughirdhnvghtpdhmrghilhhfrhhomhepjhhurhhisehlihhnkhhovhdrnhgvthdpnhgspghrtghpthhtohepfedprhgtphhtthhopeejjeeltdeiseguvggssghughhsrdhgnhhurdhorhhgpdhrtghpthhtohepvhdrphhuphhilhhlohesghhmrghilhdrtghomhdprhgtphhtthhopegtrghsohhurhhisehgmhgrihhlrdgtohhm X-GND-Sasl: juri@linkov.net X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 77906 Cc: Vincenzo Pupillo , 77906@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) > Now added this docstring to the internal function > 'treesit-show-paren-data--categorize': > > "Return a list suitable for `show-paren-data-function' (which see). > If the optional argument END-P is non-nil, interpret the position POS > as belonging to the node that ends before POS (by subtracting 1 from POS)." > > I guess more functions will need such flag, e.g. 'backward-sexp' > at the end of the range doesn't skip to the embedded node's start. This patch is not for immediate installation, but it demonstrates how this problem can be fixed: diff --git a/lisp/treesit.el b/lisp/treesit.el index bf5c1ed5f6c..c73b380f38c 100644 --- a/lisp/treesit.el +++ b/lisp/treesit.el @@ -869,7 +869,7 @@ treesit-parsers-at (let ((res nil)) ;; Refer to (ref:local-parser-overlay) for more explanation of local ;; parser overlays. - (dolist (ov (overlays-at (or pos (point)))) + (dolist (ov (overlays-at (1- (or pos (point))))) (when-let* ((parser (overlay-get ov 'treesit-parser)) (host-parser (or (null with-host) (overlay-get ov 'treesit-host-parser))) With this patch the following case works correctly in test.heex: <%= if true do %>

hello, tree-sitter!

<% end| %> With point at "|" the command 'backward-sexp' (C-M-b) correctly jumps to the beginning of "if". From debbugs-submit-bounces@debbugs.gnu.org Thu Apr 24 00:57:17 2025 Received: (at 77906) by debbugs.gnu.org; 24 Apr 2025 04:57:17 +0000 Received: from localhost ([127.0.0.1]:33444 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1u7oeC-0006n2-Gu for submit@debbugs.gnu.org; Thu, 24 Apr 2025 00:57:16 -0400 Received: from mail-pf1-x431.google.com ([2607:f8b0:4864:20::431]:53408) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1u7oe9-0006mY-8g for 77906@debbugs.gnu.org; Thu, 24 Apr 2025 00:57:14 -0400 Received: by mail-pf1-x431.google.com with SMTP id d2e1a72fcca58-72d3b48d2ffso463811b3a.2 for <77906@debbugs.gnu.org>; Wed, 23 Apr 2025 21:57:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1745470627; x=1746075427; 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=41lfPo3d+GXJy6VdkKqEREf3oj24NOG5DVc78XTgaKE=; b=ncDvK7Bloi0kdp6aud4meaLCg7uO/6lm//XjYW15befsDaM8Ms9Ojk3jWqAoaoXAs8 2+TavDhvZbnVL2oOeXsFuf+iT7xLuQhQQgt0dCswkoEx+p4Vd4fB0OX0axwXlPXhhkx+ 7tyJSq6FPY0Uu54/HwsiIq6iwQHifArCAkpD0upgITVir7Cb5IMQq0WFvA2/ApQxVI9R WnDQBIYR5Gfr+L2L+HuP9Xr6Sh1TBTCXIuuUc7X3ER0BPEXz+dv2xRi43p9p0Kau+8Zo rNyg7Tyc0qvR8thA6TB2Z2Nqzsxw1sfl8Himb0/7RddOx17d82tPppywwEs2nPiGv56m 3D3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745470627; x=1746075427; 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=41lfPo3d+GXJy6VdkKqEREf3oj24NOG5DVc78XTgaKE=; b=FrAj7zpA7o9xpJia6i2CYhYl1PX6Uf6cQewD2dWVT36p5QgDIgD9uMClQG62Xx37cl lQhnZ4dcIZoVIpG4ntGn89qwHhMLjopZY8BGBb5kzzsewNgul7ludwN/tMe+8Oo0Q4V8 nrNIn/h1hYJ5x2tu1G1olIasGJmaUvW/CLGfgDtttNB/4K2b6kXv7vnKB8VpfeKyO51M E1wN970dLKRRiXDjYOoLhqB8s+JHwQ6A/d952k4sCs75Uez9gW+Ao9+gMtaygjrAvKTI Mbf7nvY+rp3AzP7SaDT7teW4J0Oh4JUpqxyUJUe7o5H+xlPtqxK8EMBKYLZ364TeX1jV FdmA== X-Forwarded-Encrypted: i=1; AJvYcCXkW6d9bmJLyBugHS8Uxenuhk+kmef0xu+/uPO2bbEdjNd/89+qCMV9EGSnppiATTpcUS5qWQ==@debbugs.gnu.org X-Gm-Message-State: AOJu0Yz7aNMFgW0vATvq8RrzOgd8GcwaUXHZdBkxuX8N8rC6H/rrODpK h5WavZLxBeLbG57ZxrtsqSDLClknGeuhSS7FpiUlaYDA6yXuHWVU X-Gm-Gg: ASbGnctSWRcdbr32iNsZfFaiSJQ0vDtGFin/TwpimHuib+AJ6vGGBYbHtJpZch2SFki EJEqlj0+cSBvSIi8ZJUevPZEOmaAzW0IPRHhfdRrkAZLpY+Lu0YMUiGNJXcodxVkldPDChpPtJz //fpPAMM5MlHKdgcEKxFj8n9dyrLFoqZyVxL+KJ4HWaWmjs2IQYg9Izt3G+gm8ZSZ+paicZgcdH bNXRe3gzZIJkwKy0yw1b9uui3j1/bs0S66/7WymHgTEvEF72zMVuwsIJj/BH7hjG5r5lKSgwxmg PzcEtMlZ8+LQqxA5AY4kXKlNOwC8yZUE+ckJ6kgUYBg0yzKlkYjXMXB0LN15xSp8 X-Google-Smtp-Source: AGHT+IHsbuJqPDlh6FHywluZGtVC56pvNfocSa60GyAwddTS3qABx6ChTaiU2ABZvQw+dcgddPOvIw== X-Received: by 2002:a05:6a00:139b:b0:736:4fe0:2661 with SMTP id d2e1a72fcca58-73e24637c3cmr1755166b3a.11.1745470626906; Wed, 23 Apr 2025 21:57:06 -0700 (PDT) Received: from smtpclient.apple ([2601:646:8f81:6120:48a5:3bb2:9dd7:6c19]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-73e25a6a409sm467699b3a.117.2025.04.23.21.57.05 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 23 Apr 2025 21:57:06 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3826.400.131.1.6\)) Subject: Re: bug#77906: 31.0.50; php-js-mode and js-ts-mode: treesit-show-paren-data--categorize: peculiar error: ("Cannot find the definition of the predicate in `treesit-thing-settings'" list) From: Yuan Fu In-Reply-To: <87bjsmddh5.fsf@mail.linkov.net> Date: Wed, 23 Apr 2025 21:56:54 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: References: <3544088.LZWGnKmheA@fedora> <8734e3e4nt.fsf@mail.linkov.net> <31AF2138-2D14-476B-B3D4-587C38869EE6@gmail.com> <87wmbe7kkk.fsf@mail.linkov.net> <1186F98B-F7C4-4F68-92CE-0AFE4996E0DA@gmail.com> <87jz7c85fg.fsf@mail.linkov.net> <87bjsmddh5.fsf@mail.linkov.net> To: Juri Linkov X-Mailer: Apple Mail (2.3826.400.131.1.6) X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 77906 Cc: Vincenzo Pupillo , 77906@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > On Apr 23, 2025, at 9:55=E2=80=AFAM, Juri Linkov = wrote: >=20 >> Now added this docstring to the internal function >> 'treesit-show-paren-data--categorize': >>=20 >> "Return a list suitable for `show-paren-data-function' (which = see). >> If the optional argument END-P is non-nil, interpret the position = POS >> as belonging to the node that ends before POS (by subtracting 1 from = POS)." >>=20 >> I guess more functions will need such flag, e.g. 'backward-sexp' >> at the end of the range doesn't skip to the embedded node's start. >=20 > This patch is not for immediate installation, but > it demonstrates how this problem can be fixed: >=20 > diff --git a/lisp/treesit.el b/lisp/treesit.el > index bf5c1ed5f6c..c73b380f38c 100644 > --- a/lisp/treesit.el > +++ b/lisp/treesit.el > @@ -869,7 +869,7 @@ treesit-parsers-at > (let ((res nil)) > ;; Refer to (ref:local-parser-overlay) for more explanation of = local > ;; parser overlays. > - (dolist (ov (overlays-at (or pos (point)))) > + (dolist (ov (overlays-at (1- (or pos (point))))) > (when-let* ((parser (overlay-get ov 'treesit-parser)) > (host-parser (or (null with-host) > (overlay-get ov = 'treesit-host-parser))) >=20 > With this patch the following case works correctly in test.heex: >=20 > <%=3D if true do %> >

hello, tree-sitter!

> <% end| %> >=20 > With point at "|" the command 'backward-sexp' (C-M-b) > correctly jumps to the beginning of "if". Right. I think it can be done in backward-sexp since there we know = we=E2=80=99re moving back. I assume that=E2=80=99s what you mean. Yuan From debbugs-submit-bounces@debbugs.gnu.org Thu Apr 24 02:48:29 2025 Received: (at 77906) by debbugs.gnu.org; 24 Apr 2025 06:48:29 +0000 Received: from localhost ([127.0.0.1]:34430 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1u7qNo-0002qd-PM for submit@debbugs.gnu.org; Thu, 24 Apr 2025 02:48:29 -0400 Received: from relay6-d.mail.gandi.net ([217.70.183.198]:33725) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1u7qNm-0002qH-6g for 77906@debbugs.gnu.org; Thu, 24 Apr 2025 02:48:26 -0400 Received: by mail.gandi.net (Postfix) with ESMTPSA id 5A9AE439B7; Thu, 24 Apr 2025 06:48:17 +0000 (UTC) From: Juri Linkov To: Yuan Fu Subject: Re: bug#77906: 31.0.50; php-js-mode and js-ts-mode: treesit-show-paren-data--categorize: peculiar error: ("Cannot find the definition of the predicate in `treesit-thing-settings'" list) In-Reply-To: Organization: LINKOV.NET References: <3544088.LZWGnKmheA@fedora> <8734e3e4nt.fsf@mail.linkov.net> <31AF2138-2D14-476B-B3D4-587C38869EE6@gmail.com> <87wmbe7kkk.fsf@mail.linkov.net> <1186F98B-F7C4-4F68-92CE-0AFE4996E0DA@gmail.com> <87jz7c85fg.fsf@mail.linkov.net> <87bjsmddh5.fsf@mail.linkov.net> Date: Thu, 24 Apr 2025 09:47:08 +0300 Message-ID: <87o6wmf443.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/31.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-GND-State: clean X-GND-Score: -100 X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddvgeekjeekucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuifetpfffkfdpucggtfgfnhhsuhgsshgtrhhisggvnecuuegrihhlohhuthemuceftddunecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvfevufgjohhffffkfgggtgfgsehtkeertddtreejnecuhfhrohhmpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqnecuggftrfgrthhtvghrnhepieffteejgeehffejuedtiefhudekgeejteekiefgveeuheetvdefgeekkeevkedunecukfhppeeluddruddvledruddthedruddujeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpeeluddruddvledruddthedruddujedphhgvlhhopehmrghilhdrghgrnhguihdrnhgvthdpmhgrihhlfhhrohhmpehjuhhriheslhhinhhkohhvrdhnvghtpdhnsggprhgtphhtthhopeefpdhrtghpthhtohepjeejledtieesuggvsggsuhhgshdrghhnuhdrohhrghdprhgtphhtthhopehvrdhpuhhpihhllhhosehgmhgrihhlrdgtohhmpdhrtghpthhtoheptggrshhouhhrihesghhmrghilhdrtghomh X-GND-Sasl: juri@linkov.net X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 77906 Cc: Vincenzo Pupillo , 77906@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) >> @@ -869,7 +869,7 @@ treesit-parsers-at >> (let ((res nil)) >> ;; Refer to (ref:local-parser-overlay) for more explanation of local >> ;; parser overlays. >> - (dolist (ov (overlays-at (or pos (point)))) >> + (dolist (ov (overlays-at (1- (or pos (point))))) >> (when-let* ((parser (overlay-get ov 'treesit-parser)) >> (host-parser (or (null with-host) >> (overlay-get ov 'treesit-host-parser))) >> >> With this patch the following case works correctly in test.heex: >> >> <%= if true do %> >>

hello, tree-sitter!

>> <% end| %> >> >> With point at "|" the command 'backward-sexp' (C-M-b) >> correctly jumps to the beginning of "if". > > Right. I think it can be done in backward-sexp since there we know > we’re moving back. I assume that’s what you mean. The problem is that the last time when the arg is still -1 is in 'treesit-forward-sexp', and then it calls 'treesit-beginning-of-thing' with '(abs arg)'. The complete call chain: - treesit-forward-sexp - treesit-beginning-of-thing - treesit-navigate-thing - treesit-thing-at - treesit-node-at - treesit-parsers-at - overlays-at So not clear how to propagate the flag for decrementing the offset. Maybe by let-binding a new dynamically bound variable? From debbugs-submit-bounces@debbugs.gnu.org Sun May 04 12:52:57 2025 Received: (at 77906) by debbugs.gnu.org; 4 May 2025 16:52:57 +0000 Received: from localhost ([127.0.0.1]:58496 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uBcaG-0005DR-PA for submit@debbugs.gnu.org; Sun, 04 May 2025 12:52:57 -0400 Received: from relay6-d.mail.gandi.net ([217.70.183.198]:59695) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uBca9-0005BY-IG for 77906@debbugs.gnu.org; Sun, 04 May 2025 12:52:53 -0400 Received: by mail.gandi.net (Postfix) with ESMTPSA id DB8EB439BC; Sun, 4 May 2025 16:52:41 +0000 (UTC) From: Juri Linkov To: Yuan Fu Subject: Re: bug#77906: 31.0.50; php-js-mode and js-ts-mode: treesit-show-paren-data--categorize: peculiar error: ("Cannot find the definition of the predicate in `treesit-thing-settings'" list) In-Reply-To: <87o6wmf443.fsf@mail.linkov.net> Organization: LINKOV.NET References: <3544088.LZWGnKmheA@fedora> <8734e3e4nt.fsf@mail.linkov.net> <31AF2138-2D14-476B-B3D4-587C38869EE6@gmail.com> <87wmbe7kkk.fsf@mail.linkov.net> <1186F98B-F7C4-4F68-92CE-0AFE4996E0DA@gmail.com> <87jz7c85fg.fsf@mail.linkov.net> <87bjsmddh5.fsf@mail.linkov.net> <87o6wmf443.fsf@mail.linkov.net> Date: Sun, 04 May 2025 19:50:29 +0300 Message-ID: <875xigpbfu.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/31.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-GND-State: clean X-GND-Score: -100 X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddvjeekjeegucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuifetpfffkfdpucggtfgfnhhsuhgsshgtrhhisggvnecuuegrihhlohhuthemuceftddunecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvfevufgjohhffffkfgggtgesmhdtreertderjeenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucggtffrrghtthgvrhhnpedtiedthfehhfetteefgfefgffftedttdefjeefveekfefgteettddutefgleethfenucfkphepledurdduvdelrddutdehrdduudejnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepledurdduvdelrddutdehrdduudejpdhhvghlohepmhgrihhlrdhgrghnughirdhnvghtpdhmrghilhhfrhhomhepjhhurhhisehlihhnkhhovhdrnhgvthdpnhgspghrtghpthhtohepfedprhgtphhtthhopeejjeeltdeiseguvggssghughhsrdhgnhhurdhorhhgpdhrtghpthhtohepvhdrphhuphhilhhlohesghhmrghilhdrtghomhdprhgtphhtthhopegtrghsohhurhhisehgmhgrihhlrdgtohhm X-GND-Sasl: juri@linkov.net X-Spam-Score: -1.7 (-) X-Debbugs-Envelope-To: 77906 Cc: Vincenzo Pupillo , 77906@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.7 (--) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit >>> With this patch the following case works correctly in test.heex: >>> >>> <%= if true do %> >>>

hello, tree-sitter!

>>> <% end| %> >>> >>> With point at "|" the command 'backward-sexp' (C-M-b) >>> correctly jumps to the beginning of "if". >> >> Right. I think it can be done in backward-sexp since there we know >> we’re moving back. I assume that’s what you mean. > > The problem is that the last time when the arg is still -1 > is in 'treesit-forward-sexp', and then it calls > 'treesit-beginning-of-thing' with '(abs arg)'. > > The complete call chain: > > - treesit-forward-sexp > - treesit-beginning-of-thing > - treesit-navigate-thing > - treesit-thing-at > - treesit-node-at > - treesit-parsers-at > - overlays-at > > So not clear how to propagate the flag for decrementing the offset. > Maybe by let-binding a new dynamically bound variable? Ok, here is the patch: --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=treesit--parser-overlay-offset.patch diff --git a/lisp/treesit.el b/lisp/treesit.el index 69cc28b0cec..af33ae06610 100644 --- a/lisp/treesit.el +++ b/lisp/treesit.el @@ -839,6 +839,11 @@ treesit--clip-ranges if (<= start (car range) (cdr range) end) collect range)) +(defvar treesit--parser-overlay-offset 0 + "Defines at which position to get the parser overlay. +The commands that move backward need to set it to -1 to be +able to use the range that ends immediately before point.") + (defun treesit-parsers-at (&optional pos language with-host only) "Return all parsers at POS. @@ -869,7 +874,8 @@ treesit-parsers-at (let ((res nil)) ;; Refer to (ref:local-parser-overlay) for more explanation of local ;; parser overlays. - (dolist (ov (overlays-at (or pos (point)))) + (dolist (ov (overlays-at (+ (or pos (point)) + treesit--parser-overlay-offset))) (when-let* ((parser (overlay-get ov 'treesit-parser)) (host-parser (or (null with-host) (overlay-get ov 'treesit-host-parser))) @@ -3021,7 +3027,8 @@ treesit-forward-sexp t) (if (> arg 0) (treesit-end-of-thing pred (abs arg) 'restricted) - (treesit-beginning-of-thing pred (abs arg) 'restricted)) + (let ((treesit--parser-overlay-offset -1)) + (treesit-beginning-of-thing pred (abs arg) 'restricted))) ;; If we couldn't move, we should signal an error and report ;; the obstacle, like `forward-sexp' does. If we couldn't ;; find a parent, we simply return nil without moving point, @@ -3036,6 +3043,7 @@ treesit--forward-list-with-default ARG is described in the docstring of `forward-list'." (let* ((pred (or treesit-sexp-type-regexp 'list)) (arg (or arg 1)) + (treesit--parser-overlay-offset (if (> arg 0) 0 -1)) (cnt arg) (inc (if (> arg 0) 1 -1))) (while (/= cnt 0) @@ -3163,6 +3171,7 @@ treesit-up-list (interactive "^p") (let* ((pred (or treesit-sexp-type-regexp 'list)) (arg (or arg 1)) + (treesit--parser-overlay-offset -1) (cnt arg) (inc (if (> arg 0) 1 -1))) (while (/= cnt 0) --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Mon May 12 14:25:40 2025 Received: (at 77906) by debbugs.gnu.org; 12 May 2025 18:25:40 +0000 Received: from localhost ([127.0.0.1]:54720 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uEXqO-0001un-GO for submit@debbugs.gnu.org; Mon, 12 May 2025 14:25:40 -0400 Received: from relay1-d.mail.gandi.net ([2001:4b98:dc4:8::221]:57139) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uEXqJ-0001uV-RL for 77906@debbugs.gnu.org; Mon, 12 May 2025 14:25:39 -0400 Received: by mail.gandi.net (Postfix) with ESMTPSA id CCFE343A6F; Mon, 12 May 2025 18:25:27 +0000 (UTC) From: Juri Linkov To: Yuan Fu Subject: Re: bug#77906: 31.0.50; php-js-mode and js-ts-mode: treesit-show-paren-data--categorize: peculiar error: ("Cannot find the definition of the predicate in `treesit-thing-settings'" list) In-Reply-To: <875xigpbfu.fsf@mail.linkov.net> Organization: LINKOV.NET References: <3544088.LZWGnKmheA@fedora> <8734e3e4nt.fsf@mail.linkov.net> <31AF2138-2D14-476B-B3D4-587C38869EE6@gmail.com> <87wmbe7kkk.fsf@mail.linkov.net> <1186F98B-F7C4-4F68-92CE-0AFE4996E0DA@gmail.com> <87jz7c85fg.fsf@mail.linkov.net> <87bjsmddh5.fsf@mail.linkov.net> <87o6wmf443.fsf@mail.linkov.net> <875xigpbfu.fsf@mail.linkov.net> Date: Mon, 12 May 2025 21:23:29 +0300 Message-ID: <871pstg02m.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/31.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-GND-State: clean X-GND-Score: -100 X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdeftdduleejucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuifetpfffkfdpucggtfgfnhhsuhgsshgtrhhisggvnecuuegrihhlohhuthemuceftddunecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvfevufgjohhffffkfgggtgfgsehtkeertddtreejnecuhfhrohhmpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqnecuggftrfgrthhtvghrnhepieffteejgeehffejuedtiefhudekgeejteekiefgveeuheetvdefgeekkeevkedunecukfhppeeluddruddvledruddthedruddujeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpeeluddruddvledruddthedruddujedphhgvlhhopehmrghilhdrghgrnhguihdrnhgvthdpmhgrihhlfhhrohhmpehjuhhriheslhhinhhkohhvrdhnvghtpdhnsggprhgtphhtthhopeefpdhrtghpthhtohepjeejledtieesuggvsggsuhhgshdrghhnuhdrohhrghdprhgtphhtthhopehvrdhpuhhpihhllhhosehgmhgrihhlrdgtohhmpdhrtghpthhtoheptggrshhouhhrihesghhmrghilhdrtghomh X-GND-Sasl: juri@linkov.net X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 77906 Cc: Vincenzo Pupillo , 77906@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) >>>> With this patch the following case works correctly in test.heex: >>>> >>>> <%= if true do %> >>>>

hello, tree-sitter!

>>>> <% end| %> >>>> >>>> With point at "|" the command 'backward-sexp' (C-M-b) >>>> correctly jumps to the beginning of "if". >>> >>> Right. I think it can be done in backward-sexp since there we know >>> we’re moving back. I assume that’s what you mean. >> >> The problem is that the last time when the arg is still -1 >> is in 'treesit-forward-sexp', and then it calls >> 'treesit-beginning-of-thing' with '(abs arg)'. >> >> The complete call chain: >> >> - treesit-forward-sexp >> - treesit-beginning-of-thing >> - treesit-navigate-thing >> - treesit-thing-at >> - treesit-node-at >> - treesit-parsers-at >> - overlays-at >> >> So not clear how to propagate the flag for decrementing the offset. >> Maybe by let-binding a new dynamically bound variable? > > Ok, here is the patch: Now pushed to master. From unknown Tue Jun 17 01:43:49 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 10 Jun 2025 11:24:10 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator