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: Sat, 4 Feb 2023 15:38:17 -0800 Message-ID: References: <83tu0kkuqo.fsf@gnu.org> <7B62BDA1-C46B-4373-B3A7-2F9E34F3D803@gmail.com> <83tu03ur55.fsf@gnu.org> Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.300.101.1.3\)) 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="8320"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 60983@debbugs.gnu.org, theo@thornhill.no To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Feb 05 00:39:18 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 1pOS7p-00022Y-UL for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 05 Feb 2023 00:39:18 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pOS7d-0007xy-Ff; Sat, 04 Feb 2023 18:39: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 1pOS7b-0007wv-OW for bug-gnu-emacs@gnu.org; Sat, 04 Feb 2023 18:39:03 -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 1pOS7Z-0002HK-QF for bug-gnu-emacs@gnu.org; Sat, 04 Feb 2023 18:39:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pOS7Z-0001WC-Ma for bug-gnu-emacs@gnu.org; Sat, 04 Feb 2023 18:39:01 -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, 04 Feb 2023 23:39:01 +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: Bug Report Emacs , theo@thornhill.no Original-Received: via spool by submit@debbugs.gnu.org id=B.16755539175809 (code B ref -1); Sat, 04 Feb 2023 23:39:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 4 Feb 2023 23:38:37 +0000 Original-Received: from localhost ([127.0.0.1]:43610 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pOS7B-0001Vc-DF for submit@debbugs.gnu.org; Sat, 04 Feb 2023 18:38:37 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:47926) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pOS77-0001VO-AO for submit@debbugs.gnu.org; Sat, 04 Feb 2023 18:38:35 -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 1pOS77-0007pe-47 for bug-gnu-emacs@gnu.org; Sat, 04 Feb 2023 18:38:33 -0500 Original-Received: from mail-pl1-x62b.google.com ([2607:f8b0:4864:20::62b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pOS75-0002Dy-Ji; Sat, 04 Feb 2023 18:38:32 -0500 Original-Received: by mail-pl1-x62b.google.com with SMTP id z1so8757030plg.6; Sat, 04 Feb 2023 15:38:30 -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=XhnX5+0lAAOU7QtJ+oXlFdrz5vl8c4dgaZJ8Xi4svzY=; b=W2k9IbDXcxNpbPFhHcFuWTo1dK6Zs5ZauwBf8kDL/lFOJ7tJiBT3n+II617Yw7TaHf N9b86YYVSR/0yorQYskh4CnikFa3dRNO5rEYVhxPuRstLTJb4ajIp4uanH6E++mFp0V2 HPoOvBkAK+Xajc6Wm5B+a3sAyXMAKm84ij5rIqzhwA9W9RR812ECmB6qySzUTC87hyzu ScAmcrL4JZRXnLPcT/tYO+SmT+6WWuiYxYG8onGbnLRAuFhFl0PayhhWa9ixfaZbuv6g 4ajYo92tPmiySgN+DFbW+aFZ6YAy/+XOJ+mG6wnDieO82LlIXxhnvNXnvzzonaa4rp/4 B/TA== 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=XhnX5+0lAAOU7QtJ+oXlFdrz5vl8c4dgaZJ8Xi4svzY=; b=h1H2rFBWP0Epb7gkIa4l7jdTOsjJ/u3lJ6rvupL7xOmpKp3suA+twh5LYJiGjqusll 0zbQNWGWUf0FGwttZPr9rVbVOpN3iaVvki3TQXJrJL3buZOLXCesRRJ3zXmUQJ8FeP6K 7upqrRDzdccSao6BPwdxVh1g8AAiYdAJedmnNm6es0/PrNE7z+TnxWhjeuSgc9qbBIF/ VY1oLFJhIa3uS6kkMOloduOyIKzbCzHR0772rg6uPEzAz+26pf1X3fradmCYk/wcPWjI aLRhOdrWZzIJ6S7cOlyKVsZRovj95RwhJ0aVpAGeQClO2GJwwIugbrTlSxGi/UkAleUf nAXA== X-Gm-Message-State: AO0yUKVuyqdXFVNTgv4x7svMisbMkXCXRwg6E59c4gQVyAvmwaC3zQLy z9/824u2mBhqq4eNR3UsV13LgaK9GZg= X-Google-Smtp-Source: AK7set/r3VweWUODbSHVkmaMEc8P6H29iQqZq6gHDAEWvge8zuJug3PQQWgJ3XA6rzBDVAZ5KCEHAg== X-Received: by 2002:a17:90b:4a90:b0:230:8afb:7a55 with SMTP id lp16-20020a17090b4a9000b002308afb7a55mr4111338pjb.0.1675553909889; Sat, 04 Feb 2023 15:38:29 -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 g8-20020a17090a290800b00230aa9a61a2sm68996pjd.7.2023.02.04.15.38.29 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 04 Feb 2023 15:38:29 -0800 (PST) In-Reply-To: <83tu03ur55.fsf@gnu.org> X-Mailer: Apple Mail (2.3731.300.101.1.3) Received-SPF: pass client-ip=2607:f8b0:4864:20::62b; envelope-from=casouri@gmail.com; helo=mail-pl1-x62b.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:254799 Archived-At: > On Feb 2, 2023, at 11:47 PM, Eli Zaretskii wrote: >=20 >> From: Yuan Fu >> Date: Thu, 2 Feb 2023 19:07:07 -0800 >> Cc: Bug Report Emacs , >> Theodor Thornhill >>=20 >> I just read the new manual sections, thanks for the work! Do we want = to mention treesit-font-lock-recompute-features in the user manual? = That=E2=80=99s the only way for someone to add/remove specific features = (as opposed to changing the decoration level). (We might also want to = mention that changing treesit-font-lock-features directly doesn=E2=80=99t = have any effect, similar to treesit-font-lock-level.) >=20 > treesit-font-lock-recompute-features is a non-interactive function, so > mentioning it in the user manual is generally inappropriate. Users > are unlikely to add features that aren't already defined in the mode's > font-lock setup. >=20 > This function and its use in these situations are described in the > ELisp manual, where I think it belongs. >=20 > As for the fact that changing treesit-font-lock-feature-list directly > doesn't have any effect, that is already in the doc string. I'm not > opposed to mentioning that in the manual as well, but I see no problem > with what we have. I see. Sounds good to me. I meant enabling/disabling features when I say = =E2=80=9Cadding/removing=E2=80=9D features. Does that make anything = different? >=20 >> treesit-font-lock-recompute-features is intended to be used in major = mode hooks, like >>=20 >> (add-hook 'c-ts-mode-hook #'c-ts-setup) >>=20 >> (defun c-ts-mode-setup () >> (treesit-font-lock-recompute-features >> '(emacs-devel) >> '(property bracket delimiter operator variable function))) >=20 > This belongs to the ELisp manual, IMO. Ok, then I think there=E2=80=99s nothing needed to change in the Emacs = manual. Yuan=