From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#67556: 29.1; java-ts-mode doesn't indent open curly brackets properly Date: Sat, 16 Dec 2023 13:56:59 +0200 Message-ID: <83ttoimkc4.fsf@gnu.org> References: <4ef658bb-9336-439e-aba6-2b1caca9fda3@email.android.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16191"; mail-complaints-to="usenet@ciao.gmane.io" Cc: spavkov@ilstu.edu, 67556@debbugs.gnu.org To: theo@thornhill.no, Yuan Fu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Dec 16 12:58:16 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 1rETJA-0003yc-1o for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 16 Dec 2023 12:58:16 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rETIw-0007A4-MJ; Sat, 16 Dec 2023 06:58:02 -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 1rETIv-00079b-R3 for bug-gnu-emacs@gnu.org; Sat, 16 Dec 2023 06:58:01 -0500 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 1rETIv-0006Mo-J6 for bug-gnu-emacs@gnu.org; Sat, 16 Dec 2023 06:58:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rETIw-0003ht-2E for bug-gnu-emacs@gnu.org; Sat, 16 Dec 2023 06:58:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 16 Dec 2023 11:58:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 67556 X-GNU-PR-Package: emacs Original-Received: via spool by 67556-submit@debbugs.gnu.org id=B67556.170272784914184 (code B ref 67556); Sat, 16 Dec 2023 11:58:02 +0000 Original-Received: (at 67556) by debbugs.gnu.org; 16 Dec 2023 11:57:29 +0000 Original-Received: from localhost ([127.0.0.1]:54084 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rETIO-0003gi-Sx for submit@debbugs.gnu.org; Sat, 16 Dec 2023 06:57:29 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45920) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rETIN-0003gU-2X for 67556@debbugs.gnu.org; Sat, 16 Dec 2023 06:57:27 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rETIF-0006Io-OV; Sat, 16 Dec 2023 06:57:20 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=khQlbwrk1teDwPZzcwJDcg7o75ZZuSlDoRHtt2RRdqA=; b=gk1YdIDQFmqmyDvhAd1J bHWYdP4tbN+Sp0voJyz8R5AVCeQWY1wtcMtcF+LEdbCquY0kbP5ABdt9j/UtZkU0n9SeuKaWUo9Qs //lGRUvv04xvwaWtM7gcFKid7deuNhp7rjGZzaQxXU/lgrXogmnEkmmCqeMvsjXHFj8FOkSUZsERG 3cx7At5/gDR2YU605U58nX5+O+xIazVt7fOEJbNPadK951JCxoAcvdPdUnRozLrKiv45nkAZw7Piu Hl43eEYol37XBDYOpoeGr5DaCduG59Ht0PhAaGRageUxf0pqul+m7AdLBbl1QudQ1Uep2UuGqF9zQ 92Wik3pVeaCRdg==; In-Reply-To: (message from Yuan Fu on Sun, 10 Dec 2023 01:56:55 -0800) 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:276318 Archived-At: Theo, any progress? This bug is one of those which I'd like to resolve before releasing Emacs 29.2. Could you please look into this? Thanks. > Date: Sun, 10 Dec 2023 01:56:55 -0800 > Cc: Spencer Pavkovic , 67556@debbugs.gnu.org > From: Yuan Fu > > > > On 12/9/23 8:40 AM, Theodor Thornhill wrote: > > > > > > On Dec 9, 2023 09:26, Eli Zaretskii wrote: > > > > > Date: Thu, 30 Nov 2023 16:28:11 -0600 > > > From:  Spencer Pavkovic via "Bug reports for GNU Emacs, > > >  the Swiss army knife of text editors" > > > > > > If you are in java-ts-mode, attempting to put an opening curly > > bracket > > > '{' on it's own line will not indent the bracket at all. > > > > > > While I expect it to place the bracket on the same indent level > > as the > > > block (like regular java-mode), it is always far left with 0 tabs. > > > > > > I did run with emacs -Q and the same thing happened. > > > > > > // EXPECTED > > > public class Thing > > > { > > >       public Thing() > > >       { > > >           try > > >           { > > >               // stuff > > >           } catch (Exception e) > > >           { > > >               // stuff > > >           } > > >       } > > > } > > > > > > // ACTUAL > > > public class Thing > > > { > > >       public Thing() > > > { > > >           try > > > { > > >               // stuff > > >           } catch (Exception e) > > > { > > >               // other stuff > > >           } > > >      } > > > } > > > > Yuan and Theo, any comments? > > > > This can be supported, but no Java code is indented like this, though. > > But it could make sense to support at least _some_ indentation here. I > > can take a look at this tonight! > > > > Thanks for the ping :) > > Theo > > Thank you Theo. I'll leave this to you. > > Yuan >