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.devel Subject: Re: treesit-range-settings with ':local' : I missed something or it's a bug? Date: Wed, 31 Jan 2024 21:05:46 +0100 Message-ID: <2757984.mvXUDI8C0e@fedora> References: <6107698.MhkbZ0Pkbq@3-191.divsi.unimi.it> <3273091.aeNJFYEL58@fedora> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart12412199.O9o76ZdvQC"; micalg="pgp-sha256"; protocol="application/pgp-signature" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="12425"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Yuan Fu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Feb 01 07:05:13 2024 Return-path: Envelope-to: ged-emacs-devel@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 1rVQCH-00036m-Im for ged-emacs-devel@m.gmane-mx.org; Thu, 01 Feb 2024 07:05:13 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rVQBP-0000n9-CW; Thu, 01 Feb 2024 01:04:19 -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 1rVGqP-0000Og-C9 for emacs-devel@gnu.org; Wed, 31 Jan 2024 15:06:01 -0500 Original-Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rVGqM-000405-CE for emacs-devel@gnu.org; Wed, 31 Jan 2024 15:05:59 -0500 Original-Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-40faf6788d1so7837375e9.0 for ; Wed, 31 Jan 2024 12:05:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706731556; x=1707336356; darn=gnu.org; h=mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:from:to:cc:subject:date:message-id:reply-to; bh=hlAS1eGFWndhD7+i28Mn/6bz5a2AspdOrLu9TbOdn50=; b=mMXux950RVDS8Ufl7KH6yUJJ75NZbunepgLANZs66ZDObQ6XQOuBZJlRKAxyrOuKcJ wLb+klnGj9iZo3s+bpMht5FSJiXfLsC7B6LyCwD59upBOnnu4bxkoALWjruFgyg5WNld /2T33W0SjC7ZxuHIaKfeFbFyENqpHKNbMLvQxnindBC+n8ifW/WPpNHQZhxE7+pEU+5n jdyXFdD6V6qjaTlfu967bX7Nod1RhClB29Knq3XPAR+JnOMVLHDph83FD1Nk9FvlXXNA aUNs7wbn5OqK3KrL/ecuN4e66VnBMSf7fRWNPDkGdL1H3Y9lOl9X6rbuzYbtzNZTAPKh nYLw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706731556; x=1707336356; h=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=hlAS1eGFWndhD7+i28Mn/6bz5a2AspdOrLu9TbOdn50=; b=slaLWfM0NVsGOdHfXlCxxNiQc1pF3zmvKanFn4OLB9PrABodvPo+I5cd31OpEovh7x exKUzMtpDym7gJWvFS4sNKNb99zZW06+tNCZz0xhEjEl8LQ1EkVD5KcXPJ943fyjO4B6 Af1DuGcse6Tyn3/k4he1yjAHcVzvJ4H1PHDgNwysT6iCB6NGi7bFr85ULCsckY+7Ghux jLMtIKi4DZAdJZvIAgwZZFW+gCa2uK0TizzAyzsdOhOeo/oTr5HSc38EnpBw8QrNUYFc IqStd09GQcBLlZ73bdwpJ7RYVVnRzRLfJW5jJYxu2iYz4f7eUPpdLlszWanW6ji/RipK DeTQ== X-Gm-Message-State: AOJu0YyvOdxXiYN2P1XM8xwDnAcsodusKPxR7vTmoTKVyLl+ePckGV/q 3JhxsFRmKaH2cbaeFp8QgjJ1HjtQoVzw613a1WJD0s3HWr3k7rEw X-Google-Smtp-Source: AGHT+IHhUDqchdOJzjleVs9G9rhi3uw9d0sk664P04XEywBYycE7D8Ca1ZdrkUgB1h5d86KtySE3Qw== X-Received: by 2002:adf:ea92:0:b0:33a:ded1:b01 with SMTP id s18-20020adfea92000000b0033aded10b01mr5228824wrm.28.1706731555642; Wed, 31 Jan 2024 12:05:55 -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 m22-20020a7bce16000000b0040e5951f199sm2408659wmc.34.2024.01.31.12.05.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Jan 2024 12:05:55 -0800 (PST) In-Reply-To: Received-SPF: pass client-ip=2a00:1450:4864:20::333; envelope-from=v.pupillo@gmail.com; helo=mail-wm1-x333.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, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Thu, 01 Feb 2024 01:04:17 -0500 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:315693 Archived-At: --nextPart12412199.O9o76ZdvQC Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8"; protected-headers="v1" From: Vincenzo Pupillo To: Yuan Fu Cc: emacs-devel@gnu.org Date: Wed, 31 Jan 2024 21:05:46 +0100 Message-ID: <2757984.mvXUDI8C0e@fedora> In-Reply-To: MIME-Version: 1.0 Thanks Yuan,=20 now work correctly. V. In data mercoled=C3=AC 31 gennaio 2024 07:32:47 CET, Yuan Fu ha scritto: > > On Jan 29, 2024, at 6:04 AM, Vincenzo Pupillo wro= te: > >=20 > > Hi Yuan, > >=20 > > In data domenica 28 gennaio 2024 08:09:02 CET, Yuan Fu ha scritto: > >> Actually, local parsers are not included in the return value of > >> (treesit-parser-list). By default, treesit-parser-list returns all the > >> parsers whose tag is nil, but all the local parsers carry a tag of > >> =E2=80=98embedded. To actually return all the parsers in the buffer yo= u need to > >> use > >> (treesit-parser-list nil nil t), ie, pass t to the TAG parameter. > >>=20 > >> I pulled your php-ts-mode_phpdoc.el and played around with it. I found > >> the > >> root cause to be the call to > >>=20 > >> (treesit-parser-create =E2=80=98phpdoc) > >>=20 > >> In the major mode body. This creates a global phpdoc parser that > >> fontifies > >> everything in doc face. > >>=20 > >> Removing that, plus the fix for #1 that I just pushed to master, should > >> fix > >> the font-lock problem you are observing. > >=20 > > It seems to work, but just try to indent the entire buffer, and the > > problem > > reappears. Before indenting: > > ((# ((1 . 271))) (# ((= 161 > > . 223))) (# ((73 . 138))) > > (# nil) (# ((517 . > > 621))) (# ((672 . 810))) (# > phpdoc> ((939 . 1032))) (# ((1157 . 1223)))) > >=20 > > after indenting the whole buffer: > >=20 > > ((# ((1 . 271))) (# ((= 161 > > . 223))) (# ((73 . 138))) > > (# nil) (# ((517 . > > 621))) (# ((672 . 810))) (# > phpdoc> ((939 . 1032))) (# ((1157 . 1223))) > > (# nil)) > >=20 > > As you can see the list of parsers has changed, and the latest one is: > > (# nil) . > >=20 > > To reproduce the problem: > > 1. open a php file (for e.g. the php file attached) > > 2. Indent the entire buffer > > 3. add a comment line inside a document block > >=20 > > The attached screenshot shows the result. >=20 > That=E2=80=99s due to a bug in treesit--indent-1. I=E2=80=99ve pushed a f= ix for it to > master. It should solve your problem. BTW, you don=E2=80=99t need to call > flush-syntax-ppss anymore, we fixed that bug a while back. >=20 > Yuan --nextPart12412199.O9o76ZdvQC Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. Content-Transfer-Encoding: 7Bit -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEfcBYMYUgfgreALXi6SZwW3t9jOoFAmW6qBoACgkQ6SZwW3t9 jOpAQA/+IFhpLKIIdR4QhP5QTpyYG20NU1G1hEnDxmNN8LbQM/IAAy9xNzyofxU9 dDIjiq9PksZHjJge47P2gLQcEvF9GByDWd2yd7liQgAVuWfHHWObkZ9SETdpdZAT BfqI6AmoO2pmJ1FTZfQchKP1w0XGpl7K4uhwUQvXJ0fgtqqT2/ljKNpvwDiwkeaE k0fcb8RYOiu4AAtiOQJ2wc1AyUdqstrwm1pjXlY1HjnlunIFHEyGKjRmFn/c34ZW VByhnzfkM/y6hrLO3R4CoexubBbLSPQEXP091elt+tSILg8vBe8jmZ/+RUC9gWY+ UBstCscKsn4SWy1bNwJ/JnB38NBC3Mi5uIHoql+X7tvpgc6geyRoqqtx3UnWVQYN wxgi2uVsAD7btli0jSq2M27rrHfb4iSIlzY0QK3seE6tkEf2Hl+pfqI5oYkB+Taz jLqza/KL7njHc/aXTDJ1DoeY2Sc9I2Kt94WXZUIUlTa+WPYA2h5Pxx2MFp01/GSC ZU+ADBT9DNODyMIaw1yoAnWQwlHyOD+itWKpH9TBInxsSq1Ebshj12867FQVVfav hWk6N535K8wSZZD0cbGilI1aNgrnY9CCwWZjfJCl9LTMK6/5rUGA0uaU1wbH3/+d otTMSvMGCxi3sn/FTpde43Zt7deG7JQbGws01eyadXCXrrayXNM= =Fqk6 -----END PGP SIGNATURE----- --nextPart12412199.O9o76ZdvQC--