From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Vincenzo Pupillo Newsgroups: gmane.emacs.bugs Subject: bug#74610: 31.0.50; Submitting mhtml-ts-mode, treesitter alternative to mhtml-mode Date: Tue, 17 Dec 2024 22:25:59 +0100 Message-ID: <3637930.dWV9SEqChM@fedora> References: <3532547.LZWGnKmheA@fedora> <26683715.1r3eYUQgxm@fedora> <87r067fs0w.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19380"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Yuan Fu , Eli Zaretskii To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Dec 17 22:28:27 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 1tNf7A-0004tO-Ud for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 17 Dec 2024 22:28:25 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tNf6s-0001dh-Ky; Tue, 17 Dec 2024 16:28:09 -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 1tNf6p-0001cu-R9 for bug-gnu-emacs@gnu.org; Tue, 17 Dec 2024 16:28:04 -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 1tNf6p-0004Co-I6 for bug-gnu-emacs@gnu.org; Tue, 17 Dec 2024 16:28: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:References:In-Reply-To:Date:From:To:Subject; bh=ktKdTRouS/AVC2VXdIDZh5Gw04zI6UnPBncGvgYzMG4=; b=CfInuwnVtWMq3N9TbvG/lSAqC5oYKcgP9hAUUJKt5WJHaZo5bomV4FhNwLIy5OvlqznE2OB4Q2hmAfpQ7NyQmZvhw0iSRXhfLFEQyWPcUUK2HJ0jPbW7MfAAZwFJjjZgpwi3nhItP/E4XgWTxlQwvbME7dRVhcohHvqZQGrJ0p5c2funeee4vpZcPatSM522IfpEp8kxcXPZeeMlL1AYCO3wa2z8sqwnXSUQ7eOsGpmV0B0jhEug5JSBdtyWECOXsLoTiYJCdd+35WTbXn23Z/Gw/gM39Y9p0dRPovTkbvmHGAhinWuf0nkKTU+Gj3EMz8lQ53oByvFPGv0KInjY+Q==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tNf6o-0006sr-MW for bug-gnu-emacs@gnu.org; Tue, 17 Dec 2024 16:28:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Vincenzo Pupillo Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 17 Dec 2024 21:28:02 +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.173447083726379 (code B ref 74610); Tue, 17 Dec 2024 21:28:02 +0000 Original-Received: (at 74610) by debbugs.gnu.org; 17 Dec 2024 21:27:17 +0000 Original-Received: from localhost ([127.0.0.1]:60565 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tNf5x-0006rG-TR for submit@debbugs.gnu.org; Tue, 17 Dec 2024 16:27:17 -0500 Original-Received: from mail-wm1-f47.google.com ([209.85.128.47]:47477) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tNf5v-0006qe-67 for 74610@debbugs.gnu.org; Tue, 17 Dec 2024 16:27:07 -0500 Original-Received: by mail-wm1-f47.google.com with SMTP id 5b1f17b1804b1-4364a37a1d7so12872665e9.3 for <74610@debbugs.gnu.org>; Tue, 17 Dec 2024 13:27:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734470761; x=1735075561; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ktKdTRouS/AVC2VXdIDZh5Gw04zI6UnPBncGvgYzMG4=; b=eEFsG8h+ghOHR52qlNYTUvE/WSwxhAxxMr8EAv2ykn9VyEyAhACLEBDDlHIe8C647R LWIr8e4Rzf8k3xMQflmNek6rWJze0s2n4O6dPgyobZAKm4H+QgTfxsxFxdt0qaTQgxRp NQ9ua+AakILiBjX5V9wuImBiby8MhrVDd+ZeyZTjsK+CIvrpKRMNl7oH63uoptlSnijf vSdw9rA8+v1oBW8/IW5eOmWtar399J6Y8yRaiNLV1EdLCjlErgA0BjEizv+vmnSYBjdN 1s1HNVGn55q95dZV8CrK82H5aw33siN99AYUYK9ELOXIAB829prBqandKe+kZ/lpJW1l Ir0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734470761; x=1735075561; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ktKdTRouS/AVC2VXdIDZh5Gw04zI6UnPBncGvgYzMG4=; b=Lbi/SsueIU1mAqIYtGiDIXW5rYc3BIy7HMHqHpJXc0Ixl4KTI2AgnFMZT+GwN1zbZh t4FSStz1X/JiK1Oa+ViHK9sU7P83Hl7TJ9XHakvW5suoP1AUXJaYgKAkpcL1t/jwcXFX qORxBVVc/rkDROK0uoMSPzcuSV5QFJQ7GuFuEbM2sFwMawI46BAQtYshqtxBJTqEwGS2 Za1M03ow/Yl+TZfEuLLhFb0kpZXNsR0FELgOLM1lQg+aGWFIjEZX8pqqAkFEp/SyXG6J oYRDjX6WRIOj3kElKN8hbBtRtE7DD+dtYcIHRKR5+sjJW/r5rCeYpxa/eUDAgj5kYFhm zsRg== X-Forwarded-Encrypted: i=1; AJvYcCUVFmBdTkZDDHyZXFtEvbUK9BmhRyQUjb+UYQdo+4sMnckusbjJ/Dt3GmYL0zKdEd6YA110pA==@debbugs.gnu.org X-Gm-Message-State: AOJu0YwWmLcPwjSJvzB2WYsxZlfMaIUR6FbanoZMHjNUx/xs3D8Dts/7 aYi5Gkf4WDaMkVaR8GkSNCf+g63DNsxzkZ6EMi8jmFY3wjzTbAx6hzXfH8wY X-Gm-Gg: ASbGnct75aLNIZK3wCaa07Eyqsm8tFyziI2GneKoKygopGA4VRvt/Qi3Dd603xu0FY5 YmwD6xvfQ3An/WdUxA628Ps9r90kMRzSq2O8kvoO8QixXPgbAigqFkwHTVW9BSai3SjaCX1jIl0 XHUDUdVajIt3TciTQ+tyGWtzSxkRCQMjB8F8vdiQ04jE7ATTFH7VY3mp/6EbverWdsQh6vpHOzl 7ApT6ZHblISk3saRmAsw6ghAzIYMy9VIABL7pBvspmbbDQiTZ0ysCqUFK/PtqFyA5TalZo5UBKY 2tNRyt8NjVV14ICWSK/A X-Google-Smtp-Source: AGHT+IEFGY4xxy4+EtXBQ50KgpNwNXePXYgxXYbhRSmco57f0+ejnkMqVqci0U9EAJuDcP0f/HXdmA== X-Received: by 2002:a05:600c:154b:b0:436:30e4:459b with SMTP id 5b1f17b1804b1-4365536f96amr2236905e9.18.1734470761055; Tue, 17 Dec 2024 13:26:01 -0800 (PST) Original-Received: from fedora.localnet (2-230-139-124.ip202.fastwebnet.it. [2.230.139.124]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-43625706cd3sm187711275e9.28.2024.12.17.13.26.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Dec 2024 13:26:00 -0800 (PST) In-Reply-To: <87r067fs0w.fsf@mail.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:297315 Archived-At: Ciao Juri, In data luned=C3=AC 16 dicembre 2024 18:37:35 Ora standard dell=E2=80=99Eur= opa centrale,=20 Juri Linkov ha scritto: > Ciao Vincenzo, >=20 > > In data mercoled=C3=AC 11 dicembre 2024 05:54:09 Ora standard dell=E2= =80=99Europa > > centrale, > >=20 > > 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-m= ode > > can be extended and if there is a way to integrate one multi-language > > mode into another multi-language mode. >=20 > I'm testing your patch with mhtml-ts-mode, and everything works nicely. >=20 Thanks > 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. >=20 > So I added (sexp-list ,(regexp-opt '("element")) 'symbols) > to treesit-thing-settings in html-ts-mode.el. >=20 > But then discovered surprisingly that it has no effect on mhtml-ts-mode. >=20 > The problem is that treesit-thing-settings should be duplicated > from html-ts-mode to mhtml-ts-mode. >=20 > 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. >=20 > 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. >=20 > 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: >=20 > (add-to-list 'major-mode-remap-alist '(mhtml-mode . > mhtml-ts-mode)) >=20 > 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. I think we need something like a generalized version of the=20 `mhtml--construct-submode' function. I'm doing some testing on that and hop= e=20 to have something decent after Christmas. Vincenzo.