From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Steinar Bang Newsgroups: gmane.emacs.help Subject: Re: JavaScript/TypeScript: What do people in 2024, on emacs 29, use for .js, .jsx, .ts and .tsx? Date: Sat, 13 Jan 2024 08:30:53 +0100 Message-ID: <877ckd7kr6.fsf@dod.no> References: <77493010-0b8f-4173-88ed-e726b89a3fad@gutov.dev> <87v8816txt.fsf@dod.no> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10632"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jan 13 08:31:56 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 1rOYUl-0002XZ-7z for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 13 Jan 2024 08:31:55 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rOYUD-0001rZ-34; Sat, 13 Jan 2024 02:31:22 -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 1rOYU8-0001qg-Lg for help-gnu-emacs@gnu.org; Sat, 13 Jan 2024 02:31:17 -0500 Original-Received: from schwantz.bang.priv.no ([2a01:4f9:c011:82fd::1]) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rOYU4-0001kZ-O6 for help-gnu-emacs@gnu.org; Sat, 13 Jan 2024 02:31:15 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=dod.no; s=sb; t=1705131054; bh=oWczf2yUhtTgaW+fRP9GQqdyfpU9h1Wqe1ZhG5qYBag=; h=From:To:Subject:References:Date:In-Reply-To:From; b=LQnQEReN5Bzp5Pi98zdTszsPtC7Fm3ETfwtJi/V8oK180wQ2un2902c8Z9PlsYdH0 CBl/DtKVtr02rqEvesPcAv3GnLe6It/Nnw0z9KbsBXuBVyEAzRnCPIVWsye2MFiU+C 8wHTOtqXL3kcapQqJhLphCb6ehvyXAIubI7cT99g= Original-Received: from marquez (unknown [84.210.69.52]) by schwantz.bang.priv.no (Postfix) with ESMTPSA id 665795BC for ; Sat, 13 Jan 2024 07:30:54 +0000 (UTC) In-Reply-To: <87v8816txt.fsf@dod.no> (Steinar Bang's message of "Wed, 10 Jan 2024 17:21:02 +0100") Received-SPF: none client-ip=2a01:4f9:c011:82fd::1; envelope-from=sb@dod.no; helo=schwantz.bang.priv.no X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, SPF_HELO_NONE=0.001, SPF_NONE=0.001, T_SCC_BODY_TEXT_LINE=-0.01 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:145725 Archived-At: >>>>> 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 If you have something like and you type a ">" after "Home", i.e. then the "" is immediately expanded to "" 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)