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: Make all tree-sitter modes optional Date: Mon, 16 Jan 2023 01:39:18 +0200 Message-ID: References: <84973.1672843723@hassadar.pretzelnet.org> <83wn62xi3k.fsf@gnu.org> <83o7rexe2n.fsf@gnu.org> <83h6x5xym7.fsf@gnu.org> <83h6wr6gmz.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="25264"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Cc: emacs-devel@gnu.org To: Eli Zaretskii , casouri@gmail.com, monnier@iro.umontreal.ca, larsi@gnus.org, theo@thornhill.no, jostein@secure.kjonigsen.net Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Jan 16 00:40:01 2023 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 1pHCbY-0006QA-RJ for ged-emacs-devel@m.gmane-mx.org; Mon, 16 Jan 2023 00:40:00 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pHCb0-0001rE-FI; Sun, 15 Jan 2023 18:39:26 -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 1pHCay-0001qr-Mh for emacs-devel@gnu.org; Sun, 15 Jan 2023 18:39:24 -0500 Original-Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pHCax-0005bK-0f; Sun, 15 Jan 2023 18:39:24 -0500 Original-Received: by mail-wm1-x32e.google.com with SMTP id bg13-20020a05600c3c8d00b003d9712b29d2so22540568wmb.2; Sun, 15 Jan 2023 15:39:22 -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=gcMgzwgpYcUbp+aIBqw0PMZiHt96dQBJRk1GJH/cKh4=; b=PAugo5aj2sYVfydXeQ0Kh51/xPXBRS42BoX9tmzHxxPrcx02Ux7kNLrMv+qM64Q70P FTQ9lRCsJ0aFN7WyLOfM2xbDjpgqcGREAJtO85EgRDY0BsMLgeMTpoOcJew38eg2972r psNdBiwgvccgAgv7/M9xNnmhlIo/QiAiLttu9q6K9LrTpOR1QMAzCwmh1cgavyM/GmQx H1gpxALom5VHAsS43vy3UbFUjRGSovXaEFcLokMgKcjqsXlkHN4xSh8yLq8qvwqeo1C+ NDMi1GR4tNRp58J1feqUH/0sRevgxzAW51H6FeQ/9DlrCgiLwbOl6hQNDmXaKxWWOvw+ sepw== 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=gcMgzwgpYcUbp+aIBqw0PMZiHt96dQBJRk1GJH/cKh4=; b=RQNqQD6ztxOa+7JK4VIjNxUMezSXrXkucRQxp2ewhQAzvZxJ5sfScKB6o4oNuPsh4q wjioDyLAZqVRACUg23XLMhGoumTT66waAak+4f1DD5p4uN2+Y4b9OopJFyHgMvMrBoFl uRDlYKM0BOnx+XNXcqlkiozKDvJV+q4mfqAmPejIs+BJ7Up3vtN2hFFdSG7tzpAcJwJG 0EaTC7WYcL9D2LtyZvICd2xbYB9QauZ/at/RzjPKQINctDDEq4f0dKS1wVkloqmXvn5W RtK9ltWayUD+/drucsRC5EL3jfj3z9zf/smAG1yPjqvkpm86eRHEvO+LFe+uVlcVO3cT m8iA== X-Gm-Message-State: AFqh2kqgq01w0y8X07WfZ17Jb4IwjD8y1vDTMS72+IU79wBMadVerGVX JOoangEqYvLfX9MPi7XxpBS60PzgXOE= X-Google-Smtp-Source: AMrXdXsOYAXnA80O6HHkWGdwsYxP3z44cBhA2vK/J0cnodTNe6N8e4lcjt7xbm40STQPnyugWN5fsg== X-Received: by 2002:a05:600c:da:b0:3da:f793:fff6 with SMTP id u26-20020a05600c00da00b003daf793fff6mr2793322wmm.16.1673825961164; Sun, 15 Jan 2023 15:39:21 -0800 (PST) Original-Received: from [192.168.0.2] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id o15-20020a5d62cf000000b002bbedd60a9asm19146287wrv.77.2023.01.15.15.39.19 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 15 Jan 2023 15:39:20 -0800 (PST) Content-Language: en-US In-Reply-To: <83h6wr6gmz.fsf@gnu.org> Received-SPF: pass client-ip=2a00:1450:4864:20::32e; envelope-from=raaahh@gmail.com; helo=mail-wm1-x32e.google.com X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.001, 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:302439 Archived-At: On 15/01/2023 16:01, Eli Zaretskii wrote: > You will > see that where possible, just loading a TS mode modifies > auto-mode-alist if the tree-sitter support for that mode is available, > whereas for other modes auto-mode-alist is modified only when the mode > is actually turned on successfully for the first time. This is > because some of the TS modes have their own *.el files, whereas others > share a .el file with other modes, and so loading that file doesn't > necessarily means the user wants to use the tree-sitter based mode. If we *are* going to do this (make all ts mode strictly optional), I don't think either of this is a good idea: for a given foo-ts-mode, the user might already have an auto-mode-alist entry configured with another mode (third-party or not), and they will likely 'M-x foo-ts-mode' to try how well it works (or doesn't). Having auto-mode-alist modified automatically can come as a surprise either way. Note the this is different to having the auto-mode-alist entries set up from the outset, because the user's alterations override those. We can drop the auto-mode-alist alterations from ts modes altogether, to bring them back when we do decide to enable them by default.