From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#71048: The manual should have an example for treesit-language-at-point-function Date: Sun, 19 May 2024 02:00:23 +0300 Message-ID: <1ec990ff-50ad-42fb-ba5e-aa2c49ee77e9@gutov.dev> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4967"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird To: 71048@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun May 19 01:01:06 2024 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 1s8T33-000188-Ll for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 19 May 2024 01:01:06 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s8T2y-0008If-Hn; Sat, 18 May 2024 19:01:00 -0400 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 1s8T2x-0008IU-3b for bug-gnu-emacs@gnu.org; Sat, 18 May 2024 19:00:59 -0400 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 1s8T2w-00025V-R2 for bug-gnu-emacs@gnu.org; Sat, 18 May 2024 19:00:58 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1s8T30-0001FO-ED for bug-gnu-emacs@gnu.org; Sat, 18 May 2024 19:01:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 18 May 2024 23:01:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 71048 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.17160732394748 (code B ref -1); Sat, 18 May 2024 23:01:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 18 May 2024 23:00:39 +0000 Original-Received: from localhost ([127.0.0.1]:35610 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s8T2d-0001EW-BE for submit@debbugs.gnu.org; Sat, 18 May 2024 19:00:39 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:52690) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s8T2b-0001EN-KL for submit@debbugs.gnu.org; Sat, 18 May 2024 19:00:38 -0400 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 1s8T2V-0008BT-6Q for bug-gnu-emacs@gnu.org; Sat, 18 May 2024 19:00:32 -0400 Original-Received: from fhigh1-smtp.messagingengine.com ([103.168.172.152]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s8T2S-0001vv-56 for bug-gnu-emacs@gnu.org; Sat, 18 May 2024 19:00:29 -0400 Original-Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailfhigh.nyi.internal (Postfix) with ESMTP id 9EC6F11400A8 for ; Sat, 18 May 2024 19:00:26 -0400 (EDT) Original-Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Sat, 18 May 2024 19:00:26 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:message-id:mime-version:reply-to:subject :subject:to:to; s=fm2; t=1716073226; x=1716159626; bh=qmAp2+YJkf KuLKsZVCFlONcK5p0fisEndw0Vh8HFVsc=; b=mvhadBQPwMi5zdveFJ2F7woBkt +9gbEfCwbGzTgUjmB1HgETbXIHCkKJZxiLzxDl2aACWaDo9YwIFUGU+r3CE8za25 us3WlsPGq+TwK+C+VH/WT1EDt/8DVlxJAONDsuX1XhBrMDqfwJ6R5jlR3qlVl9OB eig1Cdpo0U2TIfAfOSkTBrTtPRU2vgQ156w4R6qBC8q2E8IY0GI5//ic4Vkjcr6Y JpEifZL/chUWfcbMq4MCHs4xziExYa2emPD76IgL3SjYt7dVI9UDcazVmN+wdWj8 RQW7N6bRLi2Tww7WZlRHmM6xyTfeHQVBVt1n+5MhPVZv4zSmn6eW4TVdurLw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:message-id:mime-version:reply-to:subject:subject:to :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; t=1716073226; x=1716159626; bh=qmAp2+YJkfKuLKsZVCFlONcK5p0f isEndw0Vh8HFVsc=; b=TLzg4goBp5dOL3oxS3SP9sbGOcdbj/jB/31t/jNAfArw XWX0AocJnob+qrFgsi0CtN651ar5hwW7Q37+3ej7uYhJUVBEuy3r5KlxqhJztA2Q KpzIkAT/8CWVtuE+eFIGiHRbEye1b6/3nPUtjrv+V6qxE9zd1cWpvKtxNumkqdCq yPhMMu5DenmhQ6Tct2qkadzaCHiIeNWMUIC5HegTb+wZ+xqz4KhraYmV74TbvMmN KgvZ/FJQCL00gq2gXgKTQrn2P57fY0M0BzeoWUqJjc3qPdokgh6J2dAXTBI9/CA0 qTZ5Ghfu2uYfarf8rqKQVLWequTof5E1XqFyqcwrtw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrvdehjedgudeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefkffggfgfvhffutgfgsehtjeertd dtvdejnecuhfhrohhmpeffmhhithhrhicuifhuthhovhcuoegumhhithhrhiesghhuthho vhdruggvvheqnecuggftrfgrthhtvghrnhepfefgheejvdeukeejfefghfeuvdekheehue efjeeuteelkeelgeelfeekgfegudeinecuffhomhgrihhnpehgnhhurdhorhhgpdhgihht hhhusgdrtghomhenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfh hrohhmpegumhhithhrhiesghhuthhovhdruggvvh X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Sat, 18 May 2024 19:00:25 -0400 (EDT) Content-Language: en-US Received-SPF: pass client-ip=103.168.172.152; envelope-from=dmitry@gutov.dev; helo=fhigh1-smtp.messagingengine.com X-Spam_score_int: -26 X-Spam_score: -2.7 X-Spam_bar: -- X-Spam_report: (-2.7 / 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, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, URIBL_SBL_A=0.1 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:285389 Archived-At: https://www.gnu.org/software/emacs/manual/html_node/elisp/Multiple-Languages.html has code examples for multiple-language setup (with tree-sitter modes), and it more-or-less says that treesit-language-at-point-function should be set. But there is a default behavior for when it's not set, and the code snippets in the second half of the page don't set it, so it seems prone to mistakes. I think the examples should include a setting for treesit-language-at-point-function. Inspired by https://github.com/dgutov/mmm-mode/issues/142