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: Wed, 04 Dec 2024 11:47:51 +0100 Message-ID: <22104588.4csPzL39Zc@3-191.divsi.unimi.it> References: <3532547.LZWGnKmheA@fedora> 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="23373"; mail-complaints-to="usenet@ciao.gmane.io" To: Dmitry Gutov , 74610@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Dec 04 11:50:16 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 1tImxT-0005uc-Vl for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 04 Dec 2024 11:50:16 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tImxJ-0004Al-V5; Wed, 04 Dec 2024 05:50:06 -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 1tImxH-00048K-J8 for bug-gnu-emacs@gnu.org; Wed, 04 Dec 2024 05:50:03 -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 1tImxH-0005i9-B5 for bug-gnu-emacs@gnu.org; Wed, 04 Dec 2024 05:50: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=VPbGiEPlpqleBoGEBtOgHWufnaWPJLRRYumn8cELD6g=; b=ggaTue2XExTy3gASPFmTo+e3bR8gNXCkdDJ7buaaJjjW3LpqZ8T9Fy4jU+kZwdWIhakwk72rHsYxLpD55HtbgIYeOX2ghY70byWL7zQUW5eDulHJ9Vv8vqsIM+2nVc6eNgtuAG3+thr0MpnjhLjujpOTIyNuj6C4nZ3f/iy/9aM9ARi0kKpvkz0wSCEiIUZmKIBbC8abEJ6TOiB8eByYmglwsCl+1MzaPfF5J9mt8XdYaTi+eOu4fEbTeErwYBF/Zhny/gvMQDdaICJ3hqcY+vqiuEfMXMIupaA8zeBVKPQPDdkcMHug9LiqhPMdFRENIC787jyUGJ8Hdda0Rzq3YQ==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tImxG-0001yD-5G for bug-gnu-emacs@gnu.org; Wed, 04 Dec 2024 05:50: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: Wed, 04 Dec 2024 10:50: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.17333093417465 (code B ref 74610); Wed, 04 Dec 2024 10:50:02 +0000 Original-Received: (at 74610) by debbugs.gnu.org; 4 Dec 2024 10:49:01 +0000 Original-Received: from localhost ([127.0.0.1]:34420 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tImwH-0001w8-BB for submit@debbugs.gnu.org; Wed, 04 Dec 2024 05:49:01 -0500 Original-Received: from mail-wm1-f47.google.com ([209.85.128.47]:52441) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tImwE-0001vi-II for 74610@debbugs.gnu.org; Wed, 04 Dec 2024 05:49:00 -0500 Original-Received: by mail-wm1-f47.google.com with SMTP id 5b1f17b1804b1-434aa222d96so80784995e9.0 for <74610@debbugs.gnu.org>; Wed, 04 Dec 2024 02:48:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1733309273; x=1733914073; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=VPbGiEPlpqleBoGEBtOgHWufnaWPJLRRYumn8cELD6g=; b=F/bCm1QpGBLBD+wjX2k4n6TFfCZ0RVe2FjhBxQNyAwVo5iTJcJpo3381yBhTucon3s 14tvksg6bnPuUBd9cpHF+RXmOQ76PoGbL7i+xGvU5DTGJateCHa4CvsstfyeuRvJwC1k PNRYNL89Tpnh/C61PQOHUqiTt1dlohaYNwsYnd62BYWM0RMkd9XCcx6NdPntkmtBoSHA bSjggTdkShkcRbICEn3gP0rNrewnLSPDldN/i91LwnT5KS7NZbyeR/CxhvqcSIq8Cgtc 65VqiHSd5h3SR61eIUgSNLrWMK+XfzG6U/A1hbZQM5AVyYpanw3Yze2PHLYojamGkIYA hcZg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733309273; x=1733914073; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=VPbGiEPlpqleBoGEBtOgHWufnaWPJLRRYumn8cELD6g=; b=logYhRDqF5HJ5Na5Tx1xVb45L9QgmCLahs2QHj82EwdiGqWGUezPnVeaO1AXxXJ+50 Im5xBJmnj0U2dmnXju0ck2GaqQGMQ/xctRwR+S9aCvj8Q/vrWFqAe7ps0Kqd1dxvTSed nbSf1pRDIWGdLMme+6M5apKX8Pq68+4A866tEZlL5XJ7A22duIQ5HhfDwsR5ilh+amxQ 6Oec1heY+67pWQaAnJLi/GNPA69GaP5Xx5TqBP041Du2hBuJxJ0TPOJGR4ldJjESB2oW NXP1aGfVhwVOVwK+Z7SNJPKydw2ztk8RVoOWP/CRQwaAKQwGwcGzXNbk1//jOG29BhYD IORw== X-Forwarded-Encrypted: i=1; AJvYcCWbB6N8rBvAzfLScsZLkneF0j1q/t2qLVLl0OZYphOGG3DE5U+UTyMDzg9uUfw7/OOziTQSfA==@debbugs.gnu.org X-Gm-Message-State: AOJu0Yyp4yTvvuz6bVJE60Zmh4np5kvcILVctabzEr8+g4cfXSGINqCG oGh61wZMShxjS5SnTjqZJuo1T55lhUrXl384aJx2+moddzycW235 X-Gm-Gg: ASbGnct9EMWp7yPw3ADd3ghHGWGO5mbaCy84prQpXf1eg2agNNhYM7lK1VSDwKUQiSz ZHEQ2wKztm6uHuN7g0eIbRJZriyD4yzmRXsja8bsKTUFg5X1eaRKoz0WKnezK7TS79NHc9/3xwH 9nSHQx9E6DzdT7lApj5l200l2NDKmAGb34RlFyNsFU7sHFkCaLFaozyk4c2RamhwAuQVcP0gofU +ma0vlEvKbtzIWR1okfLPgTN92qEZDXhOeijW1mUwG4lt4g1UJoZD2w7sA+8cS2qJpPBI7ZEr/E ffM= X-Google-Smtp-Source: AGHT+IHx/vg3CFryNeBqnVBFjGu4NPySh87nW5vT21hvUupoPeYr5LshMQVS5en0gmfeqv7uA4nb6Q== X-Received: by 2002:a05:600c:3546:b0:434:9fac:b157 with SMTP id 5b1f17b1804b1-434d09c10a5mr59455105e9.13.1733309272394; Wed, 04 Dec 2024 02:47:52 -0800 (PST) Original-Received: from 3-191.divsi.unimi.it (3-191.divsi.unimi.it. [159.149.3.191]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-434d52b77f4sm19939465e9.43.2024.12.04.02.47.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Dec 2024 02:47:52 -0800 (PST) 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:296405 Archived-At: Hi Dmitry, In data mercoled=C3=AC 4 dicembre 2024 02:27:53 Ora standard dell=E2=80=99E= uropa centrale,=20 hai scritto: > On 29/11/2024 23:57, Vincenzo Pupillo wrote: > > +;; This package provides `mhtml-ts-mode' which is a major mode > > +;; for editing HTML files with embedded JavaScript and CSS. > > +;; Tree Sitter is used to parse each of these languages. > > +;; > > +;; Please note that this package requires `html-ts-mode', which > > +;; registers itself as the major mode for editing HTML. >=20 > Hi! >=20 > Do you foresee cases for when html-ts-mode would be preferred by the > user instead of this advanced mhtml-ts-mode?=20 =46or everyday use mhtml-ts-mode is better, just like mhtml-mode (which has= been=20 the default for html editing for a while now). > Or maybe the former is > better in its current shape when used by e.g. php-ts-mode? Yes, personally I think that major modes that handle (for tree-sitters) onl= y=20 one language are easier to put together at the moment. It's Lego vs.=20 Playmobil. We are in an experimental phase, like all other editors. See https://github.com/helix-editor/helix/pull/1170#issuecomment-997294090 In some ways, by having a different approach from other editors, we have a= =20 greater degree of flexibility IMHO. >=20 > In other words, I'm wondering why not update the existing mode with > sub-parsers rather than add a new one. html-mode had such a reason - > it's quite old, and has been used in various placed the way it is now > (including multi-mode packages). But ts modes don't work too well with > multi-mode packages, not currently anyway. It's something I've thought about but haven't tried yet.=20 One of the themes of the email thread (on emacs-devel) was to have a simple= =20 multi language major mode that was also a sort of =E2=80=9Cuser's guide.=E2= =80=9D Vincenzo.