From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Turing on tree-sitter Date: Mon, 10 Oct 2022 10:52:21 -0400 Message-ID: References: <83czb1jrm3.fsf@gnu.org> <87v8ot2nfi.fsf@posteo.net> <837d19jfia.fsf@gnu.org> <83edvgi3mx.fsf@gnu.org> <87r0zg5g76.fsf@thornhill.no> <78205E8D-B2D4-4460-BE0A-9BF7C627A79B@gmail.com> <87zge4b0lc.fsf@posteo.net> <83zge4gk9z.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="2896"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: Philip Kaludercic , casouri@gmail.com, theo@thornhill.no, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Oct 10 17:11:40 2022 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 1ohuRO-0000Tg-VV for ged-emacs-devel@m.gmane-mx.org; Mon, 10 Oct 2022 17:11:39 +0200 Original-Received: from localhost ([::1]:48528 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ohuRN-0005IT-Rv for ged-emacs-devel@m.gmane-mx.org; Mon, 10 Oct 2022 11:11:37 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60126) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ohu8z-0003zd-Pk for emacs-devel@gnu.org; Mon, 10 Oct 2022 10:52:37 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:21826) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ohu8t-0000mi-TO; Mon, 10 Oct 2022 10:52:36 -0400 Original-Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 3C1F1441ADA; Mon, 10 Oct 2022 10:52:29 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id A52CF44162D; Mon, 10 Oct 2022 10:52:23 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1665413543; bh=Z5GDll9MWPYHrApZFm9K46H0h81K/GfI3w8iCRg0fhg=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=g6aMa4B2tkG0VIzUKArcU4gvZJgUbG6o001vMYXlFAHKP3dJ+Fz3VUs50pFig08r/ 01nnJUQkgnVEV8uSAW1tbIxGzh9kZ7vx5wQ9GAW4msnahEx0wXfQAnqwruzguh6YNl ud94cGonErRx+kJ1FLYXjZt+iu6tmfDj6BZXdm3+GU1d0akW3CTm9qvj9gFjaFN9Am rD265ikWgJvZLcRophY2pucV9Ng3Tf2pcIdMIeCHZne8DkKYvPMOpPEIdXY04cAnpI dJvCbRAUVmUUqRLlIZ6KMdFU1d/uLfjbxhwAkCLQbEIwnsdgiPNFGrUS3GOMCgVKxw I7nOgUv8eRBkA== Original-Received: from pastel (65-110-220-202.cpe.pppoe.ca [65.110.220.202]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 5DBB0120478; Mon, 10 Oct 2022 10:52:23 -0400 (EDT) In-Reply-To: <83zge4gk9z.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 10 Oct 2022 11:22:48 +0300") Received-SPF: pass client-ip=132.204.25.50; envelope-from=monnier@iro.umontreal.ca; helo=mailscanner.iro.umontreal.ca X-Spam_score_int: -39 X-Spam_score: -4.0 X-Spam_bar: ---- X-Spam_report: (-4.0 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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" Xref: news.gmane.io gmane.emacs.devel:297368 Archived-At: >> Is there a reason we can't use a minor mode? Something like >> >> (add-hook 'python-mode-hook #'treesit-mode) >> >> or a list >> >> (add-to-list 'treesit-modes 'python-mode) >> >> ? > > We could, if a minor mode is justified. When this was previously > brought up, someone said the justification for a minor mode was too > weak in most cases. But maybe we should revisit that idea. I think a buffer-local `treesit-mode` plus a `global-treesit-mode` would make a lot of sense, from a user's perspective. This way they don't have to hunt for the name of the boolean variable that their mode decided to use to control the use of treesitter: all modes use the same boolean variable called `treesit-mode`. Then again, to me a minor mode is something so cheap that the idea that "justification for a minor mode was too weak" is rather hard to grasp. Stefan