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#65134: [PATCH] * lisp/progmodes/js.el Fix js-ts-mode indent bug in JSX expressions Date: Tue, 08 Aug 2023 11:22:29 +0200 Message-ID: <12267622.O9o76ZdvQC@fedora> References: <87tttak40q.fsf@dfreeman.email> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32550"; mail-complaints-to="usenet@ciao.gmane.io" To: 65134@debbugs.gnu.org, danny@dfreeman.email Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Aug 08 11:23:28 2023 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 1qTIw3-0008LB-24 for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 08 Aug 2023 11:23:27 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qTIvi-00077L-J6; Tue, 08 Aug 2023 05:23:06 -0400 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 1qTIve-00076I-T8 for bug-gnu-emacs@gnu.org; Tue, 08 Aug 2023 05:23:02 -0400 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 1qTIve-0005jw-IN for bug-gnu-emacs@gnu.org; Tue, 08 Aug 2023 05:23:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qTIve-0004rd-DT for bug-gnu-emacs@gnu.org; Tue, 08 Aug 2023 05:23:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Vincenzo Pupillo Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 08 Aug 2023 09:23:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65134 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch X-Debbugs-Original-To: bug-gnu-emacs@gnu.org, Danny Freeman Original-Received: via spool by submit@debbugs.gnu.org id=B.169148656418669 (code B ref -1); Tue, 08 Aug 2023 09:23:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 8 Aug 2023 09:22:44 +0000 Original-Received: from localhost ([127.0.0.1]:35184 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qTIvL-0004r3-NJ for submit@debbugs.gnu.org; Tue, 08 Aug 2023 05:22:44 -0400 Original-Received: from lists.gnu.org ([2001:470:142::17]:35700) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qTIvJ-0004qq-06 for submit@debbugs.gnu.org; Tue, 08 Aug 2023 05:22:43 -0400 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 1qTIvD-0006zB-La for bug-gnu-emacs@gnu.org; Tue, 08 Aug 2023 05:22:35 -0400 Original-Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qTIvB-0005cc-Mu for bug-gnu-emacs@gnu.org; Tue, 08 Aug 2023 05:22:35 -0400 Original-Received: by mail-wr1-x431.google.com with SMTP id ffacd0b85a97d-307d20548adso4130836f8f.0 for ; Tue, 08 Aug 2023 02:22:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1691486551; x=1692091351; 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=SHN63ON0Wic3cR6cvGrVmuxTRr20l9tBRDFnYWImUzg=; b=Bok5dXmmY9Sg4Tq0O8z7a6mOJOTkKzAxWMozwYadUUGB00qOSRUtdWUW3OnAP4xKai BoTBfZcco+/jUJ73YdCUMk0t/Wja3IDYWIVq8/KSojgCMzXe8bdRkgWnI0Q7E6pQYW8c VBz68dnqOl4mumAfH6NKXoh3jguE8LKasO8JvtPdyHrL4rVQ7u/rrcZClbBuyb9jqjd0 F8RWf+pRd41o4ZwUQq8P/bPpJqV43sShkQbQFzygQj8rSic55FH4X1l4V1fxVsf8/DCx 0JrFo5vS7JQfDTaItloJLJyUnrMilAKpPEhovKiAMPfwPphp4ExedmtAeO7ZrtXL1jCm WgRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691486551; x=1692091351; 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=SHN63ON0Wic3cR6cvGrVmuxTRr20l9tBRDFnYWImUzg=; b=cRQShO0ZLyFn24aeHbMaTI2bOjySuKl/8vYD4AIuZY2dsVUTmUH7LCaKQ5tBVdhOgr TDfKpZQp/WXC/sb56g4NjFn6AtDiMCN9VR1k8mGCO3O+ps8wZFwFwZ7c2OBbMukw5t4W GADWRK9JXvRuj9FznOr9sfuf9wWUjJPtDS60jZiAkGsrCGvv5u/RMT4mzGtxXWbau2gg z2pC3OsOa52zK9K4eZouiSOBb3mSKDp3Kn4rqFLpaYD+xCmkB3ZFegPLBXNgJGOIUqTI ZVfJbI+bZx/fShOzhdzo/VraHOKN4/+YmKqoJbLCe2c+Fl7iqhD0EerpWzeH7zOFPXiA 67iQ== X-Gm-Message-State: AOJu0Ywhal60B/BFSVhvZ90r75Q61npci6yz5S9ohrlAbYlZvxQ3gRz7 XA4rfQBVqHLyxltCu9AAooC1RpS07Xo= X-Google-Smtp-Source: AGHT+IHaUKqcIheF5q+y+fLDBORaR6KE0O1NHVN9hZ8wgLMZtqgqPyEnc/m7EhZ3eub3+fUWEC+Vzw== X-Received: by 2002:adf:facd:0:b0:315:ae39:27c with SMTP id a13-20020adffacd000000b00315ae39027cmr6058435wrs.70.1691486551300; Tue, 08 Aug 2023 02:22:31 -0700 (PDT) Original-Received: from fedora.localnet (93-33-14-204.ip42.fastwebnet.it. [93.33.14.204]) by smtp.gmail.com with ESMTPSA id z9-20020a5d4c89000000b00317f3fd21b7sm2876783wrs.80.2023.08.08.02.22.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Aug 2023 02:22:31 -0700 (PDT) In-Reply-To: <87tttak40q.fsf@dfreeman.email> Received-SPF: pass client-ip=2a00:1450:4864:20::431; envelope-from=v.pupillo@gmail.com; helo=mail-wr1-x431.google.com 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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:266925 Archived-At: Hi,=20 I confirm the bug and that the patch fixes it. Thank you Danny. Vincenzo Pupillo=20 In data luned=EC 7 agosto 2023 22:10:13 CEST, Danny Freeman ha scritto: > Tags: patch >=20 >=20 > Hello, >=20 > I have a patch for a bug I found in js-ts-mode. > When editing jsx blocks, the indentation does not work. >=20 > For example, in a file with the following file with JSX code in it > and js-ts-mode enabled >=20 > ``` > function App() { > return ( >
>
> ); > } > ``` >=20 > placing your cursor at the end of the opening div tag and pressing ENTER > does not indent, instead there is no indentation. >=20 > This patch corrects that by properly expanding the > `js-jsx--treesit-indent-compatibility-bb1f97b' function, which returns > some indent rules.