From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eason Huang Newsgroups: gmane.emacs.bugs Subject: bug#61631: 29.0.60; The indentation of switch case is broken on typescript-ts-mode and tsx-ts-mode Date: Mon, 20 Feb 2023 20:26:41 +0800 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23828"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 61631@debbugs.gnu.org To: Theodor Thornhill Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Feb 20 13:29:27 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 1pU5IL-0005y1-Bn for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 20 Feb 2023 13:29:26 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pU5I0-0005QW-Hr; Mon, 20 Feb 2023 07:29:04 -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 1pU5Hy-0005Q9-Lo for bug-gnu-emacs@gnu.org; Mon, 20 Feb 2023 07:29: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 1pU5Hy-0003xh-CK for bug-gnu-emacs@gnu.org; Mon, 20 Feb 2023 07:29:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pU5Hy-00078i-3w for bug-gnu-emacs@gnu.org; Mon, 20 Feb 2023 07:29:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eason Huang Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 20 Feb 2023 12:29:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61631 X-GNU-PR-Package: emacs X-Debbugs-Original-Cc: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.167689609127386 (code B ref -1); Mon, 20 Feb 2023 12:29:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 20 Feb 2023 12:28:11 +0000 Original-Received: from localhost ([127.0.0.1]:50812 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pU5H9-00077c-6j for submit@debbugs.gnu.org; Mon, 20 Feb 2023 07:28:11 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:35206) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pU5H5-00077P-0m for submit@debbugs.gnu.org; Mon, 20 Feb 2023 07:28:09 -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 1pU5H1-0005Mu-QJ for bug-gnu-emacs@gnu.org; Mon, 20 Feb 2023 07:28:05 -0500 Original-Received: from out203-205-221-192.mail.qq.com ([203.205.221.192]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pU5Gw-0003qF-KA for bug-gnu-emacs@gnu.org; Mon, 20 Feb 2023 07:28:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foxmail.com; s=s201512; t=1676896071; bh=eR5tZc6kC/e/NfhFNn2fOoymjuH3yHzO1As30xQsVvA=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=sfwPyE2g6mwOc2K8jTE8gRM8rUTXoTznXO1qNdTxpGHv0jLD7/NnGfs4gWOgxvwmS KZ2CWGjb9PIH3/KSdTMk5Q4HgAmAOYDd+/qCjDHU8HVv/DA/GSWCdjvo3sY57j/ie4 SYi9HHjdW1ugpRcgUWEOti8532ZoA4Hb3OwW6h54= Original-Received: from macbook ([101.85.10.85]) by newxmesmtplogicsvrszb6-0.qq.com (NewEsmtp) with SMTP id 6A91CEE3; Mon, 20 Feb 2023 20:26:41 +0800 X-QQ-mid: xmsmtpt1676896001tegcyj2da X-QQ-XMAILINFO: NDgMZBR9sMmaiKKBTHeOUYJZIBOM7yja+pJz1q5k8GkwgWMSdFTGcHnOAJdaYx yJalkCfa1GCtGIikPD4wv4YGGu/yHAq1f93bB4mU6BDDAO/uC8V0qymXrJ6ispxGGslGVSuBAAt8 Jlum2m04FwmeQijyKX6LR9wd5yVz/++odk5HuupVMdV3/d+S5FC8wmVwXXMZ30/Fu8MbGMvKdxZ7 k3dar6HVrboh76Osb2Y1YvGbHadJht2gur+kV+8dMbHSiNRoiYyl9Hv1JUG4fjEL1BsmiYPwutDX s4hksM7G4vDH7QAN6VTJuPk+mjMZQHQ+mu+CkRCnX0CW4ZzMfIhGXXX80XPY2ZAv2jYoDgEbJl+1 bsit9smZ5FLY4R/ZWJjEPc6MpZ4PBnpV83bhDZVDTGRg1LeK4XCzRr9ZD4kqfQNpF/oCp0QmEOnM ZfMHAwmpgml1hH8RD8MExbveKkt8/Pa7WxXSuYoF7dH1ikqvWZEHPv5CVX2GvO1F8t7QptnFeO3W a+q7hJKM1P/0z2w+xWGkFVHzoPh9ich87IoZ/br4KoUr6KlY0P1bfCKJYMbHrD1Q/Atuy35ZxT88 sHoB1Meqxg6FJ4d+cjrbG4da0pxdMwQg8j4U6APFwhF3bKPsjY1xkCxc322Ii6FBUHlEXOThKGIn Sr6R7zFZOo1WE+UHmCNB82Dat62z3vbhPDV1wJdOaNZRtyhlKSSZlIUsSAJslXB0HGjB3xtctVks khczWtBwBAU7NYxKG5X5u9LfzSaVpfcmLqVtxZ9cGDFYAVhphXYKw5czp1Ypj1kjd+jQHrynCnth 6/ujP/yuExDja7/E23B2rpLqaB40EbxkOBS2o5Wa In-Reply-To: (Theodor Thornhill's message of "Sun, 19 Feb 2023 17:03:10 +0100") Original-Message-ID: Received-SPF: pass client-ip=203.205.221.192; envelope-from=aqua0210@foxmail.com; helo=out203-205-221-192.mail.qq.com X-Spam_score_int: 11 X-Spam_score: 1.1 X-Spam_bar: + X-Spam_report: (1.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_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, HELO_DYNAMIC_IPADDR=1.951, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_DYNAMIC=0.982, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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:256150 Theodor Thornhill writes: > On 19 February 2023 14:24:30 CET, Eason Huang wrote: >>Hello Theodor and Emacs dev team, >> >>Recently I found that the indentation is broken in typescript-ts-mode >>and tsx-ts-mode. When I press RET (M-x newline) after the ':' in the >>case clause, it will always indent to the the same position of previouse line. >> >>For example: >>In typescript-ts-mode and tsx-ts-mode will get this result as below: >> >>``` >>let day: number = 1; >> >>switch (day) { >>case 0: >>console.log("It is a Sunday."); >>break; >>case 1: >>console.log("It is a Monday."); >>break; >>default: >>console.log("No such day exists!"); >>break; >>} >>``` >>expected: >> >>``` >>let day: number = 1; >> >>switch (day) { >>case 0: >> console.log("It is a Sunday."); >> break; >>case 1: >> console.log("It is a Monday."); >> break; >>default: >> console.log("No such day exists!"); >>break; >>} >>``` >> >>steps to reprodue: >> >>1. start emacs with `emacs -Q` >>2. C-x C-f ~/test.tsx to open a test.tsx >>3. M-x typescript-ts-mode >>4. input the exmaple code mentioned above >>5. you will see the result. >> >>-- > > > Great, thanks! I'll fix it tonight, unless you want to devise a patch yourself? > Hi Theo, Sorry, I have no idear how to fix it. I tried the latest commit(fc4bfa76db9) of emacs-29 branch, but the issue is still existed. -- Eason Huang