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#66153: 30.0.50; treesit: Edge case in indentation with multiple languages Date: Fri, 22 Sep 2023 15:18:00 +0300 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34176"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 To: Augustin =?UTF-8?Q?Ch=C3=A9neau?= (BTuin) , 66153@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Sep 22 14:19:08 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 1qjf7j-0008da-8e for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 22 Sep 2023 14:19:08 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qjf7W-00048a-Kt; Fri, 22 Sep 2023 08:18:54 -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 1qjf7U-00048Q-Mp for bug-gnu-emacs@gnu.org; Fri, 22 Sep 2023 08:18:52 -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 1qjf7U-0007es-60 for bug-gnu-emacs@gnu.org; Fri, 22 Sep 2023 08:18:52 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qjf7e-0001zz-Gu for bug-gnu-emacs@gnu.org; Fri, 22 Sep 2023 08:19: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: Fri, 22 Sep 2023 12:19:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 66153 X-GNU-PR-Package: emacs Original-Received: via spool by 66153-submit@debbugs.gnu.org id=B66153.16953851057620 (code B ref 66153); Fri, 22 Sep 2023 12:19:02 +0000 Original-Received: (at 66153) by debbugs.gnu.org; 22 Sep 2023 12:18:25 +0000 Original-Received: from localhost ([127.0.0.1]:35491 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qjf73-0001yp-9r for submit@debbugs.gnu.org; Fri, 22 Sep 2023 08:18:25 -0400 Original-Received: from out2-smtp.messagingengine.com ([66.111.4.26]:46553) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qjf6x-0001yY-Hv for 66153@debbugs.gnu.org; Fri, 22 Sep 2023 08:18:23 -0400 Original-Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 538445C01F8; Fri, 22 Sep 2023 08:18:03 -0400 (EDT) Original-Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Fri, 22 Sep 2023 08:18:03 -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:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm1; t= 1695385083; x=1695471483; bh=umhFuC6B3s8mt6WZrjbOAtTncdjznunFRIl pP6S+jV0=; b=ESVXUSHWfhfIGvYJtK4LqvHRvhbl1cah413Ij98+IiBYtzgOPE0 0+je2vTxRsQkYbIZIOa2WCFtfC9kOwHb39IR7IfjtvaGarxwfi9ydkZGdxpHVYhB HJZsAUUdEyvMX8fTj3xqOsMTyr6pc/gRJnAyfPdUvYa+5Jtef33eVT1M1rV86N3a kq6q5UlrZeflEjSYcn0nPN72fmQnQ2AT59fX53Qfbv0+QY/giiZf8ts7UhXHiMul 0n+v0+ttDiG62M1YmBE2LUCUWUN88VG+GXVcsDg4QnfkO6W7VFT77lBWev/9ndlh wkU1eg5YIb901IYJRAhZx2HkRO/GDuu+eTw== 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:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1695385083; x= 1695471483; bh=umhFuC6B3s8mt6WZrjbOAtTncdjznunFRIlpP6S+jV0=; b=X ID3B/DQfjd/DjkerYSVyYbgwL3WmKQxwlkuQyh1a2VIhdEnRKcrSHZ00Bvv03mDW 4R04SxSP51DoO7leNW2rF/pCkmXX+YfUQ10f2Ir3OvrxbsuEIQu/jtpIkR4VoIs6 RPJKIzS/zcqF4D2os412VJMEggt+zEVplyxgqSyBPl24dhLGiOt8pmZNyvs2kF2F hjBMHPcgOYLTOWkAX9kdJKkf3hVtbmcAMlVAFRhOTOGTXw5WYvbbR7330K5D1+xA YltiP/h18gT6WOrb4OBB3MEdbrGs99gRN0Hl2FDdpjxgHST89sfWxh46OklIsxME +gqxKBr1SNJMMg7koryhg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedrudekkedgfedtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvfhfhjggtgfesthekredttdefjeenucfhrhhomhepffhmihht rhihucfiuhhtohhvuceoughmihhtrhihsehguhhtohhvrdguvghvqeenucggtffrrghtth gvrhhnpeefjeekvedvfeelfedufeevgeetvdevkeelvddtueetteefudefgfduieekffei leenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegumh hithhrhiesghhuthhovhdruggvvh X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 22 Sep 2023 08:18:01 -0400 (EDT) Content-Language: en-US In-Reply-To: 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:271080 Archived-At: On 22/09/2023 14:27, Augustin Chéneau (BTuin) wrote: > > There is an edge case in treesit with multiple languages > indentation. Here is a simple example: > > // language_A >     { >        // language_B >     } > // language_A > > > Here, brackets are managed by language_A, but everything inside is > managed by language_B.  Meaning that if the pointer is at the beginning > of the third line (with the closing bracket), it will use language_B's > indent rules.  But if the The patch looks reasonable to me (we do something similar in mmm-mode).