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#60983: 29.0.60; Tree-sitter user-level control Date: Mon, 23 Jan 2023 11:37:24 -0800 Message-ID: References: <83tu0kkuqo.fsf@gnu.org> <87tu0k3y6t.fsf@thornhill.no> <83mt6ckqts.fsf@gnu.org> <87zgacgiwe.fsf@thornhill.no> Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.300.101.1.3\)) 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="9106"; mail-complaints-to="usenet@ciao.gmane.io" Cc: eliz@gnu.org, 60983@debbugs.gnu.org To: Theodor Thornhill Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jan 23 20:38:29 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 1pK2eC-0002FL-M3 for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 23 Jan 2023 20:38:28 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pK2dn-0004Q8-P7; Mon, 23 Jan 2023 14:38: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 1pK2dm-0004Pw-L7 for bug-gnu-emacs@gnu.org; Mon, 23 Jan 2023 14:38:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pK2dm-0001rG-C0 for bug-gnu-emacs@gnu.org; Mon, 23 Jan 2023 14:38:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pK2dm-0002S2-73 for bug-gnu-emacs@gnu.org; Mon, 23 Jan 2023 14:38: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: Mon, 23 Jan 2023 19:38:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60983 X-GNU-PR-Package: emacs X-Debbugs-Original-Cc: Eli Zaretskii , Bug Report Emacs Original-Received: via spool by submit@debbugs.gnu.org id=B.16745026639395 (code B ref -1); Mon, 23 Jan 2023 19:38:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 23 Jan 2023 19:37:43 +0000 Original-Received: from localhost ([127.0.0.1]:55370 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pK2dT-0002RS-EY for submit@debbugs.gnu.org; Mon, 23 Jan 2023 14:37:43 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:60290) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pK2dR-0002RK-0P for submit@debbugs.gnu.org; Mon, 23 Jan 2023 14:37:41 -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 1pK2dQ-0004P5-JU for bug-gnu-emacs@gnu.org; Mon, 23 Jan 2023 14:37:40 -0500 Original-Received: from mail-pf1-x42e.google.com ([2607:f8b0:4864:20::42e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pK2dP-0001ix-0v; Mon, 23 Jan 2023 14:37:40 -0500 Original-Received: by mail-pf1-x42e.google.com with SMTP id 207so9649686pfv.5; Mon, 23 Jan 2023 11:37:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; 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=CiRumTyQ81W+n5LPM8prS9Nmf/pm8qH6GjJp0Awy8So=; b=qV7bBFQPgmPOA4WrBtwDsidVBMtb9C/KJnEoo6JrSdE3ENSdbXSGP/DgTQw1MLVr/H xRkPWegNGOEw4RYQehRA1i5n5UXZGZfdEZg3bfZXTg1HpQ1aFgQaqNYStEJJgkMxKkyl HzKnT3MZWEK+u97RhPa3MFV/U4fFT38/vKQ/htS92FGu3c1QZubdvNCETXIxOVBmCj42 B4gAQklkZGaRBNqsU4pmlmv2ke7CvaWl27JQX9KeBkpZflEQohYauz8V82q14o9Y+COy UI8xOcMEQcF/F+k9nWzmL3zvKoirucVH6MhJtq7+cMY0Q83fIqZgQKcbF/fzQvvKXCya 0yaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=CiRumTyQ81W+n5LPM8prS9Nmf/pm8qH6GjJp0Awy8So=; b=uZbPIbIR/1MF80F1jNHgV/VDHmBRNGE36zzYvTiJW+GZgaUEPfgPuRilo/rZcLUC1T 67U0N89cwSNt6/q1NSfdPTT712zkLeW0CBaCLK2RWemSTeRY/4XHzseWkS35JUYAX89H o9MjBJjMmrx9arGM5kq37/R9W3xLAX5Pa6gU2dz8CEX2jGw01i96ekuXJujblpGF6gLm gLf+iglgFFROJpbv/JvXHIan8t8sP7HOljfWJGJ80pYdqboMlap2eE8s0fp4BOHNzJEW DFC7WzOSKK0Z+2slT6rYymSBc+yYmIYVjHFj+4QSJ16xRDKAmwOhR66uTsJ0zwZ1jBTG PXxA== X-Gm-Message-State: AFqh2kqs1waeDwxlWLW6yyEfZE3rXA9UHYPwjgHoqa7lA6Um9WQZmtJB 40vk0eyLuPTnTpfhvnNtov0= X-Google-Smtp-Source: AMrXdXtU1MaxBLcypi1bjYEknT3xF29/T9fd2u5HKjc7nHwiGXWRfYyuttDaX8okmdsDn9pahfmV9Q== X-Received: by 2002:a62:6144:0:b0:583:9b05:d1f0 with SMTP id v65-20020a626144000000b005839b05d1f0mr25014614pfb.33.1674502656057; Mon, 23 Jan 2023 11:37:36 -0800 (PST) Original-Received: from smtpclient.apple (cpe-172-117-161-177.socal.res.rr.com. [172.117.161.177]) by smtp.gmail.com with ESMTPSA id y12-20020a62640c000000b005819313269csm31476706pfb.124.2023.01.23.11.37.35 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 23 Jan 2023 11:37:35 -0800 (PST) In-Reply-To: <87zgacgiwe.fsf@thornhill.no> X-Mailer: Apple Mail (2.3731.300.101.1.3) Received-SPF: pass client-ip=2607:f8b0:4864:20::42e; envelope-from=casouri@gmail.com; helo=mail-pf1-x42e.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-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:254026 Archived-At: Sorry for the delay, overall I agree with your changes. >=20 > . How does one use treesit-font-lock-level? >=20 > - It is not a customizable user option (unlike > font-lock-maximum-decoration), so it cannot be set via > customize-variable. Is there a reason not to make it a > defcustom? > - It automatically becomes buffer-local when set, and OTOH setting > it in a buffer does not produce fontifications according to the > level, and neither does setting it in a mode hook. So the only > way to change its value is by using setq-default, which I don't > think is the intent? > - Should we make the variable a defcustom? Yeah it should be a defcustom.=20 > - Should it be possible to customize it separately for each mode? > - Should we allow to change the level and then call some function > to re-fontify the current buffer according to the new level? You can set this variable and call treesit-font-lock-recompute-features = with no argument, which enables/disables features according to the = current level. > Ok, I'll make a bugreport for this. >=20 >>> However, going over it I see there are lots of regressions after the = new >>> bracket-counting code added recently, effectively making the indent >>> styles pretty broken right now... Sorry about that :-( >=20 >=20 >>>> . What commands are affected by treesit-defun-tactic? >>>=20 >>> 'treesit--navigate-thing' uses it, so 'beginning-of-defun', >>> 'forward-sentence' etc uses it through 'treesit-beginning-of-thing'. >>=20 >> What commands except those that call treesit--navigate-thing call >> beginning-of-defun and treesit-beginning-of-thing? >=20 > I'll defer to Yuan for this :) treesit-beginning/end-of-defun are called by beginning/end-of-defun, so = other functions like mark-defund are also affected by = treesit-defun-tactic. Treesit-beginning-of-thing is on master, not on = emacs-29. Yuan=