From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#74610: 31.0.50; Submitting mhtml-ts-mode, treesitter alternative to mhtml-mode Date: Mon, 16 Dec 2024 19:37:35 +0200 Organization: LINKOV.NET Message-ID: <87r067fs0w.fsf@mail.linkov.net> References: <3532547.LZWGnKmheA@fedora> <2551656.XAFRqVoOGU@3-191.divsi.unimi.it> <0083FFEF-128F-4C5C-B6BC-92CF657416C4@gmail.com> <26683715.1r3eYUQgxm@fedora> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36022"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/31.0.50 (x86_64-pc-linux-gnu) Cc: Yuan Fu , Eli Zaretskii , 74610@debbugs.gnu.org To: Vincenzo Pupillo Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Dec 16 18:46:25 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 1tNFAm-0009Cf-HF for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 16 Dec 2024 18:46:24 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tNFAa-0001sj-S5; Mon, 16 Dec 2024 12:46:13 -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 1tNFAS-0001oN-6b for bug-gnu-emacs@gnu.org; Mon, 16 Dec 2024 12:46:07 -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 1tNFAR-0004zf-UR for bug-gnu-emacs@gnu.org; Mon, 16 Dec 2024 12:46:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=8IA0sZAQoFGJGaUJkdC83en/tR3uW4F8u+WzeOmJ1Nw=; b=G1vho1FjqWYbFGZPFcCQIgfDsWxSAIhr7aTXB9RfLGrFkpW69qoptMrY6T4k1LB/h25YHgXFcCgENL5V8oREXOjOnUXqwXcVxmADd7Hphb2kLookqrdBe+b1HwnVKDyp2S88ODpeoV2Yh76uuXeDmYr2pLVx8Vcw4Ot6vCggSSoYwuDc5aMQcBVucztvLY9kAtnJGRHPq18JFaSpNT6XicysMZ52ne2gfUHF+rTb9MqGxfWVvay3OUhkj9GbocwiNDbMn3Tpck2Wqy+dsoht+8GrV4zs+ZAuYBQk/odYBBZoI+xFsRLZZ4LxuzpiY2d9hXk7dRIR1gHS9DGnclzMdA==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tNFAR-0007Qe-O1 for bug-gnu-emacs@gnu.org; Mon, 16 Dec 2024 12:46:03 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 16 Dec 2024 17:46:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74610 X-GNU-PR-Package: emacs Original-Received: via spool by 74610-submit@debbugs.gnu.org id=B74610.173437113028486 (code B ref 74610); Mon, 16 Dec 2024 17:46:03 +0000 Original-Received: (at 74610) by debbugs.gnu.org; 16 Dec 2024 17:45:30 +0000 Original-Received: from localhost ([127.0.0.1]:55959 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tNF9t-0007PO-8Y for submit@debbugs.gnu.org; Mon, 16 Dec 2024 12:45:29 -0500 Original-Received: from relay8-d.mail.gandi.net ([217.70.183.201]:37801) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tNF9m-0007Oc-IX for 74610@debbugs.gnu.org; Mon, 16 Dec 2024 12:45:23 -0500 Original-Received: by mail.gandi.net (Postfix) with ESMTPSA id D62A01BF207; Mon, 16 Dec 2024 17:44:55 +0000 (UTC) In-Reply-To: <26683715.1r3eYUQgxm@fedora> (Vincenzo Pupillo's message of "Sat, 14 Dec 2024 11:37:01 +0100") X-GND-Sasl: juri@linkov.net 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:297202 Archived-At: Ciao Vincenzo, > In data mercoledì 11 dicembre 2024 05:54:09 Ora standard dell’Europa centrale, > > Attached is the revised patch following your previous comments. > As I already wrote to Dmitry, I am doing some tests to see if html-ts-mode can > be extended and if there is a way to integrate one multi-language mode into > another multi-language mode. I'm testing your patch with mhtml-ts-mode, and everything works nicely. At the same time I'm adding a new ts-thing named 'sexp-list' in bug#73404. While 'sexp' defines both lists and atoms, 'sexp-list' defines only lists. So I added (sexp-list ,(regexp-opt '("element")) 'symbols) to treesit-thing-settings in html-ts-mode.el. But then discovered surprisingly that it has no effect on mhtml-ts-mode. The problem is that treesit-thing-settings should be duplicated from html-ts-mode to mhtml-ts-mode. On the one hand, integrating multi-language mode to the exiting mode html-ts-mode could avoid the need to duplicate treesit-thing-settings for html. But on the other hand, integrating mhtml-ts-mode to html-ts-mode doesn't help to avoid such duplication for other embedded modes. Because I needed to duplicate treesit-thing-settings for javascript as well. So extending html-ts-mode doesn't help here, and maybe even better to add mhtml-ts-mode to keep the symmetry with existing mhtml-mode such as used in mode remapping: (add-to-list 'major-mode-remap-alist '(mhtml-mode . mhtml-ts-mode)) What could really help is to try to get settings from html-ts-mode and js-ts-mode to avoid the need to duplicate settings in mhtml-ts-mode.