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.devel Subject: Re: Tree-sitter and major mode inheritance Date: Sun, 20 Nov 2022 14:45:59 +0200 Message-ID: <32f83435-f655-f0db-891c-8244df084299@yandex.ru> References: <0249C656-21C8-49F2-B979-A1894BF80637@gmail.com> <1B76E73A-0DCD-456E-9F28-0E90723DA66D@gmail.com> <83sfif8cl2.fsf@gnu.org> <83cz9i6rvl.fsf@gnu.org> 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="5812"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.2 Cc: casouri@gmail.com, emacs-devel@gnu.org, monnier@iro.umontreal.ca, theo@thornhill.no To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Nov 20 13:47:26 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 1owjjJ-0001Ns-TN for ged-emacs-devel@m.gmane-mx.org; Sun, 20 Nov 2022 13:47:25 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1owjid-0000on-LI; Sun, 20 Nov 2022 07:46:43 -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 1owjiH-0000oD-IV for emacs-devel@gnu.org; Sun, 20 Nov 2022 07:46:22 -0500 Original-Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1owjiF-00021c-G8; Sun, 20 Nov 2022 07:46:21 -0500 Original-Received: by mail-wr1-x434.google.com with SMTP id a14so16181632wru.5; Sun, 20 Nov 2022 04:46:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :sender:from:to:cc:subject:date:message-id:reply-to; bh=VmL2XRI8iUgXcXvJ4QZ9BsBuoXpwHp6FrtY8vnU7WO0=; b=eIO1g3V1+ZT0aEHxD1+6JXmu4Z32wtLAc7aVdQlcKEvzpyQw7Hw2ZuFuyly6r7fnUN C/Lpe4GdW6vq3IApu98j+NEPJkxczDpzcKr7PW6J0LA1CVptFtIMys5c8iWmxj9kndBR qLR9E30tEJdQQeKR2DnoGJM773b/izh10EJn37SXnMHFqcjQEsia1bik9DvZN8hPOhl4 MhmfWWJE8XP0AHlV5dvP0vMEo6lsQUpfgwgonXWKnLz9jJg/ZHnTUujEgFFf85dkTVTH tC3deKuVCc7MA5ArxnyAq24op2paBc/YhUm6t1sCn37SVtBfJEbOzNxz9qJQwN0quziI 3ptA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :sender:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=VmL2XRI8iUgXcXvJ4QZ9BsBuoXpwHp6FrtY8vnU7WO0=; b=SQgutp2tmR2N8EbNoBf8fQQPXJ7yyDdMVARluvmWnBfXhQLPCqOSasS4oJowdYRJdy ec0tiGygVJDJum6TEmUwDLNj5MYbsFHFnxYfVFoH94n0DCNFlNTl7pahkKIj4y8seQli Nyb5GLwDzXfsgmQ5Bs3AmjD8QAkcylEZ+XWmBflIPlhIdqOFCJ9Zvj0rPo2iMpZni4V7 4eBf0AGSAfDoajQtlYMcbtREkKlsUXQj54picksI4c10A2N2wv95m3grlk1bTLx77eEE EcdIopUctQ6jZiSRZWDXCvm2fGULb/sR1O731gL66Tz6jyt+sfOkQQk6ztHgqoT8j3dY qebQ== X-Gm-Message-State: ANoB5pnSDaV08EG0ReQNe/R5Kx7hbA3EhwQm+M5EWFZdgybJuhddfJW7 69VVsMtmXogi1hz+duZ893bfXuH7sR4= X-Google-Smtp-Source: AA0mqf7MQgIN8Qo5Xqvk9HS7YTSBptsAl5axdvic66r3JX3lmMwGSDEXT2InQ/QF7E2ERr/Lnc4ovw== X-Received: by 2002:a05:6000:1cd:b0:241:930d:6abb with SMTP id t13-20020a05600001cd00b00241930d6abbmr8995560wrx.379.1668948361563; Sun, 20 Nov 2022 04:46:01 -0800 (PST) Original-Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id m6-20020a056000024600b00236705daefesm8644856wrz.39.2022.11.20.04.46.00 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 20 Nov 2022 04:46:01 -0800 (PST) Content-Language: en-US In-Reply-To: <83cz9i6rvl.fsf@gnu.org> Received-SPF: pass client-ip=2a00:1450:4864:20::434; envelope-from=raaahh@gmail.com; helo=mail-wr1-x434.google.com X-Spam_score_int: -15 X-Spam_score: -1.6 X-Spam_bar: - X-Spam_report: (-1.6 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.179, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, NICE_REPLY_A=-0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:300243 Archived-At: On 20.11.2022 08:51, Eli Zaretskii wrote: >> But js2-mode inherits from js-mode (meaning, it will run the same setup >> code, and then some of its own), yet it has its own parser. Which will >> cause all sorts of conflicts with tree-sitter. > js2-mode is not in Emacs, so I cannot control what it does. Ideally, it > will need only minor adjustments (like making sure it doesn't turn on > tree-sitter if it doesn't want to) or none at all. That was my question: how would those "minor adjustments" look if not the way Yuan proposed things. > If our changes somehow break js2-mode, we should discuss the details and try > to fix the breakage as much as is reasonable from our side. The details > aren't important from where I stand; what is important is that users of > js-mode can still use the mode even if they don't have tree-sitter installed > or don't want to use it even if it is installed. I agree with that goal, of course.