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.help Subject: Re: JavaScript/TypeScript: What do people in 2024, on emacs 29, use for .js, .jsx, .ts and .tsx? Date: Sun, 14 Jan 2024 23:00:04 +0200 Message-ID: References: <77493010-0b8f-4173-88ed-e726b89a3fad@gutov.dev> <87v8816txt.fsf@dod.no> <877ckd7kr6.fsf@dod.no> 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="32785"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird To: Steinar Bang , help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jan 14 22:01:04 2024 Return-path: Envelope-to: geh-help-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 1rP7bL-0008Jk-9y for geh-help-gnu-emacs@m.gmane-mx.org; Sun, 14 Jan 2024 22:01:04 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rP7aZ-00010I-Rg; Sun, 14 Jan 2024 16:00:15 -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 1rP7aY-0000zw-6f for help-gnu-emacs@gnu.org; Sun, 14 Jan 2024 16:00:14 -0500 Original-Received: from wout5-smtp.messagingengine.com ([64.147.123.21]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rP7aW-0001HK-2P for help-gnu-emacs@gnu.org; Sun, 14 Jan 2024 16:00:13 -0500 Original-Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.west.internal (Postfix) with ESMTP id 06ECC3200AC0; Sun, 14 Jan 2024 16:00:07 -0500 (EST) Original-Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Sun, 14 Jan 2024 16:00:08 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=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=fm1; t=1705266007; x=1705352407; bh=yWaBOoEwYnFl63KBcUqqrDZVvxFGK50Mof/EW2s6/gM=; b= qJcFQonAkuoyC5qRZ+eGqKX8D8mWBF7rRcHnTm9ZUn13DNPci3YwL10thgkS2mkF NZKjQy92uVYDGCXT61iYR1zp83I1MmIxO/jCBRR0ibxBqi6tbDUMp74+rBLM8SpW EZXqz6BepHFDmnTE8tPGC23pYqQZlprU5lAq/2XFe6KJPzEvahULrB6/CguwfHl1 rSiJVbPm/lzvW5KoNom2fU3EAsMclDwVj1+5MmMywvwvYBXvNn1YAN8i5Bfn6NLT zHoK+cNuBa5uxN33ZMaIsvZ4SfLuA4WDusLa6rcLjV8vi4B5WlPjTK4L2gLhQ1Rf RuQV0nJckIX65hqH311bzg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=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=fm2; t=1705266007; x= 1705352407; bh=yWaBOoEwYnFl63KBcUqqrDZVvxFGK50Mof/EW2s6/gM=; b=w rFRrrVyY0cnfeeigE+JeRKA0/VGtSmk7VpsksingIl+n98NAXHind14tY83DTv5I +Jba1mh1IxSjVQ6u8hh4IhwOJyLY2onpIjG8K39wd6l5wr3DvEgLXXNbaPC57qDR 8apX0If6lIAkQXShbm0uHyER6dG0MqeLlKLhjQAYHWekgrGYrHmK8faj2fXtqypu nzAs604f+MXNZ2HUAR9NXcz1xjMbGoWCr8Zp+74b0d2KCiwozZvPS9K4u1n1MGqs Evy1HZ3NNeacFImBQCadAiUaCn2xTJogi4AIlgJWAWC11IQfgn+rREqE/jX2xNKd TBWH0fbZyFj7aTCihTeFg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrvdeiledgudeghecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefkffggfgfuvfhfhfgjtgfgsehtjeertddtvdejnecuhfhrohhmpeffmhhi thhrhicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdruggvvheqnecuggftrfgrth htvghrnhephfeftdfhudejleelfeekjedtheefjedvlefgieeuteekheeuffekgfdviefg hfdtnecuffhomhgrihhnpehgihhthhhusgdrtghomhenucevlhhushhtvghrufhiiigvpe dtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegumhhithhrhiesghhuthhovhdruggvvh X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 14 Jan 2024 16:00:06 -0500 (EST) Content-Language: en-US In-Reply-To: <877ckd7kr6.fsf@dod.no> Received-SPF: pass client-ip=64.147.123.21; envelope-from=dmitry@gutov.dev; helo=wout5-smtp.messagingengine.com X-Spam_score_int: -26 X-Spam_score: -2.7 X-Spam_bar: -- X-Spam_report: (-2.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, URIBL_SBL_A=0.1 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:145731 Archived-At: On 13/01/2024 09:30, Steinar Bang wrote: >>>>>> Steinar Bang : >>>>>> Dmitry Gutov : > >>> but some features (like tag splitting?) might have to be reimplemented >>> anew. Should be easier to do that using tree-sitter parse tree than >>> with sgml-mode. Perhaps if rjsx-mode has an implementation, it >>> wouldn't be too hard to port it. > >> I'll do a dive into the rjsx code and see if I can identify where it >> does tag splitting and post back on the thread here. > > Harder than I thought... parsing and manipulation of the buffer seems > interweaved, but perhaps here: > https://github.com/felipeochoa/rjsx-mode/blob/master/rjsx-mode.el#L452 Doesn't look like that: rjsx-parse-xml seems like a routine to parse and return an xml parse node. > If you have something like > > and you type a ">" after "Home", i.e. > > then the "" is immediately expanded to "" > Seems like it's the command called 'rjsx-electric-gt' defined here: https://github.com/felipeochoa/rjsx-mode/blob/b697fe4d92cc84fa99a7bcb476f815935ea0d919/rjsx-mode.el#L916 > And it, sort of, kind of, looks like the above code is the one doing it, maybe...? > > (Couldn't figure out where js2-DIV and friends were defined so I don't > know what it matches) js2-DIV is defined in js2-mode.el (which is a dependency). The value is a number which denoted the node type. But might be unnecessary, given the above.