From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Yuan Fu Newsgroups: gmane.emacs.bugs Subject: bug#67556: 29.1; java-ts-mode doesn't indent open curly brackets properly Date: Sun, 10 Dec 2023 01:56:55 -0800 Message-ID: References: <4ef658bb-9336-439e-aba6-2b1caca9fda3@email.android.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="750"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird Cc: Spencer Pavkovic , 67556@debbugs.gnu.org To: Theodor Thornhill , Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Dec 10 10:58:05 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 1rCGZZ-000AXg-0s for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 10 Dec 2023 10:58:05 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rCGZK-00009s-Vp; Sun, 10 Dec 2023 04:57:51 -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 1rCGZI-00009J-V0 for bug-gnu-emacs@gnu.org; Sun, 10 Dec 2023 04:57:48 -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 1rCGZI-0001ZD-My for bug-gnu-emacs@gnu.org; Sun, 10 Dec 2023 04:57:48 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rCGZW-0005nL-9j for bug-gnu-emacs@gnu.org; Sun, 10 Dec 2023 04:58:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Yuan Fu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 10 Dec 2023 09: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.170220224222224 (code B ref 67556); Sun, 10 Dec 2023 09:58:02 +0000 Original-Received: (at 67556) by debbugs.gnu.org; 10 Dec 2023 09:57:22 +0000 Original-Received: from localhost ([127.0.0.1]:49512 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rCGYr-0005mO-UD for submit@debbugs.gnu.org; Sun, 10 Dec 2023 04:57:22 -0500 Original-Received: from mail-ot1-x333.google.com ([2607:f8b0:4864:20::333]:50467) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rCGYn-0005m8-CE for 67556@debbugs.gnu.org; Sun, 10 Dec 2023 04:57:21 -0500 Original-Received: by mail-ot1-x333.google.com with SMTP id 46e09a7af769-6d9dadc3dc0so2449688a34.1 for <67556@debbugs.gnu.org>; Sun, 10 Dec 2023 01:57:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1702202217; x=1702807017; darn=debbugs.gnu.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=uJT5DovPqCn522yOqr5/mn/YKhkCZtSxpUyWXIgVhk8=; b=DldaPYtL/FNWFt5yFy8KM6XxIob1CetgPxOlPtD9LFTEij3UZwhe2r+SgdTtllbuxT l1E0Tm0Yd60VAWqbI1TqFQJjyPhf4WFv4x8F+bfxchysoLa+pcq2GEdtSWAY91h1Pcd1 UhBb8bOa/hT1fp3MVZqsMnaYI3OozuQqS29Qfa5htmxjVfuARYxYxTdJjyHKS8K+c64w BT3nQpIGgwEVBMcbv7Ba6BaykrESwyF6WyVA+ilIdvqDBTumqXLNbcBRUpMwc3e4K3ZP QqkEp4eolgdEbMVMAKjmBzfQTmuzwS2ZpmDZcLwFE5thMVQh1FG9rlE6ZiQsWVitoEAr FO8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702202217; x=1702807017; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=uJT5DovPqCn522yOqr5/mn/YKhkCZtSxpUyWXIgVhk8=; b=dt4V9Gsj0dZYrvzja8oneaJlyO4pyeImVWqoGCMcfdj558X3Xi/O9W1NoA/2gCf0FX Lnn3aE8fNrfCiPe/30gH8w1qcxa1ooQfm343sQN6AlWtU5fmRHPHkILz610/mAZWb9aP D7pLqEZan2sh/zdJTIT3asZliSu53IUvml6WaMPo51rA1A9mcEVkuOmcGX7FD0ZYgSLe XUO/VeJ+1hDkN7ldezK7spLdlxdjcVTgv7vBw2zWRQBP8z/SJWJPdR9B/DERJaeoYYMi HwhKzTmAD9EHT6RVEAYX2xfSzhYBymvjArXuTuP7U+CC1eOV689rPxxrqY+zcOnCzgzw F2+g== X-Gm-Message-State: AOJu0YytfWE0/h6SPApLs0H8IA3JkN1/9MmVjeqmRAVllFJXS9S7yKzX ecFR7+GIRx+t5sqnc6rdjIU= X-Google-Smtp-Source: AGHT+IEAxbl8XsKOJC1cIw9t/h/vtVFE37GTJ7bhxavFMvImiLpm6AOK9222dSkWxvAalDrP4gFPxA== X-Received: by 2002:a05:6830:22e4:b0:6d8:74e2:7cdf with SMTP id t4-20020a05683022e400b006d874e27cdfmr2958330otc.58.1702202217558; Sun, 10 Dec 2023 01:56:57 -0800 (PST) Original-Received: from [192.168.1.7] (172-117-161-177.res.spectrum.com. [172.117.161.177]) by smtp.gmail.com with ESMTPSA id fb6-20020a056a002d8600b006ce95e37a40sm4305156pfb.111.2023.12.10.01.56.56 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 10 Dec 2023 01:56:57 -0800 (PST) Content-Language: en-US In-Reply-To: <4ef658bb-9336-439e-aba6-2b1caca9fda3@email.android.com> 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:275907 Archived-At: 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