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#67061: [PATCH] Improve syntax highlighting for python-ts-mode Date: Thu, 14 Dec 2023 03:31:12 +0200 Message-ID: References: <8734xdni6y.fsf@yandex.ru> <831qcwycbj.fsf@gnu.org> <83v8a3qh6m.fsf@gnu.org> <834jhadvkt.fsf@gnu.org> <7aee7e42-c07d-9131-18a9-4806f07d4267@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="14517"; 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 Cc: dvzubarev@yandex.ru, 67061@debbugs.gnu.org To: Stefan Kangas , Eli Zaretskii , casouri@gmail.com Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Dec 14 02:32:06 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 1rDaa3-0003Y8-HJ for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 14 Dec 2023 02:32:04 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rDaZn-00023D-Ju; Wed, 13 Dec 2023 20:31:47 -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 1rDaZm-000230-7l for bug-gnu-emacs@gnu.org; Wed, 13 Dec 2023 20:31:46 -0500 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 1rDaZl-0000yG-W4 for bug-gnu-emacs@gnu.org; Wed, 13 Dec 2023 20:31:46 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rDaa2-00015l-7p for bug-gnu-emacs@gnu.org; Wed, 13 Dec 2023 20:32:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 14 Dec 2023 01:32:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 67061 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 67061-submit@debbugs.gnu.org id=B67061.17025175004168 (code B ref 67061); Thu, 14 Dec 2023 01:32:02 +0000 Original-Received: (at 67061) by debbugs.gnu.org; 14 Dec 2023 01:31:40 +0000 Original-Received: from localhost ([127.0.0.1]:59928 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rDaZf-000159-GN for submit@debbugs.gnu.org; Wed, 13 Dec 2023 20:31:39 -0500 Original-Received: from out5-smtp.messagingengine.com ([66.111.4.29]:53501) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rDaZd-00014w-Fy for 67061@debbugs.gnu.org; Wed, 13 Dec 2023 20:31:38 -0500 Original-Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 0EE925C0342; Wed, 13 Dec 2023 20:31:16 -0500 (EST) Original-Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Wed, 13 Dec 2023 20:31:16 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :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:subject:subject:to:to; s=fm3; t=1702517476; x=1702603876; bh=pkBwwnExdaG4FgeHHi9LCoLLNm7c9tQZPeqXDNQX/sY=; b= MjFhiLdC8muKco6umbGJkEhQApkkCQs4lVBt8K73qytvY46CyTRx1YjbBsQbRP0H C56+mM4GFTveosArp6hz52K44A+9ouMMsLmSyj3GIcpe9iGCDw3hzOupS3AQPeoW XO5a7IIYSXzTDoczaru0HW66ZaI8nq6SNs0aVUPfnsGjU0uH3RthD6zeHmp2iTs+ j9RODZ8fHm5U8YP2VHaA/PBGWmDyGYapKjxp1jhlrwM6qLXM/H7kD9/wts/Brglg 5qH0mBhch56QBnNCa/HULSmgwO+Xoh9+2DNDdjda2tra1RFsAKRZXcQhYHUYlJ+F DXhJlTQC2ecKpcEhCYaR8g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc: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:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1702517476; x= 1702603876; bh=pkBwwnExdaG4FgeHHi9LCoLLNm7c9tQZPeqXDNQX/sY=; b=O 0oazUNr8ldfvRVLKakYEjEr6GA4w61KMzV3398Y+lxc1s7PyQOiiwgivJHJ9Pm5g 5U2aqafCTt/mp2v8d2U9ap0AznNCuCF6e16cxY7raSXpi6EDWmU7AoviEXJQT6b3 NMc3P4kVeuSwoHrQ/YEW/G+dAYP/pbnxVTp01auDYDrFRfoW/qbKJLvKsiJ/hQ5Q 6cFuldvbZNi/RObCkuE1biUXZXtMbHFoXMu+CVZMMCrfUAEOL8J8liIeKU9ffKLy BAcRrr/wcu0NPv2XvtutX4miclefqjYqGiZBRg/wsKcSLqWeB6z1vnX/PWgsFmLT irGG6MhxGDBHvuA5x2/og== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrudelkedgfeeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtfeejnecuhfhrohhmpeffmhhi thhrhicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdruggvvheqnecuggftrfgrth htvghrnhepiefgteevheevveffheeltdeukeeiieekueefgedugfefgefhudelgfefveel vdevnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepug hmihhtrhihsehguhhtohhvrdguvghv X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 13 Dec 2023 20:31:13 -0500 (EST) 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:276166 Archived-At: On 13/12/2023 23:16, Stefan Kangas wrote: > Dmitry Gutov writes: > >> I don't know at what stage we're going to start worrying when adding new >> elements to the queries, though, in fear of breaking compatibility with >> some potential older version of the grammar. > > Right. But can we really stop installing support for new language > features that users expect? Some less important ones -- maybe. E.g. syntax highlighting is less essential than indentation. Though it's usually easier to implement (with tree-sitter, at least). > I'm not super close to the tree-sitter stuff to be honest, so apologies > if I misunderstood something. But IIUC, the current situation means > that we can't depend on concrete versions of grammars, which means we > can't depend on that to make adaptions. But that situation is not > really caused by us, right? We made our choices here too: - Trying to support different versions of grammars, not just the latest ones. Or a "pinned" revision. - Adding treesit modes to the core, rather than publishing them to ELPA. > So maybe at the point when we find problems in practice, we should just > throw up our hands and urge users to upgrade. Perhaps it'll encourage > more work on improving the situation with grammar versioning. Simply asking our users to upgrade to the latest grammar won't work if the major mode they are using is only compatible with some older grammar version. And it's not upgradable because the major mode is not in ELPA. We might solve this in the future with a two-step: "throwing up our hands" and publishing major modes to "ELPA core". treesit.el will probably need to stabilize a bit more before that, though.