From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Vincenzo Pupillo Newsgroups: gmane.emacs.bugs Subject: bug#75456: 31.0.50; Cannot find the definition of the predicate in `treesit-thing-settings'" sexp-list) Date: Thu, 09 Jan 2025 23:42:01 +0100 Message-ID: <19750222.fSG56mABFh@fedora> References: <2719520.lGaqSPkdTl@3-191.divsi.unimi.it> <87msfzvox7.fsf@mail.linkov.net> 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="5404"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Yuan Fu , 75456@debbugs.gnu.org To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jan 09 23:43:46 2025 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 1tW1Fh-0001HP-Pl for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 09 Jan 2025 23:43:45 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tW1F3-0006Mr-GM; Thu, 09 Jan 2025 17:43: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 1tW1F1-0006Mi-J6 for bug-gnu-emacs@gnu.org; Thu, 09 Jan 2025 17:43: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 1tW1F1-0006Qx-AL for bug-gnu-emacs@gnu.org; Thu, 09 Jan 2025 17:43:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=m+PtPUnaiu5rVrMJ9Tcg7aAsG5tVLrLoY3bJSQ/nzRU=; b=C7vT4XXyhBDK8U0m3E7JpSHLhCPd8SaXxfSZIZbZRlu9ef062mG9kTndfLJllo+jVP7Tyt1RvxejJYLM4Ij3WkC5g3qi8PvYgddf/CH8Wa5tQQ1ZdVjW2Tm2YTU4y1Q4deLTj6CGYo0/HqaDN0yuqdBprWxlwEnR22V2pLkLLJsOIb5p1pVgBEK0CCLq/hS1QlN2TA2DcwzNobWzOFJ3CHFn/XsFQzkdieGCeKJ2pFdz6+oL2G/GJahOMr9U//YNFxXKvVCF8miHOO6qoR3wsOOExWz6z1plVDjp+nZdc1Fh1rO2joolfi4TKOhJOIXn4XltIpFIhypR1YUJsQkVFg==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tW1F0-0002W6-LH for bug-gnu-emacs@gnu.org; Thu, 09 Jan 2025 17:43:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Vincenzo Pupillo Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 09 Jan 2025 22:43:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 75456 X-GNU-PR-Package: emacs Original-Received: via spool by 75456-submit@debbugs.gnu.org id=B75456.17364625319565 (code B ref 75456); Thu, 09 Jan 2025 22:43:02 +0000 Original-Received: (at 75456) by debbugs.gnu.org; 9 Jan 2025 22:42:11 +0000 Original-Received: from localhost ([127.0.0.1]:55209 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tW1EB-0002UD-9c for submit@debbugs.gnu.org; Thu, 09 Jan 2025 17:42:11 -0500 Original-Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]:46560) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1tW1E9-0002Tz-LZ for 75456@debbugs.gnu.org; Thu, 09 Jan 2025 17:42:10 -0500 Original-Received: by mail-wr1-x429.google.com with SMTP id ffacd0b85a97d-3863c36a731so1071459f8f.1 for <75456@debbugs.gnu.org>; Thu, 09 Jan 2025 14:42:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1736462523; x=1737067323; 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=m+PtPUnaiu5rVrMJ9Tcg7aAsG5tVLrLoY3bJSQ/nzRU=; b=Y50GbnhRO9Ug4JE440CAy+/ogSK7njTItlclmMBQbrbaxGFd4AaNpla0S4QgiZ08Gq GdbhwFHnqLyaftYnq0A05lhRrOnAYvyF1Ox4Toef/vJPoRTSh8sf3CwXcpY4kcRXLZUL +Jkh+V4SIbFKxkg8KtW6grT9ih7D5N96xYKNm9lNQ1A693DvAFhuD2kotPxpL+ne48RW Qu3BjOtW9CLbwwnAnwCjRWzbvsZmBPeL7eW9HTpSfEHdGZSwZoj+E0ruyAOdD6S2mmsE pNIvVmn+QQIMssibxbMFKg1QQTbSS00wh9u//Vkom46id5XnmWvLQv8Pl7TkeY3iw9Me R/8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736462523; x=1737067323; 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=m+PtPUnaiu5rVrMJ9Tcg7aAsG5tVLrLoY3bJSQ/nzRU=; b=kH7Q6J6rPtj33+zv6iAcImlo6lK1ZH0pt7eRdj/bBiapgE3+GaUqG9i74bSJpFdwde LrsYbs5/Hxrs90bqqnKWK7LiWmzRHxaJnDiSrOW0yTSKJwf6NSf2Oa/G4PZPIBnD41JB /UAmzdGHEpXrgUHBH1pBk74KY6+dWYPpJ/bn8YAS7P4dYeONVDmsEdS9V90SHUS+DLyG ebElWixTeUAa5xsxGvZLVADRQX/g6XRfU/qOYse1EXwAJ0ceAllQdF0dUTHwwEI4P4Si 2L6CNLq5k6v3S3BsbYHU6AHuGx7fq2vG77u/AEd3ZBz5ibl+wbUbsqs2WKZRBZkrnIZG /Vdw== X-Forwarded-Encrypted: i=1; AJvYcCVy8B11SjaGs/MoZ4p2ucT/ttRJoGjz/hv8gtgFtnH3clSNrl4B8Lo113qjAw0Lrx5WEPiw/g==@debbugs.gnu.org X-Gm-Message-State: AOJu0YyY9Mca5CemLXNCBqbY3BHAJ5LzxEIGpdO6e8POuz6w3A5Fvd9m h/gxjQH8uNWR2Drb1ZvSw2grlrCAgarvIIWKQTPLB3PFjjlXwYy2gjp5oA== X-Gm-Gg: ASbGncu0wZD6HgQ75m7B3OAv492flF9uJFkSkq2ZfqXj5afPMQ9LpSbUy5PvKttEh/G lOLyEhZlve3Kog5cJueCqTxou1x83m/Kz3EFEordtit7S2Et21EIbGbnDqzO9XaZr0Q3mIpAMsI i1WaegyHh7K+vHwdUK4xf/nCaMeun1xMEWwz9aeZ3dRoivG1SjfXr7zwW85nAq9X/ZdsaO4ktp6 w4O78jIzYdkXpNdcRddzCHZGEG+K8RjzS7hZ+ZyNNOXUCOGwjrEtSh0g2uhxOUA+gsM3c/JggIP X1/lZZeXnE+Oc088yVJX X-Google-Smtp-Source: AGHT+IEXvnTrbCdBhCP5RUY0exN/F0bWV4oGPLQSnRBK8irLxVLfenqkS17JvlDDAvs2ovwXExDFZA== X-Received: by 2002:a05:6000:712:b0:38a:615c:8225 with SMTP id ffacd0b85a97d-38a87305486mr8124230f8f.15.1736462523028; Thu, 09 Jan 2025 14:42:03 -0800 (PST) Original-Received: from fedora.localnet (2-230-139-124.ip202.fastwebnet.it. [2.230.139.124]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-436e9d8fd03sm34799485e9.6.2025.01.09.14.42.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Jan 2025 14:42:02 -0800 (PST) In-Reply-To: <87msfzvox7.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:298857 Archived-At: Ciao Juri, In data gioved=C3=AC 9 gennaio 2025 19:10:28 Ora standard dell=E2=80=99Euro= pa centrale,=20 Juri Linkov ha scritto: > > Ciao, > > this problem occurs with js-ts-mode when jsdoc is enabled. Occurs when = you > > place the cursor in a comment highlighted by jsdoc. > > This is the error message: > >=20 > > "treesit-show-paren-data--categorize: peculiar error: ("Cannot find the > > definition of the predicate in `treesit-thing-settings'" sexp-list)" >=20 > Recently I fixed bug#75198 and tested it on your mhtml-ts-mode > where it works nicely, and (treesit-language-at (point)) > returns e.g. 'css' on embedded css. >=20 > However, now I discovered that (treesit-language-at (point)) > returns 'javascript' on embedded jsdoc parts of a js file. >=20 > I wonder is this intended? >=20 > Since 'treesit-node-match-p' uses node's parser, I could use > (treesit-parser-language (treesit-node-parser (treesit-node-at (point)))) > that returns 'jsdoc'. >=20 > But first I'd like to know why treesit-language-at doesn't return the sam= e? Local parsers, like jsdoc or phpdoc, are "ignored" by several functions use= d=20 by treesit. But I don't know in detail how treesit works. I tried to return local parser languages =E2=80=8B=E2=80=8Bin the past, but= both indentation=20 and font-locking got messed up. I just tried and the result is the same (maybe I did something wrong), and= =20 then treesit-parser-list also returns jsdoc as if it were a global parser. @Yuan can be of more help. Thanks. Vincenzo