From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jostein =?UTF-8?Q?Kj=C3=B8nigsen?= Newsgroups: gmane.emacs.bugs Subject: bug#59691: Html-like constructs fail in typescript Date: Tue, 29 Nov 2022 22:37:25 +0100 Message-ID: References: <87pmd58ohe.fsf@thornhill.no> Mime-Version: 1.0 (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="18799"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 59691@debbugs.gnu.org, casouri@gmail.com, jostein@kjonigsen.net, eliz@gnu.org To: Theodor Thornhill Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Nov 29 22:38:24 2022 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 1p08J3-0004dV-E8 for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 29 Nov 2022 22:38:23 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p08In-0004OG-Av; Tue, 29 Nov 2022 16:38:10 -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 1p08Ik-0004Mm-RH for bug-gnu-emacs@gnu.org; Tue, 29 Nov 2022 16:38:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p08Ik-0002ky-IT for bug-gnu-emacs@gnu.org; Tue, 29 Nov 2022 16:38:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p08Ik-00018X-74 for bug-gnu-emacs@gnu.org; Tue, 29 Nov 2022 16:38:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Jostein =?UTF-8?Q?Kj=C3=B8nigsen?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 29 Nov 2022 21:38:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59691 X-GNU-PR-Package: emacs Original-Received: via spool by 59691-submit@debbugs.gnu.org id=B59691.16697578664338 (code B ref 59691); Tue, 29 Nov 2022 21:38:02 +0000 Original-Received: (at 59691) by debbugs.gnu.org; 29 Nov 2022 21:37:46 +0000 Original-Received: from localhost ([127.0.0.1]:56549 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p08IT-00017u-Sb for submit@debbugs.gnu.org; Tue, 29 Nov 2022 16:37:46 -0500 Original-Received: from out1-smtp.messagingengine.com ([66.111.4.25]:54071) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p08IS-00017o-LZ for 59691@debbugs.gnu.org; Tue, 29 Nov 2022 16:37:45 -0500 Original-Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 83FC25C0090; Tue, 29 Nov 2022 16:37:39 -0500 (EST) Original-Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Tue, 29 Nov 2022 16:37:39 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= secure.kjonigsen.net; h=cc:cc:content-transfer-encoding :content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to; s=fm3; t=1669757859; x=1669844259; bh=jkUhrSOzTX nl3R/AyqwDVNnfC86T9GcsO8yPQU3kJyw=; b=n7MrAlWGAmEikD977eY6LH+jld 4YaGFA8A5HkaJoJTcZPfWFy+aqKqw0ZezWlC7+6TTAl7I8D21rlolox5cVmk6WOz hbpyuzMJz2WIPYtT1+0fQaTz3WD0l6YXDTwJ7yWqEf74ZMEmfFlySomP7u59LDdd PBq9jO+Ft1CnPZnOqtWlE/ckKcydRhl70ov+GGGd6M6fI+8s2arXlHogFSG7+Hvf C6+805x71t6EZgwV6TCBccQvRxoZ4G0fEIfqqMpsl32uh58Ch4A2QAMzER3hhe3I x0PaPtXmfa1u8vLwLM4oVx0qSVLxVqvRmvjDCjpSgUd0rVFGJ1nSTRIV1cEw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1669757859; x= 1669844259; bh=jkUhrSOzTXnl3R/AyqwDVNnfC86T9GcsO8yPQU3kJyw=; b=S rTIC2J4rh1SMnETbthglynbzWw9b2+9uKHO+I+FmsDg4zsZuzOKeLHOBYBjo60+r //bOzgFVr51kiMYO/nuSg2teOAs7El5FWA8ytAzLKslqj0iHj3BzxEMZXJRwPOSB rZA/3EJ1PlLsUU1cN/hU8AOcBN7IinADcdmjkabYyBVRxO2+0KVEQ7wkQoLFVTvU WcuPSWvKBDXUvLPrSe3v1zbyXwhuGdDK7xJxWFL7XSn14NXGwnPBFDhbmbVPb/Sl csyA2tNFBCoAWo99vM6lXG8Sj8UVOoBvVHJG/rMeJFddGYN1lx67FQwwRKZcD6Ym 6qrZh2cQqNfgRYMB1gNLA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrtddugddtkecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpegtgffhggfufffkfhevjgfvofesthhqmhdthhdtjeenucfhrhhomheplfhoshht vghinhcumfhjpphnihhgshgvnhcuoehjohhsthgvihhnsehsvggtuhhrvgdrkhhjohhnih hgshgvnhdrnhgvtheqnecuggftrfgrthhtvghrnhepjeegudevffeifeegveduieetfedt gfetgfffgeeffeeghffgfefhffeggeduvddunecuffhomhgrihhnpehkjhhnihhgshgvnh drnhgvthenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhm pehjohhsthgvihhnsehsvggtuhhrvgdrkhhjohhnihhgshgvnhdrnhgvth X-ME-Proxy: Feedback-ID: ib2f84088:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 29 Nov 2022 16:37:39 -0500 (EST) In-Reply-To: <87pmd58ohe.fsf@thornhill.no> X-Mailer: iPhone Mail (20C5049e) 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:249447 Archived-At: Nice! Should we until further notice assume that js-ts-mode suffers from the same i= ssues, and that a jsx-ts-mode might be needed too? To me it at least sounds p= lausible.=20 Speaking of duplication=E2=80=A6 Now that we have tree-sitter wouldn=E2=80=99= t it be possible to use the same parser and/or the same major-modes for JS/J= SX as we already do for TS/TSX? JS/JSX is just Typescript without the type-a= nnotations, right? Or are there good reasons for having separate modes for these? =E2=80=94 Jostein Kj=C3=B8nigsen https://jostein.kj=C3=B8nigsen.net > On 29 Nov 2022, at 22:04, Theodor Thornhill wrote: >=20 > =EF=BB=BF > Hi Jostein! >=20 > I already have a fix for this bug lined up, and will send the fix as > soon as I get my other stuff applied. It relies on another patch that > is waiting. >=20 > The solution is to create two modes: typescript-ts-mode and > tsx-ts-mode. They have separate parsers, and should be treated as > separate languages. That means that in a .ts file we enable the > 'typescript' language, and in .tsx we enable the 'tsx' language. This > exact issue is why they have two languages. >=20 > In other words, we cannot support this in typescript-ts-mode. >=20 > I hope to get this in pretty soon :) >=20 > Theo