GNU bug report logs - #77803
tsx-ts-mode: wrong indentation for variables declarations

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Konstantin Kharlamov <Hi-Angel@HIDDEN>; Done: Yuan Fu <casouri@HIDDEN>; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 77803 <at> debbugs.gnu.org:


Received: (at 77803) by debbugs.gnu.org; 27 Apr 2025 00:35:24 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Apr 26 20:35:24 2025
Received: from localhost ([127.0.0.1]:36498 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1u8pzM-0007qt-TK
	for submit <at> debbugs.gnu.org; Sat, 26 Apr 2025 20:35:24 -0400
Received: from fhigh-b4-smtp.messagingengine.com ([202.12.124.155]:47203)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <dmitry@HIDDEN>) id 1u8pzG-0007kc-Rw
 for 77803 <at> debbugs.gnu.org; Sat, 26 Apr 2025 20:35:19 -0400
Received: from phl-compute-09.internal (phl-compute-09.phl.internal
 [10.202.2.49])
 by mailfhigh.stl.internal (Postfix) with ESMTP id 774F92540133;
 Sat, 26 Apr 2025 20:35:08 -0400 (EDT)
Received: from phl-mailfrontend-02 ([10.202.2.163])
 by phl-compute-09.internal (MEProxy); Sat, 26 Apr 2025 20:35:08 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc
 :cc:content-transfer-encoding:content-type:content-type:date
 :date:from:from:in-reply-to:in-reply-to:message-id:mime-version
 :references:reply-to:subject:subject:to:to; s=fm1; t=1745714108;
 x=1745800508; bh=OFvHNsop+JVT4T7zFC0VuiYLhOR+ctNynCSdrRfK5hs=; b=
 Po4eyB8yiBtPxkha+cdiT3g3zXbRrUfMkVOhnpNHjBYl9wrEum61bi/PTyY3OmSo
 fAGOFuIl6dCX2urWiOp4geZQdrdKhBYi0MJkdGQh7xSRX6dvFjaGot3lJBmXE5X5
 UHe+BduDqL+Zsr4Fw1rgUozIkMXXYkW0wOttJxnG70VgiBQ+zrd1NtZSCYIAhHW6
 FKaGIBhyq1dQx7X3bvxPrY5myZtrtek5hQJlhjSjiWHjycijOU8Wwc17ek/Mj20P
 DMHWkdpjM2rjAu0YE4RKtOFkUaR1pqn5B26j3QONIinvYlGvUf2q/jZdOBGRV0SM
 w1tUOdWj2HBXaIrO2o3GXA==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:cc:content-transfer-encoding
 :content-type:content-type:date:date:feedback-id:feedback-id
 :from:from:in-reply-to:in-reply-to:message-id:mime-version
 :references:reply-to:subject:subject:to:to:x-me-proxy
 :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1745714108; x=
 1745800508; bh=OFvHNsop+JVT4T7zFC0VuiYLhOR+ctNynCSdrRfK5hs=; b=D
 FKoLLVu7ATnRSfKQ6DFHbM3eZopP3W81/8RLfkJLgF19QuP27HFsWs6RMD8hoO7T
 H7+qhhhHRY3E9Q5Uc668woZemXCEaH5aKpLEG0c+0AFLNd8r1ndmqcQ9L10i53UW
 2rtaw/gZ2ON8yC4szhAU6K84vHWnst0UeY2vOxFbmnqRx3Nt7Z78bgH32SIeEEgI
 nIDbyceQ18fp4Ysz5D8I+4wOQYTj6l4xGc3UyN4zeouGgkk6tvDJy7djAmw5Uu0k
 g2H3MWQQFd2cGAvFIpn9THFVBBa+dnZo/IOnLhdz2G0OWjcjfCR4kW4nwZAb7H/u
 nmD1QBYDxLHogH6jD+vbQ==
X-ME-Sender: <xms:u3sNaN9DZ40yF2REmRj4y2e6Dseij2HPKn9GxawlfaRYnxtzDfGkIw>
 <xme:u3sNaBtcfDcCOycyitc8Z2Xk6U4S-edkWtUA9dTs3EYcr5ONLhj17khk8hFc9reKv
 3CtPEQPmAYOkC_jSAY>
X-ME-Received: <xmr:u3sNaLDR96T76hfQKLck_ZP7MPPz0193sJkZYXjA9XcnuAHShLflXgGIvgXHUq1xTEmI>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddvheeiieehucetufdoteggodetrf
 dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggv
 pdfurfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucenucfjughrpefkff
 ggfgfuvfevfhfhjggtgfesthekredttddvjeenucfhrhhomhepffhmihhtrhihucfiuhht
 ohhvuceoughmihhtrhihsehguhhtohhvrdguvghvqeenucggtffrrghtthgvrhhnpeegle
 efteekgffhvdfhtdegveevveetteegteevgeettdehhfdukeetheffueekkeenucevlhhu
 shhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegumhhithhrhiesgh
 huthhovhdruggvvhdpnhgspghrtghpthhtohepfedpmhhouggvpehsmhhtphhouhhtpdhr
 tghpthhtoheptggrshhouhhrihesghhmrghilhdrtghomhdprhgtphhtthhopehhihdqrg
 hnghgvlheshigrnhguvgigrdhruhdprhgtphhtthhopeejjeektdefseguvggssghughhs
 rdhgnhhurdhorhhg
X-ME-Proxy: <xmx:u3sNaBfUCxfOPRLUUwA5bHNlv58ktLDVLqu35pMhnbntif43S7_M8Q>
 <xmx:u3sNaCO8DSSEM0WBZcT0DPGTZdmtaE9oR-w_awlkXFwUUVkXrARXUg>
 <xmx:u3sNaDkpC_wgF7bbZ4YsZq_Og7KcovOcv1w9nO2qvIOc9UJJwPLJtA>
 <xmx:u3sNaMtU8zjSMl5iBQWEJUCdDvtkt3fWhU-Wt6V_6EpqCGFI9g_YIw>
 <xmx:vHsNaIyCX9KTnmirLZMLHmgmpAT4bqJw6e76YHlsaCmsWF3jNxHy_yeC>
Feedback-ID: i07de48aa:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat,
 26 Apr 2025 20:35:06 -0400 (EDT)
Message-ID: <03d057df-8555-4d13-8ee0-3e1ef8532898@HIDDEN>
Date: Sun, 27 Apr 2025 03:35:04 +0300
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: bug#77803: [PATCH v2] Don't indent variable names to their
 declarator expression (bug#77803)
To: Yuan Fu <casouri@HIDDEN>
References: <6913797600552fba6cc2fdfac2d3aa3b9c1b541a.camel@HIDDEN>
 <86plhdhk5k.fsf@HIDDEN>
 <e99cd75dcd8aafe3e820bc9347658ea732752768.camel@HIDDEN>
 <2d790bd630ff1019984c78a690bd461b0629b02a.camel@HIDDEN>
 <865xj5h4fm.fsf@HIDDEN>
 <6f6a0eca815fde659891e3e95ddfe48e1a46eb67.camel@HIDDEN>
 <97e581262b551a19e08200e5c89608e5b8a6d277.camel@HIDDEN>
 <14A0AFC9-9CB5-4231-BC0F-D4CEAE48EC7B@HIDDEN>
 <e88d5c95-ce29-4586-b899-44608e5c67b1@HIDDEN>
 <1ddd76cb471e5eff5f8a72074683265cce49a77c.camel@HIDDEN>
 <4f7121ea-c65c-439c-9b94-598d6eb734a8@HIDDEN>
 <9111de18b3ab2ade73336ee2d9a163115863c04e.camel@HIDDEN>
 <fde69513-4d0c-455a-991a-2af918dbc32b@HIDDEN>
 <014A7983-CC07-4B1A-810D-9E3346FDFBEA@HIDDEN>
 <6de23a99-f03e-423e-af60-16a4df938906@HIDDEN>
 <FA8369AD-E460-4C45-A433-95E15E17CB82@HIDDEN>
Content-Language: en-US
From: Dmitry Gutov <dmitry@HIDDEN>
In-Reply-To: <FA8369AD-E460-4C45-A433-95E15E17CB82@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 77803
Cc: 77803 <at> debbugs.gnu.org, Konstantin Kharlamov <Hi-Angel@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

On 26/04/2025 03:44, Yuan Fu wrote:
> js-mode doesn’t align multivar declarations

It does.

Perhaps you meant js-ts-mode.

> So I only added an option to typescript-ts-mode that allows user to choose from the two indent style.

Thank you.

 > The non-indent style seems to be the mainstream style (for better or 
worse), so I left the non-indent style as the default

Oh well.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#77803; Package emacs. Full text available.

Message received at 77803 <at> debbugs.gnu.org:


Received: (at 77803) by debbugs.gnu.org; 26 Apr 2025 00:45:17 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Apr 25 20:45:17 2025
Received: from localhost ([127.0.0.1]:55338 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1u8TfQ-0000Pv-PC
	for submit <at> debbugs.gnu.org; Fri, 25 Apr 2025 20:45:17 -0400
Received: from mail-pf1-x433.google.com ([2607:f8b0:4864:20::433]:49376)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <casouri@HIDDEN>) id 1u8TfN-0000Lr-GU
 for 77803 <at> debbugs.gnu.org; Fri, 25 Apr 2025 20:45:14 -0400
Received: by mail-pf1-x433.google.com with SMTP id
 d2e1a72fcca58-7376dd56f8fso3928946b3a.2
 for <77803 <at> debbugs.gnu.org>; Fri, 25 Apr 2025 17:45:13 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1745628307; x=1746233107; darn=debbugs.gnu.org;
 h=to:references:message-id:content-transfer-encoding:cc:date
 :in-reply-to:from:subject:mime-version:from:to:cc:subject:date
 :message-id:reply-to;
 bh=Kl6t8dnCkE1NQFA1xBLwcQWW9jRT/CYfOe0GNuA+sI4=;
 b=kNlfm+bT1im53pLf0A8tWUzngLz9b4VHhCUia6SwBwBF4ZgOWFyRgbtI009fNyPw+j
 KDTZgy8Yvq1mmhkn7QRxgUNVr0ypzkOY/C9MwJI+z74tmffktF3BsIIvUq7RyhrRgDGD
 Z7SRQDRq5x7Yw8sR/5xz3kIieCZVAtz12ciLTzdiiXl7sISx36DzGVy6alBzxtgOS6jI
 7txoyfB7Eb7Bj1ECZBdA90o8D0dlVlAuCBjbtKwbBSscW2sjzJjhPwp8NWf7fByhy8K/
 F6IukoCAwPiCuZutNYI1L/EErPiY5Me9a3wfxlh3CD71TGXLFUDZPksFm03qKGRS7jQI
 EdYQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1745628307; x=1746233107;
 h=to:references:message-id:content-transfer-encoding:cc:date
 :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc
 :subject:date:message-id:reply-to;
 bh=Kl6t8dnCkE1NQFA1xBLwcQWW9jRT/CYfOe0GNuA+sI4=;
 b=LPLUtsO916EwzIEdQR7aPCM0nKMQlyw1U3kBvrj168lrU0TwwcFEXDvtGwfZfZ3l+i
 d3U1Hk+QhJHhH00PoBg9408dRkAfvU2BzKumBl7hCTmhAELD7FbYP5CA/aOrjtXlpOdW
 9N+9YXDPY7WrrqA7nTG6x0Zpf5r+rF2nq9nDGTYFo0mr3CAv7RGu3VALGKakmBHuDtc+
 3PKNNA6NV1cM1rkYcIdvq1E3gb9fpr8KaNq00KGJ08kpkxqKHNeIr8JRxiCXBrli/co5
 j9V9nojcBFYS4qjsvCHm8k5ZYkv53axPWuc5YCVTEDH8EaGkJx9oUEnZr0+DxaV6XsDg
 QZqQ==
X-Forwarded-Encrypted: i=1;
 AJvYcCV/uJ2afbhCMU3F0+G3sve6OCg4Kb9eE6w9FqhU41aoN84+ugoSY12SnfqXdIjwZVl32/pHFA==@debbugs.gnu.org
X-Gm-Message-State: AOJu0Yw6EuS4A4fRKwUpCT2AgTqk+d8RVzaN0j0m7Hi0otU+YODtdYox
 C0elPenWc3RJok7xGQH+CmHrvfFa9mukcT2XrZ/inBMFZYsAYVpN
X-Gm-Gg: ASbGncuAQ0jYdV/wBvAb5qYuOFiaSXZr0gmE1UoBFAuwNp5Vm87qU+n8sc/qtbZqVPx
 ElCIDUamSXDnmC3FDnw3znDR0p5JSlTgEfrHjyrY4qB44v9r6kT9SRhDnWy0kBKhOA1spX6HSWO
 Y7NokvDN09Mfu1GAdi662YH1Anf/iB2wgywGS0oP30DldFgzKUFwefGrAM6jL+rKSnhuS3K+Oby
 saiuTfqtxvjgcumIREmYYVgosKOGHebF66twtPx83DB1K6h4uH5h1P1UESd9oOwwTAmlpNYdG9b
 H/luZUwtMJqcxTGvxBiKH7CGD30Pwy4xGP08qRi80sVKfBcCZ8NF1pRDYKOxGfXHq2izyFjC380
 =
X-Google-Smtp-Source: AGHT+IFn68EUAYqLXXCZZX9hSgZ4UdxfBWJ9Vy+V/OAa0SrlaG45mijoCIpmx77k7m8qaS+ZB1/nkw==
X-Received: by 2002:a05:6a00:a8b:b0:73d:b1ff:c758 with SMTP id
 d2e1a72fcca58-73fd89776a2mr5549772b3a.18.1745628307127; 
 Fri, 25 Apr 2025 17:45:07 -0700 (PDT)
Received: from smtpclient.apple ([2601:646:8f81:6120:854c:5b48:ee72:dbde])
 by smtp.gmail.com with ESMTPSA id
 d2e1a72fcca58-73e25912ae0sm3819256b3a.1.2025.04.25.17.45.06
 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128);
 Fri, 25 Apr 2025 17:45:06 -0700 (PDT)
Content-Type: text/plain;
	charset=utf-8
Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3826.400.131.1.6\))
Subject: Re: bug#77803: [PATCH v2] Don't indent variable names to their
 declarator expression (bug#77803)
From: Yuan Fu <casouri@HIDDEN>
In-Reply-To: <6de23a99-f03e-423e-af60-16a4df938906@HIDDEN>
Date: Fri, 25 Apr 2025 17:44:55 -0700
Content-Transfer-Encoding: quoted-printable
Message-Id: <FA8369AD-E460-4C45-A433-95E15E17CB82@HIDDEN>
References: <6913797600552fba6cc2fdfac2d3aa3b9c1b541a.camel@HIDDEN>
 <86plhdhk5k.fsf@HIDDEN>
 <e99cd75dcd8aafe3e820bc9347658ea732752768.camel@HIDDEN>
 <2d790bd630ff1019984c78a690bd461b0629b02a.camel@HIDDEN>
 <865xj5h4fm.fsf@HIDDEN>
 <6f6a0eca815fde659891e3e95ddfe48e1a46eb67.camel@HIDDEN>
 <97e581262b551a19e08200e5c89608e5b8a6d277.camel@HIDDEN>
 <14A0AFC9-9CB5-4231-BC0F-D4CEAE48EC7B@HIDDEN>
 <e88d5c95-ce29-4586-b899-44608e5c67b1@HIDDEN>
 <1ddd76cb471e5eff5f8a72074683265cce49a77c.camel@HIDDEN>
 <4f7121ea-c65c-439c-9b94-598d6eb734a8@HIDDEN>
 <9111de18b3ab2ade73336ee2d9a163115863c04e.camel@HIDDEN>
 <fde69513-4d0c-455a-991a-2af918dbc32b@HIDDEN>
 <014A7983-CC07-4B1A-810D-9E3346FDFBEA@HIDDEN>
 <6de23a99-f03e-423e-af60-16a4df938906@HIDDEN>
To: Dmitry Gutov <dmitry@HIDDEN>
X-Mailer: Apple Mail (2.3826.400.131.1.6)
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 77803
Cc: 77803 <at> debbugs.gnu.org, Konstantin Kharlamov <Hi-Angel@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)



> On Apr 21, 2025, at 3:43=E2=80=AFPM, Dmitry Gutov <dmitry@HIDDEN> =
wrote:
>=20
> On 20/04/2025 07:36, Yuan Fu wrote:
>> I can add a custom option that toggle this. We don=E2=80=99t need =
indentation styles for js, C/C++ is probably the only language that has =
that many established indentation styles. What would be a good name for =
the option? This custom option will be used for both js-ts-mode and =
jsx-ts-mode. js-ts-indent-align-multi-assignment-p?
>=20
> Back when js2-mode used its own indentation code, we called it =
js2-pretty-multiline-declarations, and it wasn't just a boolean (one =
possible symbol value too):
>=20
> =
https://github.com/mooz/js2-mode/blob/master/js2-old-indent.el#L75C12-L115=

>=20
> I don't have a strong opinion on the name, but just in case we'll want =
to support a third way maybe don't call it with '-p' at the end.
>=20
> Also, it might be good to have the variable affect js-mode as well =
(and so it wouldn't need -ts- in the name) - it's just an extra check =
around the (js--multi-line-declaration-indentation) call inside =
js--proper-indentation.
>=20
> Are there other js-mode indentation vars that affect js-ts-mode?

Ok, so the original path in this repot only changes =
typescript/tsx-ts-mode, and js-mode doesn=E2=80=99t align multivar =
declarations. So I only added an option to typescript-ts-mode that =
allows user to choose from the two indent style. The non-indent style =
seems to be the mainstream style (for better or worse), so I left the =
non-indent style as the default.

The original path is applied to emacs-30 and the new custom option is =
added to master.

Yuan=




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#77803; Package emacs. Full text available.

Message received at 77803 <at> debbugs.gnu.org:


Received: (at 77803) by debbugs.gnu.org; 21 Apr 2025 22:43:44 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Apr 21 18:43:44 2025
Received: from localhost ([127.0.0.1]:40662 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1u6zrc-0005PX-BE
	for submit <at> debbugs.gnu.org; Mon, 21 Apr 2025 18:43:44 -0400
Received: from fhigh-a7-smtp.messagingengine.com ([103.168.172.158]:49849)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <dmitry@HIDDEN>) id 1u6zrZ-0005P5-6B
 for 77803 <at> debbugs.gnu.org; Mon, 21 Apr 2025 18:43:42 -0400
Received: from phl-compute-01.internal (phl-compute-01.phl.internal
 [10.202.2.41])
 by mailfhigh.phl.internal (Postfix) with ESMTP id 3609911400F3;
 Mon, 21 Apr 2025 18:43:35 -0400 (EDT)
Received: from phl-mailfrontend-02 ([10.202.2.163])
 by phl-compute-01.internal (MEProxy); Mon, 21 Apr 2025 18:43:35 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc
 :cc:content-transfer-encoding:content-type:content-type:date
 :date:from:from:in-reply-to:in-reply-to:message-id:mime-version
 :references:reply-to:subject:subject:to:to; s=fm1; t=1745275415;
 x=1745361815; bh=9qPR7mzBXWZmBU5+tvHHwdMlLTa0CSXM26go9//NWY8=; b=
 hBvHv2EVx4bkqR8SOMjBmLwVFqIlgp+aL0O61K1Me8xdN5Xso/10pJEDEFmmIV5I
 j8d7c4hh3kRcS3lMffyu7ygwCxhqf+yAtg6Jhg3bBORj2ed7eb9ducJpjTbmDDP5
 P9eAKjgjm88fr12nffG4vOYVdUa5X13iqBLavVH7kTU6qbs3pGV7Zcpuj7Rx6zHr
 s/tW6Wv2OxBjgaAZ7N4KB6wB1MtFbmtGO5kJ58hk4Bh+hnaQbAqASZjhxTpNkRZu
 m9k0FElscwdbsQoiSjQIB0aoWIdfWMOkmrmW9IGEWSMCpxPKmtl3QTVusl1m1IWQ
 SOwFQbu80ftKdgUgOxXXAA==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:cc:content-transfer-encoding
 :content-type:content-type:date:date:feedback-id:feedback-id
 :from:from:in-reply-to:in-reply-to:message-id:mime-version
 :references:reply-to:subject:subject:to:to:x-me-proxy
 :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1745275415; x=
 1745361815; bh=9qPR7mzBXWZmBU5+tvHHwdMlLTa0CSXM26go9//NWY8=; b=Z
 XinK/mkH8+WP48QqkvjushH4JOOGhhWZHzDkeJ1g4x6ePWbT2Fpe82IK0KWsPFUo
 tbrkdMX2i9QyRs2jcULWpRV56fe3P3GUbLmsBn+eIJwU7v8wcXA4AaBNEqR0oZIR
 22U5hNKQRQ3LHVLc7G5cSWtzaGNNBfUluSq9P/wT/q76Hp5x2W40Rnk9KI+453JQ
 ws68RgGSlZi2LMNdmM2DEyUq23iwJsA2K8n6w5JxMB269D3pcL+mYyTs1ari7Rj3
 VbHDxPxvzoEDzte4xIc6jj4fro7Ob3r/ZQsKxlRbbQiqsWPDnwiK0M6WmlgkXL6k
 l+lkhoZrBukh9urkvmp+Q==
X-ME-Sender: <xms:FsoGaD9I5gjJl8cgTXZjtY60o3PhZrYJkuuC6_26uyzhBU5-D61NIw>
 <xme:FsoGaPt4_zKyOld6HFBm5SG3OTsHYcqDQzMBKzllsL_5svthqASP0TQ6DuPHi8x0s
 AKNnvvQwXSpqAXYZgA>
X-ME-Received: <xmr:FsoGaBBdPGa5A5_kwEIYeS4S8AOzxFZ-AbRr5IVWvUUCMpLNA78oauD2GgNPh6Ah3RM>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddvgedvtdelucetufdoteggodetrf
 dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggv
 pdfurfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucenucfjughrpefkff
 ggfgfuvfevfhfhjggtgfesthekredttddvjeenucfhrhhomhepffhmihhtrhihucfiuhht
 ohhvuceoughmihhtrhihsehguhhtohhvrdguvghvqeenucggtffrrghtthgvrhhnpeefvd
 ejveeiffefueekleevieekgedttdevieelvefgvdfghfdtgfegfeefgeeigfenucffohhm
 rghinhepghhithhhuhgsrdgtohhmnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrg
 hmpehmrghilhhfrhhomhepughmihhtrhihsehguhhtohhvrdguvghvpdhnsggprhgtphht
 thhopeefpdhmohguvgepshhmthhpohhuthdprhgtphhtthhopegtrghsohhurhhisehgmh
 grihhlrdgtohhmpdhrtghpthhtohephhhiqdgrnhhgvghlseihrghnuggvgidrrhhupdhr
 tghpthhtohepjeejkedtfeesuggvsggsuhhgshdrghhnuhdrohhrgh
X-ME-Proxy: <xmx:FsoGaPdr87LHRQI42ptoSfafR7NUxdT3892fmoQTTbO9g4fIu_7Buw>
 <xmx:FsoGaIOmnNrHChnXcbbVa19ne6sRqtuZfsV5QR2rc0nUPqzElWl8eg>
 <xmx:FsoGaBk0921JcjQ2BVHyIra8wIwie06c3-7liq6ttIcHMeOlyLI6-A>
 <xmx:FsoGaCs2uRIxDZRDbDFWI-hVYYMlJy0lyVFWMlzvHOE4sqLI9ERZxg>
 <xmx:F8oGaGw7yU23Nfp-Ij9mS7tyYpDiyy8B-khOYV5_JAsniFgJ4FAVMKAU>
Feedback-ID: i07de48aa:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon,
 21 Apr 2025 18:43:33 -0400 (EDT)
Message-ID: <6de23a99-f03e-423e-af60-16a4df938906@HIDDEN>
Date: Tue, 22 Apr 2025 01:43:30 +0300
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: bug#77803: [PATCH v2] Don't indent variable names to their
 declarator expression (bug#77803)
To: Yuan Fu <casouri@HIDDEN>
References: <6913797600552fba6cc2fdfac2d3aa3b9c1b541a.camel@HIDDEN>
 <86plhdhk5k.fsf@HIDDEN>
 <e99cd75dcd8aafe3e820bc9347658ea732752768.camel@HIDDEN>
 <2d790bd630ff1019984c78a690bd461b0629b02a.camel@HIDDEN>
 <865xj5h4fm.fsf@HIDDEN>
 <6f6a0eca815fde659891e3e95ddfe48e1a46eb67.camel@HIDDEN>
 <97e581262b551a19e08200e5c89608e5b8a6d277.camel@HIDDEN>
 <14A0AFC9-9CB5-4231-BC0F-D4CEAE48EC7B@HIDDEN>
 <e88d5c95-ce29-4586-b899-44608e5c67b1@HIDDEN>
 <1ddd76cb471e5eff5f8a72074683265cce49a77c.camel@HIDDEN>
 <4f7121ea-c65c-439c-9b94-598d6eb734a8@HIDDEN>
 <9111de18b3ab2ade73336ee2d9a163115863c04e.camel@HIDDEN>
 <fde69513-4d0c-455a-991a-2af918dbc32b@HIDDEN>
 <014A7983-CC07-4B1A-810D-9E3346FDFBEA@HIDDEN>
Content-Language: en-US
From: Dmitry Gutov <dmitry@HIDDEN>
In-Reply-To: <014A7983-CC07-4B1A-810D-9E3346FDFBEA@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 77803
Cc: 77803 <at> debbugs.gnu.org, Konstantin Kharlamov <Hi-Angel@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

On 20/04/2025 07:36, Yuan Fu wrote:
> I can add a custom option that toggle this. We don’t need indentation styles for js, C/C++ is probably the only language that has that many established indentation styles. What would be a good name for the option? This custom option will be used for both js-ts-mode and jsx-ts-mode. js-ts-indent-align-multi-assignment-p?

Back when js2-mode used its own indentation code, we called it 
js2-pretty-multiline-declarations, and it wasn't just a boolean (one 
possible symbol value too):

https://github.com/mooz/js2-mode/blob/master/js2-old-indent.el#L75C12-L115

I don't have a strong opinion on the name, but just in case we'll want 
to support a third way maybe don't call it with '-p' at the end.

Also, it might be good to have the variable affect js-mode as well (and 
so it wouldn't need -ts- in the name) - it's just an extra check around 
the (js--multi-line-declaration-indentation) call inside 
js--proper-indentation.

Are there other js-mode indentation vars that affect js-ts-mode?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#77803; Package emacs. Full text available.

Message received at 77803 <at> debbugs.gnu.org:


Received: (at 77803) by debbugs.gnu.org; 20 Apr 2025 05:34:05 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Apr 20 01:34:04 2025
Received: from localhost ([127.0.0.1]:43275 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1u6NJb-0005Jg-WA
	for submit <at> debbugs.gnu.org; Sun, 20 Apr 2025 01:34:04 -0400
Received: from forward500b.mail.yandex.net ([178.154.239.144]:60320)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <hi-angel@HIDDEN>)
 id 1u6NJ0-0005Eg-Gv
 for 77803 <at> debbugs.gnu.org; Sun, 20 Apr 2025 01:33:30 -0400
Received: from mail-nwsmtp-smtp-production-main-91.sas.yp-c.yandex.net
 (mail-nwsmtp-smtp-production-main-91.sas.yp-c.yandex.net
 [IPv6:2a02:6b8:c1e:3990:0:640:808c:0])
 by forward500b.mail.yandex.net (Yandex) with ESMTPS id 9A04760E58;
 Sun, 20 Apr 2025 08:27:15 +0300 (MSK)
Received: by mail-nwsmtp-smtp-production-main-91.sas.yp-c.yandex.net
 (smtp/Yandex) with ESMTPSA id EREAPUTLcKo0-P1u8XZRi; 
 Sun, 20 Apr 2025 08:27:15 +0300
X-Yandex-Fwd: 1
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail;
 t=1745126835; bh=96el8dFhh3cbE/kTSdWVtc943eNgFU0RGXc9DHCAejE=;
 h=In-Reply-To:Date:References:To:From:Subject:Message-ID;
 b=M2uHNFvQLWNvMJ0zmLSenbUKsSTVvQo8y+JiGDfNgctYmYIgQP/Ui66B/tUOxmV8U
 zfHmrz3pdG0rVvNIjfiwAJW8xBxG+Yp9fTb0FOQkAlZc32Iwph6G8jNjhypWBUzYoa
 MpdFjjFmp0cpp/p4JeJQDN4yLJnWgR5XrXf6Qpjk=
Authentication-Results: mail-nwsmtp-smtp-production-main-91.sas.yp-c.yandex.net;
 dkim=pass header.i=@yandex.ru
Message-ID: <9660dc8fb2881aeaf36b53865b81630d37628179.camel@HIDDEN>
Subject: Re: bug#77803: [PATCH v2] Don't indent variable names to their
 declarator expression (bug#77803)
From: Konstantin Kharlamov <Hi-Angel@HIDDEN>
To: Dmitry Gutov <dmitry@HIDDEN>, 77803 <at> debbugs.gnu.org, casouri@HIDDEN
Date: Sun, 20 Apr 2025 08:27:13 +0300
In-Reply-To: <167d0c86da3c33f511a1f2ed47f8078d3d996f75.camel@HIDDEN>
References: <6913797600552fba6cc2fdfac2d3aa3b9c1b541a.camel@HIDDEN>
 <86plhdhk5k.fsf@HIDDEN>
 <e99cd75dcd8aafe3e820bc9347658ea732752768.camel@HIDDEN>
 <2d790bd630ff1019984c78a690bd461b0629b02a.camel@HIDDEN>
 <865xj5h4fm.fsf@HIDDEN>
 <6f6a0eca815fde659891e3e95ddfe48e1a46eb67.camel@HIDDEN>
 <97e581262b551a19e08200e5c89608e5b8a6d277.camel@HIDDEN>
 <14A0AFC9-9CB5-4231-BC0F-D4CEAE48EC7B@HIDDEN>
 <e88d5c95-ce29-4586-b899-44608e5c67b1@HIDDEN>
 <1ddd76cb471e5eff5f8a72074683265cce49a77c.camel@HIDDEN>
 <4f7121ea-c65c-439c-9b94-598d6eb734a8@HIDDEN>
 <9111de18b3ab2ade73336ee2d9a163115863c04e.camel@HIDDEN>
 <fde69513-4d0c-455a-991a-2af918dbc32b@HIDDEN>
 <167d0c86da3c33f511a1f2ed47f8078d3d996f75.camel@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
User-Agent: Evolution 3.56.0 
MIME-Version: 1.0
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 77803
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On Sun, 2025-04-20 at 08:23 +0300, Konstantin Kharlamov wrote:
> On Sun, 2025-04-20 at 03:38 +0300, Dmitry Gutov wrote:
> > On 20/04/2025 01:58, Konstantin Kharlamov wrote:
> >=20
> > > > https://github.com/mooz/js2-mode/issues/1=C2=A0is when it was added=
,
> > > > then
> > > > see
> > > > other reports in the tracker about refining it and adding
> > > > support
> > > > for
> > > > different cases.
> > >=20
> > > Oooh=E2=80=A6 it seems to be a misunderstanding. The user wasn't aski=
ng
> > > to
> > > indent every declaration to the declarator (as it was in ts-tsx-
> > > mode
> > > and as it seems now in jsx-mode). The user pointed out the
> > > indentation
> > > wasn't working at all, and showed "expected indentation", where
> > > there
> > > are 4 spaces used; however it is an accident that 4 spaces are
> > > equal to
> > > "var" + space.
> >=20
> > There were no protests from the user, and as I said, you can search
> > the=20
> > tracker for other requests for refining this indentation method.
> >=20
> > Or see https://debbugs.gnu.org/8576, for when this feature was
> > added
> > to=20
> > js-mode.
>=20
> I suspect there weren't protests because the declaration style may
> not
> be frequently used among web devs. Add to that that most people never
> bother reporting bugs for the problem they encounter; and then
> additionally that web-devs specifically from my personal experience
> frequently don't know/understand much beyond just web-devel
> (particularly, the understanding that open-source project problem is
> something you can report or maybe even fix =E2=80=94 that frequently lack=
s
> even
> among usual devs, but in web-devel field it's like multiplied) =E2=80=94 =
I
> think there's high chance the reason wrong "const" indentation wasn't
> reported, is just because no one bothered.

Sorry, forgot to add: I pinged both participants on the linked issue,
let's see what they say. I suspect though the OP may not reply, he had
no Github activity since 2023, and it was always scarce.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#77803; Package emacs. Full text available.

Message received at 77803 <at> debbugs.gnu.org:


Received: (at 77803) by debbugs.gnu.org; 20 Apr 2025 05:24:00 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Apr 20 01:24:00 2025
Received: from localhost ([127.0.0.1]:43167 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1u6N9r-0004IB-Sc
	for submit <at> debbugs.gnu.org; Sun, 20 Apr 2025 01:24:00 -0400
Received: from forward501a.mail.yandex.net
 ([2a02:6b8:c0e:500:1:45:d181:d501]:57982)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <hi-angel@HIDDEN>)
 id 1u6N9m-0004GF-96
 for 77803 <at> debbugs.gnu.org; Sun, 20 Apr 2025 01:23:56 -0400
Received: from mail-nwsmtp-smtp-production-main-52.vla.yp-c.yandex.net
 (mail-nwsmtp-smtp-production-main-52.vla.yp-c.yandex.net
 [IPv6:2a02:6b8:c0f:4c83:0:640:aa07:0])
 by forward501a.mail.yandex.net (Yandex) with ESMTPS id 3EA216125C;
 Sun, 20 Apr 2025 08:23:45 +0300 (MSK)
Received: by mail-nwsmtp-smtp-production-main-52.vla.yp-c.yandex.net
 (smtp/Yandex) with ESMTPSA id hNECuiRLjOs0-g0Uf5f8z; 
 Sun, 20 Apr 2025 08:23:44 +0300
X-Yandex-Fwd: 1
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail;
 t=1745126624; bh=7riWSwCEkxT59JmD/ub8ni5asg8ddkmaAUP9DVXjHNM=;
 h=In-Reply-To:Date:References:To:From:Subject:Message-ID;
 b=ApousIbW8mv+B8bnymE2rY2zvjz3cLNgy4rUVIjyvSOVJbcm5vDIfZ9jGKDPDm/41
 bdcsnG/0X0+j/LhRolXfIsLoXsRLMxvIUZysyrljOKJ8lvo0iGJDXHWtgR0v7u8kIP
 A0cOy99PdsOZT5ibs+SFw0+oXCQHn+CaKGQ2MhRs=
Authentication-Results: mail-nwsmtp-smtp-production-main-52.vla.yp-c.yandex.net;
 dkim=pass header.i=@yandex.ru
Message-ID: <167d0c86da3c33f511a1f2ed47f8078d3d996f75.camel@HIDDEN>
Subject: Re: bug#77803: [PATCH v2] Don't indent variable names to their
 declarator expression (bug#77803)
From: Konstantin Kharlamov <Hi-Angel@HIDDEN>
To: Dmitry Gutov <dmitry@HIDDEN>, 77803 <at> debbugs.gnu.org, casouri@HIDDEN
Date: Sun, 20 Apr 2025 08:23:43 +0300
In-Reply-To: <fde69513-4d0c-455a-991a-2af918dbc32b@HIDDEN>
References: <6913797600552fba6cc2fdfac2d3aa3b9c1b541a.camel@HIDDEN>
 <86plhdhk5k.fsf@HIDDEN>
 <e99cd75dcd8aafe3e820bc9347658ea732752768.camel@HIDDEN>
 <2d790bd630ff1019984c78a690bd461b0629b02a.camel@HIDDEN>
 <865xj5h4fm.fsf@HIDDEN>
 <6f6a0eca815fde659891e3e95ddfe48e1a46eb67.camel@HIDDEN>
 <97e581262b551a19e08200e5c89608e5b8a6d277.camel@HIDDEN>
 <14A0AFC9-9CB5-4231-BC0F-D4CEAE48EC7B@HIDDEN>
 <e88d5c95-ce29-4586-b899-44608e5c67b1@HIDDEN>
 <1ddd76cb471e5eff5f8a72074683265cce49a77c.camel@HIDDEN>
 <4f7121ea-c65c-439c-9b94-598d6eb734a8@HIDDEN>
 <9111de18b3ab2ade73336ee2d9a163115863c04e.camel@HIDDEN>
 <fde69513-4d0c-455a-991a-2af918dbc32b@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
User-Agent: Evolution 3.56.0 
MIME-Version: 1.0
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 77803
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

On Sun, 2025-04-20 at 03:38 +0300, Dmitry Gutov wrote:
> On 20/04/2025 01:58, Konstantin Kharlamov wrote:
>=20
> > > https://github.com/mooz/js2-mode/issues/1=C2=A0is when it was added,
> > > then
> > > see
> > > other reports in the tracker about refining it and adding support
> > > for
> > > different cases.
> >=20
> > Oooh=E2=80=A6 it seems to be a misunderstanding. The user wasn't asking=
 to
> > indent every declaration to the declarator (as it was in ts-tsx-
> > mode
> > and as it seems now in jsx-mode). The user pointed out the
> > indentation
> > wasn't working at all, and showed "expected indentation", where
> > there
> > are 4 spaces used; however it is an accident that 4 spaces are
> > equal to
> > "var" + space.
>=20
> There were no protests from the user, and as I said, you can search
> the=20
> tracker for other requests for refining this indentation method.
>=20
> Or see https://debbugs.gnu.org/8576, for when this feature was added
> to=20
> js-mode.

I suspect there weren't protests because the declaration style may not
be frequently used among web devs. Add to that that most people never
bother reporting bugs for the problem they encounter; and then
additionally that web-devs specifically from my personal experience
frequently don't know/understand much beyond just web-devel
(particularly, the understanding that open-source project problem is
something you can report or maybe even fix =E2=80=94 that frequently lacks =
even
among usual devs, but in web-devel field it's like multiplied) =E2=80=94 I
think there's high chance the reason wrong "const" indentation wasn't
reported, is just because no one bothered.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#77803; Package emacs. Full text available.

Message received at 77803 <at> debbugs.gnu.org:


Received: (at 77803) by debbugs.gnu.org; 20 Apr 2025 04:37:05 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Apr 20 00:37:05 2025
Received: from localhost ([127.0.0.1]:42726 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1u6MQT-0000D3-5C
	for submit <at> debbugs.gnu.org; Sun, 20 Apr 2025 00:37:05 -0400
Received: from mail-pl1-x630.google.com ([2607:f8b0:4864:20::630]:51537)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <casouri@HIDDEN>) id 1u6MQP-0000CT-86
 for 77803 <at> debbugs.gnu.org; Sun, 20 Apr 2025 00:37:02 -0400
Received: by mail-pl1-x630.google.com with SMTP id
 d9443c01a7336-2260c91576aso26648945ad.3
 for <77803 <at> debbugs.gnu.org>; Sat, 19 Apr 2025 21:37:01 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1745123815; x=1745728615; darn=debbugs.gnu.org;
 h=to:references:message-id:content-transfer-encoding:cc:date
 :in-reply-to:from:subject:mime-version:from:to:cc:subject:date
 :message-id:reply-to;
 bh=/vTPI31sNQLSzCcZpclOGfFgmcHSqLlfhFCp90UvsoI=;
 b=C//3Gto97Z7OqE3zzKs78/ZahKRscMgYcrNFz5DAxK++a/6Ie7m+8uBFGEQEe4MALt
 sz1GlUSbcTskJe4wwm+xLJ+HCzEfivhLTKF4DOl0wi+fv1eHr+kQBSxZnFg96v+BqCcj
 3EbSiPM/i4dGcCRh0eC2PYsg6uXTrZ+rayLFFiks2WuQRW1QMYQJmyRfJ3TNv41U1oLy
 /xpIRp+l6+2vIL8qvtmS2mv0120wP23PzLlyi0RsIj2fN0qpOyCxX89NCjMaSJGEAgyq
 JcQnvCvZsK/aHOk0RVbk926Onvycvd/IOcrkUgoo5NkKv3dtFdrW9j7+oeTBh4mn5lyy
 5CAA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1745123815; x=1745728615;
 h=to:references:message-id:content-transfer-encoding:cc:date
 :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc
 :subject:date:message-id:reply-to;
 bh=/vTPI31sNQLSzCcZpclOGfFgmcHSqLlfhFCp90UvsoI=;
 b=SLACaNUDwZGXQ1Cr1Cp8B1KTY7kSFGdqCeZ8bHaK2IK3OF7Sa2hN0GchPODSLtWzC3
 OHMuHC6F3cNzcQUewNmv22nUUHSfYKOgwE/pokUGs4ZQK5DisKlBCxq9E5SOq83mie6k
 BdthRf4JAt+51Kco0pQvGx/leHeGpz/+CNkKEw5MEFW7Ax/ODwBhhKEIh1f34mH7rHpB
 kv2C6SRD4jEj0gA/YwLPKkHIS1vsnpbbJFUkfdiFcNz2XhMKOJa/lBgEvB2B6r7QOiD2
 mcFCxsv+Rd8IipK9aRBd0vQlRPTwhXoISWoyFM4b57sUL7o8ULDyqpTFiYXo1qpIV4go
 OoVQ==
X-Forwarded-Encrypted: i=1;
 AJvYcCUw8FYzLRQyuOqXZf1m3NC9Wnba2bvMWc7m/nyoI8iyY0u6O3bNlfK7TY4kzojWINkm8on8Vg==@debbugs.gnu.org
X-Gm-Message-State: AOJu0YwQTY7sK7EB24gU/sUQ6wbRVxh6bTp5KAEIc6E/jUGRQKS6Qlnr
 iX0YnUkh03/tWYdTIMBpymWfv9ZLW2Q75X5CXg+bQR21ofMUk2yb
X-Gm-Gg: ASbGncvsFJrr5g8pQfQExCL8wUeHDWrAQUfE7Dbhh9rsvpnht9uORsSxmt4N1ro9nr7
 anT8OhuL9zZex6YZtoDBgvW9BPX9xtR0CUlRKRICMqYxg/nqheugdYQB2S9SJgtROnqA5wz+AKI
 PgfLSaN9470i9Hu8u+dYskCMro/M6vDjy0JbiEzjsJLuGcbXvlb4p2RJ8ssN0nYXAxc4F69dqvB
 5VqCnvpE9SLV5VPd5iL0sftpgY5g3eqOTPVsI02itBVkm7T2FbDJUY2m83zV9m7EllSimZrrexG
 pHUwJ2zbnDFAyuxu2aQmEsJX+Yiu0WxfXhMJII/Jo0Ev4ojWLubjqZZfVQ35CScP
X-Google-Smtp-Source: AGHT+IEUi/qjEZ9q6VCKLp/l1wctQThSAv+i76gcogdb3if97WM1XHPefvShol3uee6xt/7t3RrtOg==
X-Received: by 2002:a17:902:f682:b0:224:912:153 with SMTP id
 d9443c01a7336-22c53573d25mr124308845ad.5.1745123815039; 
 Sat, 19 Apr 2025 21:36:55 -0700 (PDT)
Received: from smtpclient.apple ([2601:646:8f81:6120:9db2:4caa:f4da:502f])
 by smtp.gmail.com with ESMTPSA id
 d9443c01a7336-22c50aa59a7sm41764335ad.0.2025.04.19.21.36.54
 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128);
 Sat, 19 Apr 2025 21:36:54 -0700 (PDT)
Content-Type: text/plain;
	charset=utf-8
Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3826.400.131.1.6\))
Subject: Re: bug#77803: [PATCH v2] Don't indent variable names to their
 declarator expression (bug#77803)
From: Yuan Fu <casouri@HIDDEN>
In-Reply-To: <fde69513-4d0c-455a-991a-2af918dbc32b@HIDDEN>
Date: Sat, 19 Apr 2025 21:36:43 -0700
Content-Transfer-Encoding: quoted-printable
Message-Id: <014A7983-CC07-4B1A-810D-9E3346FDFBEA@HIDDEN>
References: <6913797600552fba6cc2fdfac2d3aa3b9c1b541a.camel@HIDDEN>
 <86plhdhk5k.fsf@HIDDEN>
 <e99cd75dcd8aafe3e820bc9347658ea732752768.camel@HIDDEN>
 <2d790bd630ff1019984c78a690bd461b0629b02a.camel@HIDDEN>
 <865xj5h4fm.fsf@HIDDEN>
 <6f6a0eca815fde659891e3e95ddfe48e1a46eb67.camel@HIDDEN>
 <97e581262b551a19e08200e5c89608e5b8a6d277.camel@HIDDEN>
 <14A0AFC9-9CB5-4231-BC0F-D4CEAE48EC7B@HIDDEN>
 <e88d5c95-ce29-4586-b899-44608e5c67b1@HIDDEN>
 <1ddd76cb471e5eff5f8a72074683265cce49a77c.camel@HIDDEN>
 <4f7121ea-c65c-439c-9b94-598d6eb734a8@HIDDEN>
 <9111de18b3ab2ade73336ee2d9a163115863c04e.camel@HIDDEN>
 <fde69513-4d0c-455a-991a-2af918dbc32b@HIDDEN>
To: Dmitry Gutov <dmitry@HIDDEN>
X-Mailer: Apple Mail (2.3826.400.131.1.6)
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 77803
Cc: 77803 <at> debbugs.gnu.org, Konstantin Kharlamov <Hi-Angel@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)



> On Apr 19, 2025, at 5:38=E2=80=AFPM, Dmitry Gutov <dmitry@HIDDEN> =
wrote:
>=20
> On 20/04/2025 01:58, Konstantin Kharlamov wrote:
>=20
>>> https://github.com/mooz/js2-mode/issues/1 is when it was added, then
>>> see
>>> other reports in the tracker about refining it and adding support =
for
>>> different cases.
>> Oooh=E2=80=A6 it seems to be a misunderstanding. The user wasn't =
asking to
>> indent every declaration to the declarator (as it was in ts-tsx-mode
>> and as it seems now in jsx-mode). The user pointed out the =
indentation
>> wasn't working at all, and showed "expected indentation", where there
>> are 4 spaces used; however it is an accident that 4 spaces are equal =
to
>> "var" + space.
>=20
> There were no protests from the user, and as I said, you can search =
the tracker for other requests for refining this indentation method.
>=20
> Or see https://debbugs.gnu.org/8576, for when this feature was added =
to js-mode.

I can add a custom option that toggle this. We don=E2=80=99t need =
indentation styles for js, C/C++ is probably the only language that has =
that many established indentation styles. What would be a good name for =
the option? This custom option will be used for both js-ts-mode and =
jsx-ts-mode. js-ts-indent-align-multi-assignment-p?

Yuan





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#77803; Package emacs. Full text available.

Message received at 77803 <at> debbugs.gnu.org:


Received: (at 77803) by debbugs.gnu.org; 20 Apr 2025 00:38:59 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Apr 19 20:38:58 2025
Received: from localhost ([127.0.0.1]:40660 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1u6Ii0-0001As-7D
	for submit <at> debbugs.gnu.org; Sat, 19 Apr 2025 20:38:58 -0400
Received: from fhigh-b6-smtp.messagingengine.com ([202.12.124.157]:37769)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <dmitry@HIDDEN>) id 1u6Ihs-00018w-Rx
 for 77803 <at> debbugs.gnu.org; Sat, 19 Apr 2025 20:38:52 -0400
Received: from phl-compute-02.internal (phl-compute-02.phl.internal
 [10.202.2.42])
 by mailfhigh.stl.internal (Postfix) with ESMTP id 87807254019C;
 Sat, 19 Apr 2025 20:38:42 -0400 (EDT)
Received: from phl-mailfrontend-02 ([10.202.2.163])
 by phl-compute-02.internal (MEProxy); Sat, 19 Apr 2025 20:38:42 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc
 :content-transfer-encoding:content-type:content-type:date:date
 :from:from:in-reply-to:in-reply-to:message-id:mime-version
 :references:reply-to:subject:subject:to:to; s=fm1; t=1745109522;
 x=1745195922; bh=DVGOPdoj2j02GZj0msZ80kygM/pYP9vCS3N+aTvLlhc=; b=
 JDzMKbLKj+eXXnNfgcZMsXb/wojf1gexYpRyDhLhVkbhmVy2b7PZFbhQRjm5J/U2
 3TD6LLSerj36hKBvVDDioh4fZlp5yqbZ3/EbqHe+fO6p5CByOkR0lbXe7wYzP47t
 ZdbzY9TG+G/xpy2u/n4xp8aY7mCJEkjR1dc/k2g2u24cqfsWcgpiwTUWEM8MuwRf
 Tf7bL5UA4fnFQF+cAP5yzmc+lTx6Ozus6Keh41kluzdpaf2jkhr/PrnF08fuSMdX
 tgbiyTzkid+ix+Zp9GflfCqx+rqjR7FbN7FYxRx/Mslh4uMMZOH0l4Mf66N8WvMg
 yYpJYMosCFmRTUW9GrHINQ==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:content-transfer-encoding:content-type
 :content-type:date:date:feedback-id:feedback-id:from:from
 :in-reply-to:in-reply-to:message-id:mime-version:references
 :reply-to:subject:subject:to:to:x-me-proxy:x-me-sender
 :x-me-sender:x-sasl-enc; s=fm2; t=1745109522; x=1745195922; bh=D
 VGOPdoj2j02GZj0msZ80kygM/pYP9vCS3N+aTvLlhc=; b=qVOm6KWk8kZB3QjUE
 e29wnojA+S7ScfGgBzNgd2C1l8MClvBQQLLk7nEFv1ulHGPJwro4cKH/cEWM5b9q
 iWBvPHeT15pTWhZE52nDYPrIHMxLPPcz5jEIdHmTDjsxkq/pprkzLkeE9JDQYNI4
 LiY6aNw+GQ41b9JtxTwQsoKkmpp8KRHq66tvSKfT9k2oUbFwfLBmISHAh86BJpOJ
 vzeJsFT6UQ64OjkLvBAe1LzuVq0Opg557RU2oZ283QRDUTbK+NGjvrSDSKAKM65Y
 N1Yaw8oW4DGZntXpXRP0iZBaIAm47B8Zz9NkTJxmKc4ShGEIbUq38q5tQviSvA6C
 2oMXw==
X-ME-Sender: <xms:EkIEaP-tKT485qQ6JtpVwMjbAXLsKOkZ7KrKHKpF4W4XxbhT2SjiVA>
 <xme:EkIEaLtLHLuN_HWC4lCl4PECyeCG8wvv16_JthftPIrqiEF6SGeo0zziTqHG0pRuC
 OuYUbZQHp2q8qmCjxM>
X-ME-Received: <xmr:EkIEaNCY2ggouM-azrr7pbBYSSFC0yGB3HPVUpuy06v3xxur7Q4cZOrHy8rtwUmaWg>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddvfeeigeelucetufdoteggodetrf
 dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggv
 pdfurfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucenucfjughrpefkff
 ggfgfuvfhfhfgjtgfgsehtkeertddtvdejnecuhfhrohhmpeffmhhithhrhicuifhuthho
 vhcuoegumhhithhrhiesghhuthhovhdruggvvheqnecuggftrfgrthhtvghrnhephfekke
 ekledulefgheeuhfeltdfgtdehiefhvdffueduleevffetudelveffgeeknecuffhomhgr
 ihhnpehgihhthhhusgdrtghomhdpghhnuhdrohhrghenucevlhhushhtvghrufhiiigvpe
 dtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegumhhithhrhiesghhuthhovhdruggvvhdp
 nhgspghrtghpthhtohepfedpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohephhhiqd
 grnhhgvghlseihrghnuggvgidrrhhupdhrtghpthhtohepjeejkedtfeesuggvsggsuhhg
 shdrghhnuhdrohhrghdprhgtphhtthhopegtrghsohhurhhisehgmhgrihhlrdgtohhm
X-ME-Proxy: <xmx:EkIEaLdcAa_dHO1IxRk4S3YYPOL43LDIAD8K4orinUXPO21oGH11cw>
 <xmx:EkIEaEOo2COmSG7VzT-fN_HBpZoT4kZFF5Vl5Npv6FiB-FatkfWY-g>
 <xmx:EkIEaNlyFqNFfQyVSQtdxRfWx6B7JJ0C-UAukyPXoxIVXlem1RDUQA>
 <xmx:EkIEaOttZxw2mMus8mIx9Ht32fUilUV6zIqUduDp4fH2KDl_Ub-4Ug>
 <xmx:EkIEaCxmbug2WMNEFxgqyF03C3Dq9EKOiZ2jes3eIzOdj-jZZCdSCmyQ>
Feedback-ID: i07de48aa:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat,
 19 Apr 2025 20:38:40 -0400 (EDT)
Message-ID: <fde69513-4d0c-455a-991a-2af918dbc32b@HIDDEN>
Date: Sun, 20 Apr 2025 03:38:38 +0300
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: bug#77803: [PATCH v2] Don't indent variable names to their
 declarator expression (bug#77803)
To: Konstantin Kharlamov <Hi-Angel@HIDDEN>, 77803 <at> debbugs.gnu.org,
 casouri@HIDDEN
References: <6913797600552fba6cc2fdfac2d3aa3b9c1b541a.camel@HIDDEN>
 <86plhdhk5k.fsf@HIDDEN>
 <e99cd75dcd8aafe3e820bc9347658ea732752768.camel@HIDDEN>
 <2d790bd630ff1019984c78a690bd461b0629b02a.camel@HIDDEN>
 <865xj5h4fm.fsf@HIDDEN>
 <6f6a0eca815fde659891e3e95ddfe48e1a46eb67.camel@HIDDEN>
 <97e581262b551a19e08200e5c89608e5b8a6d277.camel@HIDDEN>
 <14A0AFC9-9CB5-4231-BC0F-D4CEAE48EC7B@HIDDEN>
 <e88d5c95-ce29-4586-b899-44608e5c67b1@HIDDEN>
 <1ddd76cb471e5eff5f8a72074683265cce49a77c.camel@HIDDEN>
 <4f7121ea-c65c-439c-9b94-598d6eb734a8@HIDDEN>
 <9111de18b3ab2ade73336ee2d9a163115863c04e.camel@HIDDEN>
Content-Language: en-US
From: Dmitry Gutov <dmitry@HIDDEN>
In-Reply-To: <9111de18b3ab2ade73336ee2d9a163115863c04e.camel@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 77803
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

On 20/04/2025 01:58, Konstantin Kharlamov wrote:

>> https://github.com/mooz/js2-mode/issues/1 is when it was added, then
>> see
>> other reports in the tracker about refining it and adding support for
>> different cases.
> 
> Oooh… it seems to be a misunderstanding. The user wasn't asking to
> indent every declaration to the declarator (as it was in ts-tsx-mode
> and as it seems now in jsx-mode). The user pointed out the indentation
> wasn't working at all, and showed "expected indentation", where there
> are 4 spaces used; however it is an accident that 4 spaces are equal to
> "var" + space.

There were no protests from the user, and as I said, you can search the 
tracker for other requests for refining this indentation method.

Or see https://debbugs.gnu.org/8576, for when this feature was added to 
js-mode.





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#77803; Package emacs. Full text available.

Message received at 77803 <at> debbugs.gnu.org:


Received: (at 77803) by debbugs.gnu.org; 19 Apr 2025 22:59:10 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Apr 19 18:59:10 2025
Received: from localhost ([127.0.0.1]:39765 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1u6H9S-0005QA-Ay
	for submit <at> debbugs.gnu.org; Sat, 19 Apr 2025 18:59:10 -0400
Received: from forward501d.mail.yandex.net
 ([2a02:6b8:c41:1300:1:45:d181:d501]:46764)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <hi-angel@HIDDEN>)
 id 1u6H9M-0005PW-Tf
 for 77803 <at> debbugs.gnu.org; Sat, 19 Apr 2025 18:59:08 -0400
Received: from mail-nwsmtp-smtp-production-main-88.klg.yp-c.yandex.net
 (mail-nwsmtp-smtp-production-main-88.klg.yp-c.yandex.net
 [IPv6:2a02:6b8:c43:a29:0:640:6842:0])
 by forward501d.mail.yandex.net (Yandex) with ESMTPS id 1A72060E2C;
 Sun, 20 Apr 2025 01:58:57 +0300 (MSK)
Received: by mail-nwsmtp-smtp-production-main-88.klg.yp-c.yandex.net
 (smtp/Yandex) with ESMTPSA id twUVinMLgSw0-mWr203Qa; 
 Sun, 20 Apr 2025 01:58:56 +0300
X-Yandex-Fwd: 1
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail;
 t=1745103536; bh=V9uogQsePpCWfSMOOze4a86f/xMKZJOrNnMrMTHcrBw=;
 h=In-Reply-To:Date:References:To:From:Subject:Message-ID;
 b=Y8ovPrTFwDmM04+fS3ZnbHsPub0nWEA8QafxB/GZccG8VkQ2p/tydgy9buHmH01Vt
 FziDaRjklTZ5wzHWmLSkUFpPIfwrcMmIp4HdmG8fdNGCAAxljURxDO9DDEueM8oTVd
 Y2akt3JaUZDGSqKKyZuWD0Yv2FTzNMiMFQT+Ob40=
Authentication-Results: mail-nwsmtp-smtp-production-main-88.klg.yp-c.yandex.net;
 dkim=pass header.i=@yandex.ru
Message-ID: <9111de18b3ab2ade73336ee2d9a163115863c04e.camel@HIDDEN>
Subject: Re: bug#77803: [PATCH v2] Don't indent variable names to their
 declarator expression (bug#77803)
From: Konstantin Kharlamov <Hi-Angel@HIDDEN>
To: Dmitry Gutov <dmitry@HIDDEN>, 77803 <at> debbugs.gnu.org, casouri@HIDDEN
Date: Sun, 20 Apr 2025 01:58:56 +0300
In-Reply-To: <4f7121ea-c65c-439c-9b94-598d6eb734a8@HIDDEN>
References: <6913797600552fba6cc2fdfac2d3aa3b9c1b541a.camel@HIDDEN>
 <86plhdhk5k.fsf@HIDDEN>
 <e99cd75dcd8aafe3e820bc9347658ea732752768.camel@HIDDEN>
 <2d790bd630ff1019984c78a690bd461b0629b02a.camel@HIDDEN>
 <865xj5h4fm.fsf@HIDDEN>
 <6f6a0eca815fde659891e3e95ddfe48e1a46eb67.camel@HIDDEN>
 <97e581262b551a19e08200e5c89608e5b8a6d277.camel@HIDDEN>
 <14A0AFC9-9CB5-4231-BC0F-D4CEAE48EC7B@HIDDEN>
 <e88d5c95-ce29-4586-b899-44608e5c67b1@HIDDEN>
 <1ddd76cb471e5eff5f8a72074683265cce49a77c.camel@HIDDEN>
 <4f7121ea-c65c-439c-9b94-598d6eb734a8@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
User-Agent: Evolution 3.56.0 
MIME-Version: 1.0
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 77803
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

On Sat, 2025-04-19 at 16:31 +0300, Dmitry Gutov wrote:
> On 19/04/2025 08:46, Konstantin Kharlamov wrote:
> > On Sat, 2025-04-19 at 04:02 +0300, Dmitry Gutov wrote:
> > > On 19/04/2025 02:43, Yuan Fu wrote:
> > > > Thanks! I personally like the current indentation,
> > > js2-mode has been doing it this way for a number of years
> > > (triggered
> > > by
> > > user requests), js-mode followed suit later.
> > That's unusual, do you have a link to the discussion? Such
> > indentation
> > doesn't make sense to me (because when you have "const" and "var"
> > declarations near, they won't be aligned); and when I test it in
> > VSCode
> > which I think most Web devs are using, it indents both to 3 spaces.
>=20
> https://github.com/mooz/js2-mode/issues/1=C2=A0is when it was added, then
> see=20
> other reports in the tracker about refining it and adding support for
> different cases.

Oooh=E2=80=A6 it seems to be a misunderstanding. The user wasn't asking to
indent every declaration to the declarator (as it was in ts-tsx-mode
and as it seems now in jsx-mode). The user pointed out the indentation
wasn't working at all, and showed "expected indentation", where there
are 4 spaces used; however it is an accident that 4 spaces are equal to
"var" + space.

If you test VSCode with JS file, you'll see it too indents them to 4
spaces, i.e. "var" + space=E2=80=A6 However, if you replace `var` with `con=
st`,
VSCode will still use same indentation, it won't try to indent to
"`const` + space". Which makes sense.

I see that it is easy to misinterpret the OP's example as an ask to
indent variables to the declarator, unfortunately I don't think that
was something the issue author was asking for.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#77803; Package emacs. Full text available.

Message received at 77803 <at> debbugs.gnu.org:


Received: (at 77803) by debbugs.gnu.org; 19 Apr 2025 13:31:51 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Apr 19 09:31:51 2025
Received: from localhost ([127.0.0.1]:60158 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1u68IP-0003Ch-J6
	for submit <at> debbugs.gnu.org; Sat, 19 Apr 2025 09:31:51 -0400
Received: from fout-a1-smtp.messagingengine.com ([103.168.172.144]:38563)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <dmitry@HIDDEN>) id 1u68IJ-0003Aw-KC
 for 77803 <at> debbugs.gnu.org; Sat, 19 Apr 2025 09:31:46 -0400
Received: from phl-compute-01.internal (phl-compute-01.phl.internal
 [10.202.2.41])
 by mailfout.phl.internal (Postfix) with ESMTP id C5D491380138;
 Sat, 19 Apr 2025 09:31:37 -0400 (EDT)
Received: from phl-mailfrontend-02 ([10.202.2.163])
 by phl-compute-01.internal (MEProxy); Sat, 19 Apr 2025 09:31:37 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc
 :content-transfer-encoding:content-type:content-type:date:date
 :from:from:in-reply-to:in-reply-to:message-id:mime-version
 :references:reply-to:subject:subject:to:to; s=fm1; t=1745069497;
 x=1745155897; bh=5Tfxd7AgFvxvrwz8CMBRQfzTo3VaZDa8qQ3ITkciW9o=; b=
 iTQs01OsQxg6jeLk1/9gECWeIrFPYrKBoamYNheNVDIilClwQ82iLbqqDnLa+bnW
 Nz0i2Gh1hxk4Tr1k6toz0GwKBmZlsg1WiggLUNumL3qpJiKfKpNxNbMi7xDgOXNw
 fKIUdaYrmBbx5M5veU7Ci2Mfpb1f9RlIz3dk6Q6db4t5+kkIw96SNf9CuOVM+AHA
 cL3cFm0v9KgZ9F7V5qKIx7A6PhuIfaJKLy59a8ouCOJjf/9eKQEJvk3Ijs+pdSOi
 yE+6C27nMZbFAFn1UVJ+4KINETSY1v6+o0z4tnGh8Wb+hCx3Ubwj5KbVbcS5QMBc
 mjsl5UD0hOadVP/9TjDabg==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:content-transfer-encoding:content-type
 :content-type:date:date:feedback-id:feedback-id:from:from
 :in-reply-to:in-reply-to:message-id:mime-version:references
 :reply-to:subject:subject:to:to:x-me-proxy:x-me-sender
 :x-me-sender:x-sasl-enc; s=fm2; t=1745069497; x=1745155897; bh=5
 Tfxd7AgFvxvrwz8CMBRQfzTo3VaZDa8qQ3ITkciW9o=; b=i39lO6lYHzprXNzRF
 95jVef+mRC+JFRZCtXQpfI8AMHNDM8UbpxW8VU31ZobTNeIqoQ/m/FaR8SqAZzoe
 5KBcx9j6mwl6ZyTN7YpWRWodL2fIzDoy20vgsnpVRPs+VftZ4Fa5Qwbq3kTgpz+C
 K1hQXi8OU9wczUCC3AiQpx42YsvxKplgqUHXSIO0lOecjQL0W96Rr9qmsSV3Ime9
 2E0t01VttahQDFFVg4fhGYx7e6jJjmhEap2ZjmRqqV/YwqjbvDHQSeNpDe0cfmHP
 6j9hMwLRwoU/JrI8kUkmGd+LgOA89DVQ83DJEsTpIUj5fyOFV1HRwCqsLKmhHS6w
 gwzmg==
X-ME-Sender: <xms:uaUDaDsGUVcxaATEsjmg_HDAS0JSEsPUIbsdqNOCRBzquQNnpV9VwA>
 <xme:uaUDaEfFcimwc4R8BTGurUhFRLin0MVEsR6KKXvpqrrI1t2FpEvBkx7DzMZz8L4XP
 jdYBcpc8L-25Qsd1ak>
X-ME-Received: <xmr:uaUDaGwh8ClnR4yayYAKyo7ZQ4K0r0wIb2KXv7nEtnXO0gyzqYElel22ADyViKJhdQ>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddvfeehudehucetufdoteggodetrf
 dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggv
 pdfurfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucenucfjughrpefkff
 ggfgfuvfhfhfgjtgfgsehtjeertddtvdejnecuhfhrohhmpeffmhhithhrhicuifhuthho
 vhcuoegumhhithhrhiesghhuthhovhdruggvvheqnecuggftrfgrthhtvghrnhephfeftd
 fhudejleelfeekjedtheefjedvlefgieeuteekheeuffekgfdviefghfdtnecuffhomhgr
 ihhnpehgihhthhhusgdrtghomhenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmh
 epmhgrihhlfhhrohhmpegumhhithhrhiesghhuthhovhdruggvvhdpnhgspghrtghpthht
 ohepfedpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohephhhiqdgrnhhgvghlseihrg
 hnuggvgidrrhhupdhrtghpthhtohepjeejkedtfeesuggvsggsuhhgshdrghhnuhdrohhr
 ghdprhgtphhtthhopegtrghsohhurhhisehgmhgrihhlrdgtohhm
X-ME-Proxy: <xmx:uaUDaCOvuFUKC6o_e7Jop3aDJYbW2Ro7VPAOxo-CZ4KqYy4TiAIqBg>
 <xmx:uaUDaD_Ig3e8RO4aMjhOLNLsTQjRGq1xD4tSmvgtQsq0Krbkm57Xjg>
 <xmx:uaUDaCV5_wXZf5UWFwEPcnkcPJmG2bO10aVgwwA2xpJD8VoqG5T81g>
 <xmx:uaUDaEdkV0uhDe4HHTj9ZZHPFdk7E_Rgv2za_Yv6kZzSEWX8UO5zsg>
 <xmx:uaUDaDjxcewB0nTtG5MNBleBypv8fV7-uwn2Wf3exSfTbYhK1XXpi5mo>
Feedback-ID: i07de48aa:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat,
 19 Apr 2025 09:31:36 -0400 (EDT)
Message-ID: <4f7121ea-c65c-439c-9b94-598d6eb734a8@HIDDEN>
Date: Sat, 19 Apr 2025 16:31:33 +0300
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: bug#77803: [PATCH v2] Don't indent variable names to their
 declarator expression (bug#77803)
To: Konstantin Kharlamov <Hi-Angel@HIDDEN>, 77803 <at> debbugs.gnu.org,
 casouri@HIDDEN
References: <6913797600552fba6cc2fdfac2d3aa3b9c1b541a.camel@HIDDEN>
 <86plhdhk5k.fsf@HIDDEN>
 <e99cd75dcd8aafe3e820bc9347658ea732752768.camel@HIDDEN>
 <2d790bd630ff1019984c78a690bd461b0629b02a.camel@HIDDEN>
 <865xj5h4fm.fsf@HIDDEN>
 <6f6a0eca815fde659891e3e95ddfe48e1a46eb67.camel@HIDDEN>
 <97e581262b551a19e08200e5c89608e5b8a6d277.camel@HIDDEN>
 <14A0AFC9-9CB5-4231-BC0F-D4CEAE48EC7B@HIDDEN>
 <e88d5c95-ce29-4586-b899-44608e5c67b1@HIDDEN>
 <1ddd76cb471e5eff5f8a72074683265cce49a77c.camel@HIDDEN>
Content-Language: en-US
From: Dmitry Gutov <dmitry@HIDDEN>
In-Reply-To: <1ddd76cb471e5eff5f8a72074683265cce49a77c.camel@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 77803
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

On 19/04/2025 08:46, Konstantin Kharlamov wrote:
> On Sat, 2025-04-19 at 04:02 +0300, Dmitry Gutov wrote:
>> On 19/04/2025 02:43, Yuan Fu wrote:
>>> Thanks! I personally like the current indentation,
>> js2-mode has been doing it this way for a number of years (triggered
>> by
>> user requests), js-mode followed suit later.
> That's unusual, do you have a link to the discussion? Such indentation
> doesn't make sense to me (because when you have "const" and "var"
> declarations near, they won't be aligned); and when I test it in VSCode
> which I think most Web devs are using, it indents both to 3 spaces.

https://github.com/mooz/js2-mode/issues/1 is when it was added, then see 
other reports in the tracker about refining it and adding support for 
different cases.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#77803; Package emacs. Full text available.

Message received at 77803 <at> debbugs.gnu.org:


Received: (at 77803) by debbugs.gnu.org; 19 Apr 2025 08:30:58 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Apr 19 04:30:58 2025
Received: from localhost ([127.0.0.1]:57435 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1u63bF-0004rb-6z
	for submit <at> debbugs.gnu.org; Sat, 19 Apr 2025 04:30:58 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:57954)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1u63bB-0004qF-ES
 for 77803 <at> debbugs.gnu.org; Sat, 19 Apr 2025 04:30:54 -0400
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 <eliz@HIDDEN>)
 id 1u63b4-0003sz-T7; Sat, 19 Apr 2025 04:30:47 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=sEjuUU2Z3b6BclwCiyDQqlvHC6CEh6e39SrqnpBXA7U=; b=asfbwJrxdv/3
 6ThR+QV16Kb+H6zez+GjiT02nqqdGdQQVUoFtriF8+l0XWUgzig7LCoGwtfBtt2ipb91Dg6rEbCTc
 26/Uaa+SQQWKSRzCpQ6X9wv/QnXu4GpCxNejJzMLkifDG8IlYrrqSHr5qcmPX4fkaXeGe5E2I4ovg
 8WIdTuzutweenhDWJP/kRDWhdb7OwIL1D31ONodFbvPEYamAvU+h14qyl7pPtGQvxS7eM5A1xjeRE
 itEnYWeZvCjma2f3o+Ow1tWdQsmnmBbyc7W/0IvoYB8gfTpfvUseo0vkpYF9Req8hBSWlyWTG5ud4
 FFUMdj/erk7u/oIEMRAOXQ==;
Date: Sat, 19 Apr 2025 11:30:44 +0300
Message-Id: <867c3ga6yz.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Konstantin Kharlamov <Hi-Angel@HIDDEN>
In-Reply-To: <2d687204fdb63a8f103bbb157f8a6d89e4970e90.camel@HIDDEN>
 (message from Konstantin Kharlamov on Sat, 19 Apr 2025 10:32:36 +0300)
Subject: Re: bug#77803: [PATCH v2] Don't indent variable names to their
 declarator expression (bug#77803)
References: <6913797600552fba6cc2fdfac2d3aa3b9c1b541a.camel@HIDDEN>
 <86plhdhk5k.fsf@HIDDEN>
 <e99cd75dcd8aafe3e820bc9347658ea732752768.camel@HIDDEN>
 <2d790bd630ff1019984c78a690bd461b0629b02a.camel@HIDDEN>
 <865xj5h4fm.fsf@HIDDEN>
 <6f6a0eca815fde659891e3e95ddfe48e1a46eb67.camel@HIDDEN>
 <97e581262b551a19e08200e5c89608e5b8a6d277.camel@HIDDEN>
 <14A0AFC9-9CB5-4231-BC0F-D4CEAE48EC7B@HIDDEN>
 <86jz7gaa53.fsf@HIDDEN>
 <2d687204fdb63a8f103bbb157f8a6d89e4970e90.camel@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 77803
Cc: casouri@HIDDEN, theo@HIDDEN, 77803 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Konstantin Kharlamov <Hi-Angel@HIDDEN>
> Cc: theo@HIDDEN, 77803 <at> debbugs.gnu.org
> Date: Sat, 19 Apr 2025 10:32:36 +0300
> 
> On Sat, 2025-04-19 at 10:22 +0300, Eli Zaretskii wrote: >
> Konstantin, please in the future remember NOT to change the subject
> > of > the messages you send to the bug tracker, since if you do,
> that makes > it a tad harder to find related messages when reviewing
> the whole > discussion, finding messages that didn't get response,
> etc.
> 
> Okay. Sorry, I used to see on mailing lists that people change the
> subject when discussion somewhat diverges; and I also see that
> bugtracker has no functional to show latest patch revision. So when
> there's like 5 versions of patches somewhere in the discussion, I
> imagined it may be difficult to maintainers to see which one is latest,
> so I tried to work around that problem by appending the "PATCH" and the
> version field. Sorry if this doesn't help.

You can include the version in the body of the message.  And even if
you don't, we can manage.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#77803; Package emacs. Full text available.

Message received at 77803 <at> debbugs.gnu.org:


Received: (at 77803) by debbugs.gnu.org; 19 Apr 2025 07:45:37 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Apr 19 03:45:37 2025
Received: from localhost ([127.0.0.1]:56993 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1u62tM-0008IO-Ka
	for submit <at> debbugs.gnu.org; Sat, 19 Apr 2025 03:45:37 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:45784)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1u62tJ-0008Hb-9m
 for 77803 <at> debbugs.gnu.org; Sat, 19 Apr 2025 03:45:34 -0400
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 <eliz@HIDDEN>)
 id 1u62tC-0006v4-Oj; Sat, 19 Apr 2025 03:45:26 -0400
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=Oa+XvyJVAJ6cu+zfsP60A3JrFZB8S1umaKDBwTB+KXE=; b=HSeomwznPUqxAtugYcKu
 W/QITPH4omy31NAk7Al1t1WI6fNexq8CPXKf8N3PExSz0uJIvE0ytgOy0MoQUAojFdiXtLpAIiW8O
 fDqjvtJFThdqRzxg/Rhx9PZWKFNVoNVevwCNCVNJm2SGp/I2zAe12CnsNaXdF2xl245plTBJqLMoW
 UYrvadfNjT3Q2TZxglSa+SMpPr590RrbRESM9h04yvpqcNox7ZgXN15fsDs++fjZ7vm+q0T6XELfT
 Ss0lduTysCJtnjemfetxvSlvds/DQCy6cNZNo6hM1fPXgmqjoXzB8YR1l9kEbmEmvJlVSdUAMr298
 ogujvp7Dy3dGhg==;
Date: Sat, 19 Apr 2025 10:45:23 +0300
Message-Id: <86ecxoa92k.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Konstantin Kharlamov <Hi-Angel@HIDDEN>
In-Reply-To: <1ddd76cb471e5eff5f8a72074683265cce49a77c.camel@HIDDEN>
 (message from Konstantin Kharlamov on Sat, 19 Apr 2025 08:46:11 +0300)
Subject: Re: bug#77803: [PATCH v2] Don't indent variable names to their
 declarator expression (bug#77803)
References: <6913797600552fba6cc2fdfac2d3aa3b9c1b541a.camel@HIDDEN>
 <86plhdhk5k.fsf@HIDDEN>
 <e99cd75dcd8aafe3e820bc9347658ea732752768.camel@HIDDEN>
 <2d790bd630ff1019984c78a690bd461b0629b02a.camel@HIDDEN>
 <865xj5h4fm.fsf@HIDDEN>
 <6f6a0eca815fde659891e3e95ddfe48e1a46eb67.camel@HIDDEN>
 <97e581262b551a19e08200e5c89608e5b8a6d277.camel@HIDDEN>
 <14A0AFC9-9CB5-4231-BC0F-D4CEAE48EC7B@HIDDEN>
 <e88d5c95-ce29-4586-b899-44608e5c67b1@HIDDEN>
 <1ddd76cb471e5eff5f8a72074683265cce49a77c.camel@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 77803
Cc: dmitry@HIDDEN, 77803 <at> debbugs.gnu.org, casouri@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Konstantin Kharlamov <Hi-Angel@HIDDEN>
> Date: Sat, 19 Apr 2025 08:46:11 +0300
> 
> > So it's hard to call the current indentation incorrect. Could use a
> > user 
> > option. Maybe take js2-pretty-multiline-declarations as an example.
> 
> Interesting point btw, is there docs how to customize tree-sitter
> indentation? I looked around and found this post¹, however it's
> specific to c-ts-mode, because it relies on `c-ts-mode-indent-style`
> function.

C/C++ indentation styles are indeed specific to c-ts-mode, but nothing
prevents us from having a similar command in other modes.  Not every
major mode wants to support several indentation styles, so I'm not
sure a global treesit-level facility is justified.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#77803; Package emacs. Full text available.

Message received at 77803 <at> debbugs.gnu.org:


Received: (at 77803) by debbugs.gnu.org; 19 Apr 2025 07:32:50 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Apr 19 03:32:50 2025
Received: from localhost ([127.0.0.1]:56866 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1u62gz-0006gL-QI
	for submit <at> debbugs.gnu.org; Sat, 19 Apr 2025 03:32:50 -0400
Received: from forward501a.mail.yandex.net ([178.154.239.81]:35626)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <hi-angel@HIDDEN>)
 id 1u62gw-0006g0-CP
 for 77803 <at> debbugs.gnu.org; Sat, 19 Apr 2025 03:32:47 -0400
Received: from mail-nwsmtp-smtp-production-main-95.vla.yp-c.yandex.net
 (mail-nwsmtp-smtp-production-main-95.vla.yp-c.yandex.net
 [IPv6:2a02:6b8:c1f:644d:0:640:2ef6:0])
 by forward501a.mail.yandex.net (Yandex) with ESMTPS id DAE816127F;
 Sat, 19 Apr 2025 10:32:37 +0300 (MSK)
Received: by mail-nwsmtp-smtp-production-main-95.vla.yp-c.yandex.net
 (smtp/Yandex) with ESMTPSA id aWFFLbCLiOs0-c90oAXKm; 
 Sat, 19 Apr 2025 10:32:37 +0300
X-Yandex-Fwd: 1
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail;
 t=1745047957; bh=0EvF/oqnVi41mZ5zAgRWt4PWD4HuPUq66i5W0kocBpk=;
 h=References:Date:In-Reply-To:Cc:To:From:Subject:Message-ID;
 b=IbgMkOzM7N5I+pmaV0J6QdjukRaDx8pEj+AYr3W+RJ0nGlAFzyQg6qaAlTi6by+oI
 +Rs5WByqAyiHRZ2aIEIvSz07l/d9FYzs4NkhSaDVvRwHwgkYWh5WQ9mXp6CBuR3I7a
 /tdhNQXez7ESFRp+oyLiMzUYoM2jGkZuSo1LnRSI=
Authentication-Results: mail-nwsmtp-smtp-production-main-95.vla.yp-c.yandex.net;
 dkim=pass header.i=@yandex.ru
Message-ID: <2d687204fdb63a8f103bbb157f8a6d89e4970e90.camel@HIDDEN>
Subject: Re: bug#77803: [PATCH v2] Don't indent variable names to their
 declarator expression (bug#77803)
From: Konstantin Kharlamov <Hi-Angel@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>, Yuan Fu <casouri@HIDDEN>
Date: Sat, 19 Apr 2025 10:32:36 +0300
In-Reply-To: <86jz7gaa53.fsf@HIDDEN>
References: <6913797600552fba6cc2fdfac2d3aa3b9c1b541a.camel@HIDDEN>
 <86plhdhk5k.fsf@HIDDEN>
 <e99cd75dcd8aafe3e820bc9347658ea732752768.camel@HIDDEN>
 <2d790bd630ff1019984c78a690bd461b0629b02a.camel@HIDDEN>
 <865xj5h4fm.fsf@HIDDEN>
 <6f6a0eca815fde659891e3e95ddfe48e1a46eb67.camel@HIDDEN>
 <97e581262b551a19e08200e5c89608e5b8a6d277.camel@HIDDEN>
 <14A0AFC9-9CB5-4231-BC0F-D4CEAE48EC7B@HIDDEN> <86jz7gaa53.fsf@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
User-Agent: Evolution 3.56.0 
MIME-Version: 1.0
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 77803
Cc: 77803 <at> debbugs.gnu.org, theo@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On Sat, 2025-04-19 at 10:22 +0300, Eli Zaretskii wrote:
> > From: Yuan Fu <casouri@HIDDEN>
> > Date: Fri, 18 Apr 2025 16:43:17 -0700
> > Cc: Eli Zaretskii <eliz@HIDDEN>,
> > =C2=A0theo@HIDDEN,
> > =C2=A077803-done <at> debbugs.gnu.org
> >=20
> > Thanks! I personally like the current indentation, but indeed other
> > editors, and more importantly prettier, indents like what your
> > patch implemented. I applied the patch to emacs-30 and pushed.
>=20
> Thank you.
>=20
> Konstantin, please in the future remember NOT to change the subject
> of
> the messages you send to the bug tracker, since if you do, that makes
> it a tad harder to find related messages when reviewing the whole
> discussion, finding messages that didn't get response, etc.

Okay. Sorry, I used to see on mailing lists that people change the
subject when discussion somewhat diverges; and I also see that
bugtracker has no functional to show latest patch revision. So when
there's like 5 versions of patches somewhere in the discussion, I
imagined it may be difficult to maintainers to see which one is latest,
so I tried to work around that problem by appending the "PATCH" and the
version field. Sorry if this doesn't help.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#77803; Package emacs. Full text available.

Message received at 77803 <at> debbugs.gnu.org:


Received: (at 77803) by debbugs.gnu.org; 19 Apr 2025 07:32:36 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Apr 19 03:32:36 2025
Received: from localhost ([127.0.0.1]:56863 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1u62gl-0006fq-Uc
	for submit <at> debbugs.gnu.org; Sat, 19 Apr 2025 03:32:36 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:48874)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1u62gh-0006fP-KC
 for 77803 <at> debbugs.gnu.org; Sat, 19 Apr 2025 03:32:33 -0400
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 <eliz@HIDDEN>)
 id 1u62gb-0005SF-Nm; Sat, 19 Apr 2025 03:32:25 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=SOIE3W9Y7sOcDjCW9CCDm9qstUEjZM4eWV+LKjSFEQw=; b=nscdif6AsV6J
 Tbnqtb2ZqIMntdQTeVHaqbvvYe6XYcUlxmfHtvf/xqMBtgtg0+QP7hH7MweKBIEkgHOHRyn5VvYys
 qY0FX1qLbMWLxE9pKKcAED3iuA4Sqn9Kvt4ZYLNFLZcmrPwRGTigHjuQMfqNLq58FwdY1/UY3nIOb
 4K9DlltJARbbtaxy2/1VUh0NGXgymlGFaONDQQO/+9zI8CVvwDGaF6T4yUMLFcAWSkpV0uC7B1p1+
 nnVFibEkI9dhDDbyJJYilWm0aZbnm0OdZvNeCQpTAHNcS2X2Obz2BU9315JOWfF8zIUyCk/M1JhcX
 RznP6giiNAUgs0Cb0ClsJw==;
Date: Sat, 19 Apr 2025 10:32:21 +0300
Message-Id: <86h62ka9oa.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Dmitry Gutov <dmitry@HIDDEN>
In-Reply-To: <e88d5c95-ce29-4586-b899-44608e5c67b1@HIDDEN> (message from
 Dmitry Gutov on Sat, 19 Apr 2025 04:02:11 +0300)
Subject: Re: bug#77803: [PATCH v2] Don't indent variable names to their
 declarator expression (bug#77803)
References: <6913797600552fba6cc2fdfac2d3aa3b9c1b541a.camel@HIDDEN>
 <86plhdhk5k.fsf@HIDDEN>
 <e99cd75dcd8aafe3e820bc9347658ea732752768.camel@HIDDEN>
 <2d790bd630ff1019984c78a690bd461b0629b02a.camel@HIDDEN>
 <865xj5h4fm.fsf@HIDDEN>
 <6f6a0eca815fde659891e3e95ddfe48e1a46eb67.camel@HIDDEN>
 <97e581262b551a19e08200e5c89608e5b8a6d277.camel@HIDDEN>
 <14A0AFC9-9CB5-4231-BC0F-D4CEAE48EC7B@HIDDEN>
 <e88d5c95-ce29-4586-b899-44608e5c67b1@HIDDEN>
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 77803
Cc: 77803 <at> debbugs.gnu.org, casouri@HIDDEN, Hi-Angel@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Date: Sat, 19 Apr 2025 04:02:11 +0300
> From: Dmitry Gutov <dmitry@HIDDEN>
> 
> On 19/04/2025 02:43, Yuan Fu wrote:
> > Thanks! I personally like the current indentation,
> 
> js2-mode has been doing it this way for a number of years (triggered by 
> user requests), js-mode followed suit later.
> 
> So it's hard to call the current indentation incorrect. Could use a user 
> option. Maybe take js2-pretty-multiline-declarations as an example.

Yes, if more than 2 indentation styles could be favored, a user-level
indentation-style option is in order.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#77803; Package emacs. Full text available.

Message received at 77803 <at> debbugs.gnu.org:


Received: (at 77803) by debbugs.gnu.org; 19 Apr 2025 07:22:35 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Apr 19 03:22:35 2025
Received: from localhost ([127.0.0.1]:56745 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1u62X4-0005L3-EU
	for submit <at> debbugs.gnu.org; Sat, 19 Apr 2025 03:22:35 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:54642)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1u62X1-0005K5-4E
 for 77803 <at> debbugs.gnu.org; Sat, 19 Apr 2025 03:22:32 -0400
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 <eliz@HIDDEN>)
 id 1u62Wt-00044T-AO; Sat, 19 Apr 2025 03:22:23 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=G0yEQlYQad4HYK6mfNa41MblIMVF6BVkfqD/VXR+pLU=; b=AaLoCt1nrpoy
 32Zyhm5Aloh0e5Ybsqg5BjKLUQbAiPHc/P2XAKLFxtHAjmLVzKk97v08glW5NDBtnwjndvuFR0wzg
 G+pegUqFnh16ZpCGfbdEePmFl5gOWXO/oez+Xyk/zc6DOp9YUteysgCFCVDoaoVDI2GItSDAy9Ely
 PD2BhFoA/4Dqz4WOikAH4joTERIXA9lBzylTvCJUTSi0gSLnzTqXdQISDQOc/q/SsEMT7Uw7Pp86N
 XZjjjDnRNzQpt1CLeMxAW0ILHSPexDNAs17fcfyJre21fP4X+cV1iMwaItihJAzmDBTRMjexZLooF
 g/d/E8qPjL3zwchsASXxIg==;
Date: Sat, 19 Apr 2025 10:22:16 +0300
Message-Id: <86jz7gaa53.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Hi-Angel@HIDDEN, Yuan Fu <casouri@HIDDEN>
In-Reply-To: <14A0AFC9-9CB5-4231-BC0F-D4CEAE48EC7B@HIDDEN> (message from
 Yuan Fu on Fri, 18 Apr 2025 16:43:17 -0700)
Subject: Re: bug#77803: [PATCH v2] Don't indent variable names to their
 declarator expression (bug#77803)
References: <6913797600552fba6cc2fdfac2d3aa3b9c1b541a.camel@HIDDEN>
 <86plhdhk5k.fsf@HIDDEN>
 <e99cd75dcd8aafe3e820bc9347658ea732752768.camel@HIDDEN>
 <2d790bd630ff1019984c78a690bd461b0629b02a.camel@HIDDEN>
 <865xj5h4fm.fsf@HIDDEN>
 <6f6a0eca815fde659891e3e95ddfe48e1a46eb67.camel@HIDDEN>
 <97e581262b551a19e08200e5c89608e5b8a6d277.camel@HIDDEN>
 <14A0AFC9-9CB5-4231-BC0F-D4CEAE48EC7B@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 77803
Cc: 77803 <at> debbugs.gnu.org, theo@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Yuan Fu <casouri@HIDDEN>
> Date: Fri, 18 Apr 2025 16:43:17 -0700
> Cc: Eli Zaretskii <eliz@HIDDEN>,
>  theo@HIDDEN,
>  77803-done <at> debbugs.gnu.org
> 
> Thanks! I personally like the current indentation, but indeed other editors, and more importantly prettier, indents like what your patch implemented. I applied the patch to emacs-30 and pushed.

Thank you.

Konstantin, please in the future remember NOT to change the subject of
the messages you send to the bug tracker, since if you do, that makes
it a tad harder to find related messages when reviewing the whole
discussion, finding messages that didn't get response, etc.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#77803; Package emacs. Full text available.

Message received at 77803 <at> debbugs.gnu.org:


Received: (at 77803) by debbugs.gnu.org; 19 Apr 2025 05:46:28 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Apr 19 01:46:27 2025
Received: from localhost ([127.0.0.1]:55778 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1u6121-0001sh-Vb
	for submit <at> debbugs.gnu.org; Sat, 19 Apr 2025 01:46:27 -0400
Received: from forward501a.mail.yandex.net ([178.154.239.81]:47116)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <hi-angel@HIDDEN>)
 id 1u611x-0001qS-VR
 for 77803 <at> debbugs.gnu.org; Sat, 19 Apr 2025 01:46:24 -0400
Received: from mail-nwsmtp-smtp-production-main-52.vla.yp-c.yandex.net
 (mail-nwsmtp-smtp-production-main-52.vla.yp-c.yandex.net
 [IPv6:2a02:6b8:c0f:4c83:0:640:aa07:0])
 by forward501a.mail.yandex.net (Yandex) with ESMTPS id 5D92260C32;
 Sat, 19 Apr 2025 08:46:12 +0300 (MSK)
Received: by mail-nwsmtp-smtp-production-main-52.vla.yp-c.yandex.net
 (smtp/Yandex) with ESMTPSA id BkDdvhBLZ4Y0-NGCQSrAg; 
 Sat, 19 Apr 2025 08:46:12 +0300
X-Yandex-Fwd: 1
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail;
 t=1745041572; bh=B75WyJX8kOZSbxtB0Nw7PRJtIQ4vTnin8Oek7AwIuDw=;
 h=In-Reply-To:Date:References:To:From:Subject:Message-ID;
 b=d/e2ax8iCVdBzjTC6z/c531ihPfq3CLQLxfGztKUhgKH5FL3x3yPEBcxGKcFxMdpN
 d/e5hm9lVheCsZwpV/Eag8gVYzL0tLXoLIZtxBKO/rvL/I7hj1EY+0LJVqEeWYes/s
 4DR4Q7vO1lnCdSevRk8Xd+J8Yh/j6Ex7H78ok67I=
Authentication-Results: mail-nwsmtp-smtp-production-main-52.vla.yp-c.yandex.net;
 dkim=pass header.i=@yandex.ru
Message-ID: <1ddd76cb471e5eff5f8a72074683265cce49a77c.camel@HIDDEN>
Subject: Re: bug#77803: [PATCH v2] Don't indent variable names to their
 declarator expression (bug#77803)
From: Konstantin Kharlamov <Hi-Angel@HIDDEN>
To: Dmitry Gutov <dmitry@HIDDEN>, 77803 <at> debbugs.gnu.org, casouri@HIDDEN
Date: Sat, 19 Apr 2025 08:46:11 +0300
In-Reply-To: <e88d5c95-ce29-4586-b899-44608e5c67b1@HIDDEN>
References: <6913797600552fba6cc2fdfac2d3aa3b9c1b541a.camel@HIDDEN>
 <86plhdhk5k.fsf@HIDDEN>
 <e99cd75dcd8aafe3e820bc9347658ea732752768.camel@HIDDEN>
 <2d790bd630ff1019984c78a690bd461b0629b02a.camel@HIDDEN>
 <865xj5h4fm.fsf@HIDDEN>
 <6f6a0eca815fde659891e3e95ddfe48e1a46eb67.camel@HIDDEN>
 <97e581262b551a19e08200e5c89608e5b8a6d277.camel@HIDDEN>
 <14A0AFC9-9CB5-4231-BC0F-D4CEAE48EC7B@HIDDEN>
 <e88d5c95-ce29-4586-b899-44608e5c67b1@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
User-Agent: Evolution 3.56.0 
MIME-Version: 1.0
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 77803
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On Sat, 2025-04-19 at 04:02 +0300, Dmitry Gutov wrote:
> On 19/04/2025 02:43, Yuan Fu wrote:
> > Thanks! I personally like the current indentation,
>=20
> js2-mode has been doing it this way for a number of years (triggered
> by=20
> user requests), js-mode followed suit later.

That's unusual, do you have a link to the discussion? Such indentation
doesn't make sense to me (because when you have "const" and "var"
declarations near, they won't be aligned); and when I test it in VSCode
which I think most Web devs are using, it indents both to 3 spaces.

> So it's hard to call the current indentation incorrect. Could use a
> user=20
> option. Maybe take js2-pretty-multiline-declarations as an example.

Interesting point btw, is there docs how to customize tree-sitter
indentation? I looked around and found this post=C2=B9, however it's
specific to c-ts-mode, because it relies on `c-ts-mode-indent-style`
function.

1:
https://emacs.stackexchange.com/questions/77232/c-c-with-tree-sitter-how-to=
-change-indent




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#77803; Package emacs. Full text available.

Message received at 77803 <at> debbugs.gnu.org:


Received: (at 77803) by debbugs.gnu.org; 19 Apr 2025 01:02:26 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Apr 18 21:02:26 2025
Received: from localhost ([127.0.0.1]:53681 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1u5wbB-0006Xz-LT
	for submit <at> debbugs.gnu.org; Fri, 18 Apr 2025 21:02:26 -0400
Received: from fhigh-a5-smtp.messagingengine.com ([103.168.172.156]:57203)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <dmitry@HIDDEN>) id 1u5wb7-0006W6-Pu
 for 77803 <at> debbugs.gnu.org; Fri, 18 Apr 2025 21:02:23 -0400
Received: from phl-compute-09.internal (phl-compute-09.phl.internal
 [10.202.2.49])
 by mailfhigh.phl.internal (Postfix) with ESMTP id CCE5611401F6;
 Fri, 18 Apr 2025 21:02:15 -0400 (EDT)
Received: from phl-mailfrontend-02 ([10.202.2.163])
 by phl-compute-09.internal (MEProxy); Fri, 18 Apr 2025 21:02:15 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc
 :content-transfer-encoding:content-type:content-type:date:date
 :from:from:in-reply-to:in-reply-to:message-id:mime-version
 :references:reply-to:subject:subject:to:to; s=fm1; t=1745024535;
 x=1745110935; bh=l3z3btoW6/VZhXdGX1Gwbg0dj4E/KVXZRZZeeosEGTc=; b=
 A+psQMjCJA7r08dx0RUxFXZ3hJvcf0e5EXg7/NMoAqqgMSdggp25nzJ7qioNtsG4
 InP0MADNuhsydCIBqbtfmHk+tUbl+4hoy7JRYi9bXL1Avb+agri6jfzr60xT0qha
 w3Llt8gl6DIMexUTqjTg/ihKgcKoCip0L0nk+P8GF3yMWrJ6l2Pv7R4dfthCT3Kd
 J1g1iSNNc7jBu4Cb0WdpOUIjTd1DL1dKn/tMTu/XSYibmhHHAfbNNUiQDnm5+4eI
 mkdngWhtBw2smnyS7R6fQk4WE9Tx2w5O5uXpEBDWFKK1qJx7R9nqucIJHJ2I9IKq
 U6qoSGQ2cOuVZzFW1kQM/Q==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:content-transfer-encoding:content-type
 :content-type:date:date:feedback-id:feedback-id:from:from
 :in-reply-to:in-reply-to:message-id:mime-version:references
 :reply-to:subject:subject:to:to:x-me-proxy:x-me-sender
 :x-me-sender:x-sasl-enc; s=fm2; t=1745024535; x=1745110935; bh=l
 3z3btoW6/VZhXdGX1Gwbg0dj4E/KVXZRZZeeosEGTc=; b=mYIF4G7RqdXM0ij7y
 kpLxt1NgmQbS/8Z5r7dYF1YPvDAM6hQKx0nRDkidOCT+R6ik3dO54g+guq3e59RW
 l1T00GWmMyeJHpDYs81l/kpm5wsZo86hzkLh3h7Ies0+AB+UGDwKtzzvq7dVdlsX
 AaclQuFlThSKpEbQU6SowFfIBdCywAAhV1Tuhx9FIF36WbhpYybCwn+HBbxglHAV
 9XgVsvcxGLq2u4XGAjGn3o2a0cTIVll5LbEp1kFVtA4FT+2OyawUas3hmoFP0JXH
 oKxM+0UG6N/1QLQWvX4VoGrXtfEJpzEhgznYe7aVC5Rq4UINTxG9YQCbkyGWy3tY
 YRInQ==
X-ME-Sender: <xms:F_YCaPbZ7UJUexHuFDEmvMsFgcuuBBfP4ua_9n-sHWaqC0lmJna__Q>
 <xme:F_YCaObt1rsA3sRAF2LHw2I69kr5ln6FO8O0XCEvNY73Xtu_3aW-gEBa6utcTtMeY
 XVBkN2lJmmS-t6wURQ>
X-ME-Received: <xmr:F_YCaB9HqM8RlaSXNdUZNqbwISBwyLa6bW4sWxElJpetPxeu9tR3TOVq073bdja8lQ>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddvfeefieeiucetufdoteggodetrf
 dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggv
 pdfurfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucenucfjughrpefkff
 ggfgfuvfhfhfgjtgfgsehtjeertddtvdejnecuhfhrohhmpeffmhhithhrhicuifhuthho
 vhcuoegumhhithhrhiesghhuthhovhdruggvvheqnecuggftrfgrthhtvghrnheptdfhue
 dvtdevleegueelvedvjeevheffveevhedvuefftdefhfdvueeggfetgfdtnecuvehluhhs
 thgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepughmihhtrhihsehguh
 htohhvrdguvghvpdhnsggprhgtphhtthhopeefpdhmohguvgepshhmthhpohhuthdprhgt
 phhtthhopeejjeektdefseguvggssghughhsrdhgnhhurdhorhhgpdhrtghpthhtoheptg
 grshhouhhrihesghhmrghilhdrtghomhdprhgtphhtthhopehhihdqrghnghgvlheshigr
 nhguvgigrdhruh
X-ME-Proxy: <xmx:F_YCaFqOA1Im0a-_Ha14T5kN6GASj05K4K6KzMk02xxu4v-og0XCsA>
 <xmx:F_YCaKo8pKCyndOkHiVKFMuTxDyhbtd4z_zm3bgSzSywBQ-Hqe-QQQ>
 <xmx:F_YCaLQsDc61fWmji7oAFDkUkzQYBR8euLmJ3rF_zmDVSvyNpipxkw>
 <xmx:F_YCaCpSU1JWVwIzcqJzo12e7ozDa_lOXCyvRpkGXG7I5UtSzHTGDw>
 <xmx:F_YCaLcFDI8V0h4WZ8dmPPdbsC8ce1HUP5t31ahV0hOLYNbSgOsiJnDX>
Feedback-ID: i07de48aa:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri,
 18 Apr 2025 21:02:14 -0400 (EDT)
Message-ID: <e88d5c95-ce29-4586-b899-44608e5c67b1@HIDDEN>
Date: Sat, 19 Apr 2025 04:02:11 +0300
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: bug#77803: [PATCH v2] Don't indent variable names to their
 declarator expression (bug#77803)
To: 77803 <at> debbugs.gnu.org, casouri@HIDDEN, Hi-Angel@HIDDEN
References: <6913797600552fba6cc2fdfac2d3aa3b9c1b541a.camel@HIDDEN>
 <86plhdhk5k.fsf@HIDDEN>
 <e99cd75dcd8aafe3e820bc9347658ea732752768.camel@HIDDEN>
 <2d790bd630ff1019984c78a690bd461b0629b02a.camel@HIDDEN>
 <865xj5h4fm.fsf@HIDDEN>
 <6f6a0eca815fde659891e3e95ddfe48e1a46eb67.camel@HIDDEN>
 <97e581262b551a19e08200e5c89608e5b8a6d277.camel@HIDDEN>
 <14A0AFC9-9CB5-4231-BC0F-D4CEAE48EC7B@HIDDEN>
Content-Language: en-US
From: Dmitry Gutov <dmitry@HIDDEN>
In-Reply-To: <14A0AFC9-9CB5-4231-BC0F-D4CEAE48EC7B@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 77803
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

On 19/04/2025 02:43, Yuan Fu wrote:
> Thanks! I personally like the current indentation,

js2-mode has been doing it this way for a number of years (triggered by 
user requests), js-mode followed suit later.

So it's hard to call the current indentation incorrect. Could use a user 
option. Maybe take js2-pretty-multiline-declarations as an example.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#77803; Package emacs. Full text available.

Message received at 77803-done <at> debbugs.gnu.org:


Received: (at 77803-done) by debbugs.gnu.org; 18 Apr 2025 23:43:45 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Apr 18 19:43:45 2025
Received: from localhost ([127.0.0.1]:53294 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1u5vN1-0002DP-RN
	for submit <at> debbugs.gnu.org; Fri, 18 Apr 2025 19:43:45 -0400
Received: from mail-pf1-x42d.google.com ([2607:f8b0:4864:20::42d]:59736)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <casouri@HIDDEN>) id 1u5vMu-0002BN-3V
 for 77803-done <at> debbugs.gnu.org; Fri, 18 Apr 2025 19:43:38 -0400
Received: by mail-pf1-x42d.google.com with SMTP id
 d2e1a72fcca58-7376e311086so3162840b3a.3
 for <77803-done <at> debbugs.gnu.org>; Fri, 18 Apr 2025 16:43:36 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1745019810; x=1745624610; darn=debbugs.gnu.org;
 h=references:to:cc:in-reply-to:date:subject:mime-version:message-id
 :from:from:to:cc:subject:date:message-id:reply-to;
 bh=Rwz+LSurObClrqGTpreoduLILJgRx7kS6TvfOianNA8=;
 b=fCaxYs+DjQ9S946JhLQclOzRJ4RoraB+tpR7/x/DtETOF7yGu53XywyxbsEwGhaL0k
 i5Dd+fYrJAU7dkE5LTA/P1DOrxuQNPj2t6MGnXQQz0ClOgKvmnM5EJ6MAzgTIUzMrhLT
 sQN6DlwxPti32kdZNT9sDwDj4wHdXvygHSFg31kJKde2KAhs6hCAzqgbf+961ifzsSy7
 0z0HyWrFQ0uL9/AwlmagHy5+XOOGz0ZAUlQr6FKVWERYy/aXwgjXlCrgV/zf7HboXJ+a
 vmZ7ie34BcwY/BI9dDkFpFNeCOT+eI6f78S9kqTD9r/hUknIXGC66oegxe7o6cG/GH8r
 BNdQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1745019810; x=1745624610;
 h=references:to:cc:in-reply-to:date:subject:mime-version:message-id
 :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;
 bh=Rwz+LSurObClrqGTpreoduLILJgRx7kS6TvfOianNA8=;
 b=tlnjuwdZ15vXncBRepYFEjBjx8OxuLGais6pOPz8AtIY6t8SCKJsECA3M0juWG6kxg
 E6btKVz3I+R9sbV9jFIPrLWQMWiP7877V+x4EJk7hWjX7F9Mg5T/X1H53KHuTxUIYrcJ
 qGGrQO5T03NSezkcqG+LrjAUbsxGKUMm/KbpZOFALGEyG4uKbNzUM5Y5LwVkNsm2n+Se
 KoLWtpoutDj/BGTLacXu0UQc0wKmCoReW3RlNOqdyG5UhH1dJHfWuBy5tuGtd4xNtSst
 TQ/H8ugVKXCKC6oIpFj1buoAPU+yvEAXfPtWNDS88JHQVtdg2mEoimqvX8AP7+qQ8kHS
 KndA==
X-Forwarded-Encrypted: i=1;
 AJvYcCV8jyDto6ZRn74YZgiS6g01rdUuJ38qWz3yI1DhGsDYzMCWX3hmMHXVTZue+I60jcTQO9ZmxijxmFg1 <at> debbugs.gnu.org
X-Gm-Message-State: AOJu0Yy2jp4Iu+p00EOK0hyqdIxiOa5tzjYDQcvZSk0VjNESGIUvj5Ga
 ZzB1MdvJvfCJYUuqLjhKR5I/FkBD5zRbTu2NB/JLV/IMqBpOS/4W
X-Gm-Gg: ASbGnct0RnkcFHFNGE2IGLxcKi1nakfWXByJHoCfQU56Hbgr4ZZiBfAK6wQlIOxdKMI
 V1u0SIV4QEsbqJHrPiZsZSXg1glwSuGsdmCfJ/fbBmBY7xt76Mj9/hhbrdrBCjDl9LxniUNNtkv
 ogo/V+xku/Dv1GglrA9oia9v2z3vtgmw2xD7vDlo418KrYqRURdHZS1Qs+ZoadEoe03hO3iNIxA
 9bXrFCsNu+o6gRjsSSaNJ7cR6pyqQh/TR+1iIkVbkypR/+znOQVQ1bFUfUd7PtJGhWeKslR3Lrz
 EgXgV6hzJNUO+qtfhNBT4nLZlZWAVZ1OtOVByX3H7YgxdHcQql65VWKa6j4UXZs=
X-Google-Smtp-Source: AGHT+IFP8toms1h1nHt+GejI9kTvhCrnvXro3Iyu/PgNX8uj6XAVXEQ/wmWUMiWO5xMTv7LFb7OIIg==
X-Received: by 2002:a05:6a21:3944:b0:1f5:67e2:7790 with SMTP id
 adf61e73a8af0-203cbc5a227mr6916394637.17.1745019809690; 
 Fri, 18 Apr 2025 16:43:29 -0700 (PDT)
Received: from smtpclient.apple ([2601:646:8f81:6120:fcfe:cddd:f55:38ad])
 by smtp.gmail.com with ESMTPSA id
 41be03b00d2f7-b0db1271825sm1906411a12.3.2025.04.18.16.43.28
 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128);
 Fri, 18 Apr 2025 16:43:28 -0700 (PDT)
From: Yuan Fu <casouri@HIDDEN>
Message-Id: <14A0AFC9-9CB5-4231-BC0F-D4CEAE48EC7B@HIDDEN>
Content-Type: multipart/mixed;
 boundary="Apple-Mail=_284EF3A9-611A-4BF0-8979-E441C6E04FEC"
Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3826.400.131.1.6\))
Subject: Re: bug#77803: [PATCH v2] Don't indent variable names to their
 declarator expression (bug#77803)
Date: Fri, 18 Apr 2025 16:43:17 -0700
In-Reply-To: <97e581262b551a19e08200e5c89608e5b8a6d277.camel@HIDDEN>
To: Konstantin Kharlamov <Hi-Angel@HIDDEN>
References: <6913797600552fba6cc2fdfac2d3aa3b9c1b541a.camel@HIDDEN>
 <86plhdhk5k.fsf@HIDDEN>
 <e99cd75dcd8aafe3e820bc9347658ea732752768.camel@HIDDEN>
 <2d790bd630ff1019984c78a690bd461b0629b02a.camel@HIDDEN>
 <865xj5h4fm.fsf@HIDDEN>
 <6f6a0eca815fde659891e3e95ddfe48e1a46eb67.camel@HIDDEN>
 <97e581262b551a19e08200e5c89608e5b8a6d277.camel@HIDDEN>
X-Mailer: Apple Mail (2.3826.400.131.1.6)
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 77803-done
Cc: Eli Zaretskii <eliz@HIDDEN>, theo@HIDDEN, 77803-done <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)


--Apple-Mail=_284EF3A9-611A-4BF0-8979-E441C6E04FEC
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=utf-8



> On Apr 15, 2025, at 10:09=E2=80=AFPM, Konstantin Kharlamov =
<Hi-Angel@HIDDEN> wrote:
>=20
> On Tue, 2025-04-15 at 17:53 +0300, Konstantin Kharlamov wrote:
>> On Tue, 2025-04-15 at 17:42 +0300, Eli Zaretskii wrote:
>>>=20
>>> Try
>>>       make -C test lisp/progmodes/typescript-ts-mode-tests
>>=20
>> Thank you, please see the patch!
>=20
> v2: no code change, just noticed a typo in patch description, a "one
> space" instead of "two spaces" after the dot, and a missing dot in the
> final sentence: fixed.

--Apple-Mail=_284EF3A9-611A-4BF0-8979-E441C6E04FEC
Content-Disposition: attachment;
	filename=1.patch
Content-Type: text/x-patch;
	x-unix-mode=0644;
	name="1.patch"
Content-Transfer-Encoding: quoted-printable

=46rom 036125357f2c7a7d476516516ec8060fcb82ca77 Mon Sep 17 00:00:00 2001
From: Konstantin Kharlamov <Hi-Angel@HIDDEN>
Date: Tue, 15 Apr 2025 17:34:11 +0300
Subject: [PATCH v2] Don't indent variable names to their declarator =
expression
 (bug#77803)

Before this commit in code like:

    const a =3D 1,
          b =3D 2;

the b would get indented to `const'.  Similarly for `var' and `let'.
The expected behavior instead is getting indented to
`typescript-ts-mode-indent-offset'.

* lisp/progmodes/typescript-ts-mode.el
(typescript-ts-mode--indent-rules): indent identifiers declarations to
`typescript-ts-mode-indent-offset'.
* test/lisp/progmodes/typescript-ts-mode-resources/indent.erts
(Lexical and variable declarations): update test accordingly.
---
 lisp/progmodes/typescript-ts-mode.el          |  2 +-
 .../typescript-ts-mode-resources/indent.erts  | 28 +++++++++----------
 2 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/lisp/progmodes/typescript-ts-mode.el =
b/lisp/progmodes/typescript-ts-mode.el
index bc4b635735f..590d2b55235 100644
--- a/lisp/progmodes/typescript-ts-mode.el
+++ b/lisp/progmodes/typescript-ts-mode.el
@@ -140,7 +140,7 @@ typescript-ts-mode--indent-rules
      ((parent-is "type_arguments") parent-bol =
typescript-ts-mode-indent-offset)
      ((parent-is "type_parameters") parent-bol =
typescript-ts-mode-indent-offset)
      ((parent-is ,(rx (or "variable" "lexical") "_" (or "declaration" =
"declarator")))
-      typescript-ts-mode--anchor-decl 1)
+      parent-bol typescript-ts-mode-indent-offset)
      ((parent-is "arguments") parent-bol =
typescript-ts-mode-indent-offset)
      ((parent-is "array") parent-bol typescript-ts-mode-indent-offset)
      ((parent-is "formal_parameters") parent-bol =
typescript-ts-mode-indent-offset)
diff --git =
a/test/lisp/progmodes/typescript-ts-mode-resources/indent.erts =
b/test/lisp/progmodes/typescript-ts-mode-resources/indent.erts
index 0db35295222..1305029a9e1 100644
--- a/test/lisp/progmodes/typescript-ts-mode-resources/indent.erts
+++ b/test/lisp/progmodes/typescript-ts-mode-resources/indent.erts
@@ -67,22 +67,22 @@ Name: Lexical and variable declarations
 =3D-=3D
 const foo =3D () =3D> {
   let x =3D 1,
-      yyyy: {
-        [k: string | number]: string,
-      } =3D {
-        "foo": "foo",
-        "bar": "bar",
-      };
+    yyyy: {
+      [k: string | number]: string,
+    } =3D {
+      "foo": "foo",
+      "bar": "bar",
+    };
   var obar =3D 1,
-      fo: { [x: any]: any } =3D {
-        "a": 1,
-        "b": 2,
-      };
+    fo: { [x: any]: any } =3D {
+      "a": 1,
+      "b": 2,
+    };
   const cccc =3D 1,
-        bbb =3D {
-          "x": 0
-        },
-        ddddd =3D 0;
+    bbb =3D {
+      "x": 0
+    },
+    ddddd =3D 0;
   // First decls with value starting on same line
   const a =3D (x: string): string =3D> {
     return x + x;
--=20
2.49.0


--Apple-Mail=_284EF3A9-611A-4BF0-8979-E441C6E04FEC
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=us-ascii


Thanks! I personally like the current indentation, but indeed other =
editors, and more importantly prettier, indents like what your patch =
implemented. I applied the patch to emacs-30 and pushed.

Yuan=

--Apple-Mail=_284EF3A9-611A-4BF0-8979-E441C6E04FEC--




Notification sent to Konstantin Kharlamov <Hi-Angel@HIDDEN>:
bug acknowledged by developer. Full text available.
Reply sent to Yuan Fu <casouri@HIDDEN>:
You have taken responsibility. Full text available.

Message received at 77803 <at> debbugs.gnu.org:


Received: (at 77803) by debbugs.gnu.org; 16 Apr 2025 05:09:12 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Apr 16 01:09:11 2025
Received: from localhost ([127.0.0.1]:60837 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1u4v1L-0005WF-GT
	for submit <at> debbugs.gnu.org; Wed, 16 Apr 2025 01:09:11 -0400
Received: from forward502d.mail.yandex.net
 ([2a02:6b8:c41:1300:1:45:d181:d502]:51764)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <hi-angel@HIDDEN>)
 id 1u4v1J-0005Vw-6D
 for 77803 <at> debbugs.gnu.org; Wed, 16 Apr 2025 01:09:09 -0400
Received: from mail-nwsmtp-smtp-production-main-84.klg.yp-c.yandex.net
 (mail-nwsmtp-smtp-production-main-84.klg.yp-c.yandex.net
 [IPv6:2a02:6b8:c42:8741:0:640:b274:0])
 by forward502d.mail.yandex.net (Yandex) with ESMTPS id C1B4E6169A;
 Wed, 16 Apr 2025 08:09:02 +0300 (MSK)
Received: by mail-nwsmtp-smtp-production-main-84.klg.yp-c.yandex.net
 (smtp/Yandex) with ESMTPSA id 19AnWaALfCg0-XNJF1VZR; 
 Wed, 16 Apr 2025 08:09:02 +0300
X-Yandex-Fwd: 1
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail;
 t=1744780142; bh=3ZV42l+MDgL+GkzDPTrbU7NhUCwmi84yuwkNk8lTSrE=;
 h=Date:In-Reply-To:Cc:References:To:From:Subject:Message-ID;
 b=elum+fNeJVckPEMUY3KPh+l+L8T1XNvBwuSQUkDzHExc7qkd5YQqJNry2RheDiFq7
 SsHM/9dDgCuyrBovNcGzqvcNcWTCWd81ppbHieM1ZN1ytODLiuIwe+yfIQ7AwdQW5a
 bkYj4eFSGqLL6JqoPZBQSXo0bBe/Qibd0Vu2gou4=
Authentication-Results: mail-nwsmtp-smtp-production-main-84.klg.yp-c.yandex.net;
 dkim=pass header.i=@yandex.ru
Message-ID: <97e581262b551a19e08200e5c89608e5b8a6d277.camel@HIDDEN>
Subject: Re: [PATCH v2] Don't indent variable names to their declarator
 expression (bug#77803)
From: Konstantin Kharlamov <Hi-Angel@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Date: Wed, 16 Apr 2025 08:09:00 +0300
In-Reply-To: <6f6a0eca815fde659891e3e95ddfe48e1a46eb67.camel@HIDDEN>
References: <6913797600552fba6cc2fdfac2d3aa3b9c1b541a.camel@HIDDEN>
 <86plhdhk5k.fsf@HIDDEN>
 <e99cd75dcd8aafe3e820bc9347658ea732752768.camel@HIDDEN>
 <2d790bd630ff1019984c78a690bd461b0629b02a.camel@HIDDEN>
 <865xj5h4fm.fsf@HIDDEN>
 <6f6a0eca815fde659891e3e95ddfe48e1a46eb67.camel@HIDDEN>
Content-Type: multipart/mixed; boundary="=-NCI0JNOW7UsEqNZVaOBz"
User-Agent: Evolution 3.56.0 
MIME-Version: 1.0
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 77803
Cc: casouri@HIDDEN, theo@HIDDEN, 77803 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

--=-NCI0JNOW7UsEqNZVaOBz
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

On Tue, 2025-04-15 at 17:53 +0300, Konstantin Kharlamov wrote:
> On Tue, 2025-04-15 at 17:42 +0300, Eli Zaretskii wrote:
> >=20
> > Try
> > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 make -C test lisp/progmodes/typescript-t=
s-mode-tests
>=20
> Thank you, please see the patch!

v2: no code change, just noticed a typo in patch description, a "one
space" instead of "two spaces" after the dot, and a missing dot in the
final sentence: fixed.

--=-NCI0JNOW7UsEqNZVaOBz
Content-Disposition: attachment; filename="1.patch"
Content-Type: text/x-patch; name="1.patch"; charset="UTF-8"
Content-Transfer-Encoding: base64

RnJvbSAwMzYxMjUzNTdmMmM3YTdkNDc2NTE2NTE2ZWM4MDYwZmNiODJjYTc3IE1vbiBTZXAgMTcg
MDA6MDA6MDAgMjAwMQpGcm9tOiBLb25zdGFudGluIEtoYXJsYW1vdiA8SGktQW5nZWxAeWFuZGV4
LnJ1PgpEYXRlOiBUdWUsIDE1IEFwciAyMDI1IDE3OjM0OjExICswMzAwClN1YmplY3Q6IFtQQVRD
SCB2Ml0gRG9uJ3QgaW5kZW50IHZhcmlhYmxlIG5hbWVzIHRvIHRoZWlyIGRlY2xhcmF0b3IgZXhw
cmVzc2lvbgogKGJ1ZyM3NzgwMykKCkJlZm9yZSB0aGlzIGNvbW1pdCBpbiBjb2RlIGxpa2U6Cgog
ICAgY29uc3QgYSA9IDEsCiAgICAgICAgICBiID0gMjsKCnRoZSBiIHdvdWxkIGdldCBpbmRlbnRl
ZCB0byBgY29uc3QnLiAgU2ltaWxhcmx5IGZvciBgdmFyJyBhbmQgYGxldCcuClRoZSBleHBlY3Rl
ZCBiZWhhdmlvciBpbnN0ZWFkIGlzIGdldHRpbmcgaW5kZW50ZWQgdG8KYHR5cGVzY3JpcHQtdHMt
bW9kZS1pbmRlbnQtb2Zmc2V0Jy4KCiogbGlzcC9wcm9nbW9kZXMvdHlwZXNjcmlwdC10cy1tb2Rl
LmVsCih0eXBlc2NyaXB0LXRzLW1vZGUtLWluZGVudC1ydWxlcyk6IGluZGVudCBpZGVudGlmaWVy
cyBkZWNsYXJhdGlvbnMgdG8KYHR5cGVzY3JpcHQtdHMtbW9kZS1pbmRlbnQtb2Zmc2V0Jy4KKiB0
ZXN0L2xpc3AvcHJvZ21vZGVzL3R5cGVzY3JpcHQtdHMtbW9kZS1yZXNvdXJjZXMvaW5kZW50LmVy
dHMKKExleGljYWwgYW5kIHZhcmlhYmxlIGRlY2xhcmF0aW9ucyk6IHVwZGF0ZSB0ZXN0IGFjY29y
ZGluZ2x5LgotLS0KIGxpc3AvcHJvZ21vZGVzL3R5cGVzY3JpcHQtdHMtbW9kZS5lbCAgICAgICAg
ICB8ICAyICstCiAuLi4vdHlwZXNjcmlwdC10cy1tb2RlLXJlc291cmNlcy9pbmRlbnQuZXJ0cyAg
fCAyOCArKysrKysrKystLS0tLS0tLS0tCiAyIGZpbGVzIGNoYW5nZWQsIDE1IGluc2VydGlvbnMo
KyksIDE1IGRlbGV0aW9ucygtKQoKZGlmZiAtLWdpdCBhL2xpc3AvcHJvZ21vZGVzL3R5cGVzY3Jp
cHQtdHMtbW9kZS5lbCBiL2xpc3AvcHJvZ21vZGVzL3R5cGVzY3JpcHQtdHMtbW9kZS5lbAppbmRl
eCBiYzRiNjM1NzM1Zi4uNTkwZDJiNTUyMzUgMTAwNjQ0Ci0tLSBhL2xpc3AvcHJvZ21vZGVzL3R5
cGVzY3JpcHQtdHMtbW9kZS5lbAorKysgYi9saXNwL3Byb2dtb2Rlcy90eXBlc2NyaXB0LXRzLW1v
ZGUuZWwKQEAgLTE0MCw3ICsxNDAsNyBAQCB0eXBlc2NyaXB0LXRzLW1vZGUtLWluZGVudC1ydWxl
cwogICAgICAoKHBhcmVudC1pcyAidHlwZV9hcmd1bWVudHMiKSBwYXJlbnQtYm9sIHR5cGVzY3Jp
cHQtdHMtbW9kZS1pbmRlbnQtb2Zmc2V0KQogICAgICAoKHBhcmVudC1pcyAidHlwZV9wYXJhbWV0
ZXJzIikgcGFyZW50LWJvbCB0eXBlc2NyaXB0LXRzLW1vZGUtaW5kZW50LW9mZnNldCkKICAgICAg
KChwYXJlbnQtaXMgLChyeCAob3IgInZhcmlhYmxlIiAibGV4aWNhbCIpICJfIiAob3IgImRlY2xh
cmF0aW9uIiAiZGVjbGFyYXRvciIpKSkKLSAgICAgIHR5cGVzY3JpcHQtdHMtbW9kZS0tYW5jaG9y
LWRlY2wgMSkKKyAgICAgIHBhcmVudC1ib2wgdHlwZXNjcmlwdC10cy1tb2RlLWluZGVudC1vZmZz
ZXQpCiAgICAgICgocGFyZW50LWlzICJhcmd1bWVudHMiKSBwYXJlbnQtYm9sIHR5cGVzY3JpcHQt
dHMtbW9kZS1pbmRlbnQtb2Zmc2V0KQogICAgICAoKHBhcmVudC1pcyAiYXJyYXkiKSBwYXJlbnQt
Ym9sIHR5cGVzY3JpcHQtdHMtbW9kZS1pbmRlbnQtb2Zmc2V0KQogICAgICAoKHBhcmVudC1pcyAi
Zm9ybWFsX3BhcmFtZXRlcnMiKSBwYXJlbnQtYm9sIHR5cGVzY3JpcHQtdHMtbW9kZS1pbmRlbnQt
b2Zmc2V0KQpkaWZmIC0tZ2l0IGEvdGVzdC9saXNwL3Byb2dtb2Rlcy90eXBlc2NyaXB0LXRzLW1v
ZGUtcmVzb3VyY2VzL2luZGVudC5lcnRzIGIvdGVzdC9saXNwL3Byb2dtb2Rlcy90eXBlc2NyaXB0
LXRzLW1vZGUtcmVzb3VyY2VzL2luZGVudC5lcnRzCmluZGV4IDBkYjM1Mjk1MjIyLi4xMzA1MDI5
YTllMSAxMDA2NDQKLS0tIGEvdGVzdC9saXNwL3Byb2dtb2Rlcy90eXBlc2NyaXB0LXRzLW1vZGUt
cmVzb3VyY2VzL2luZGVudC5lcnRzCisrKyBiL3Rlc3QvbGlzcC9wcm9nbW9kZXMvdHlwZXNjcmlw
dC10cy1tb2RlLXJlc291cmNlcy9pbmRlbnQuZXJ0cwpAQCAtNjcsMjIgKzY3LDIyIEBAIE5hbWU6
IExleGljYWwgYW5kIHZhcmlhYmxlIGRlY2xhcmF0aW9ucwogPS09CiBjb25zdCBmb28gPSAoKSA9
PiB7CiAgIGxldCB4ID0gMSwKLSAgICAgIHl5eXk6IHsKLSAgICAgICAgW2s6IHN0cmluZyB8IG51
bWJlcl06IHN0cmluZywKLSAgICAgIH0gPSB7Ci0gICAgICAgICJmb28iOiAiZm9vIiwKLSAgICAg
ICAgImJhciI6ICJiYXIiLAotICAgICAgfTsKKyAgICB5eXl5OiB7CisgICAgICBbazogc3RyaW5n
IHwgbnVtYmVyXTogc3RyaW5nLAorICAgIH0gPSB7CisgICAgICAiZm9vIjogImZvbyIsCisgICAg
ICAiYmFyIjogImJhciIsCisgICAgfTsKICAgdmFyIG9iYXIgPSAxLAotICAgICAgZm86IHsgW3g6
IGFueV06IGFueSB9ID0gewotICAgICAgICAiYSI6IDEsCi0gICAgICAgICJiIjogMiwKLSAgICAg
IH07CisgICAgZm86IHsgW3g6IGFueV06IGFueSB9ID0geworICAgICAgImEiOiAxLAorICAgICAg
ImIiOiAyLAorICAgIH07CiAgIGNvbnN0IGNjY2MgPSAxLAotICAgICAgICBiYmIgPSB7Ci0gICAg
ICAgICAgIngiOiAwCi0gICAgICAgIH0sCi0gICAgICAgIGRkZGRkID0gMDsKKyAgICBiYmIgPSB7
CisgICAgICAieCI6IDAKKyAgICB9LAorICAgIGRkZGRkID0gMDsKICAgLy8gRmlyc3QgZGVjbHMg
d2l0aCB2YWx1ZSBzdGFydGluZyBvbiBzYW1lIGxpbmUKICAgY29uc3QgYSA9ICh4OiBzdHJpbmcp
OiBzdHJpbmcgPT4gewogICAgIHJldHVybiB4ICsgeDsKLS0gCjIuNDkuMAoK


--=-NCI0JNOW7UsEqNZVaOBz--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#77803; Package emacs. Full text available.

Message received at 77803 <at> debbugs.gnu.org:


Received: (at 77803) by debbugs.gnu.org; 15 Apr 2025 14:53:57 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Apr 15 10:53:57 2025
Received: from localhost ([127.0.0.1]:53330 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1u4hfg-0000md-I5
	for submit <at> debbugs.gnu.org; Tue, 15 Apr 2025 10:53:57 -0400
Received: from forward501a.mail.yandex.net
 ([2a02:6b8:c0e:500:1:45:d181:d501]:33576)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <hi-angel@HIDDEN>)
 id 1u4hfc-0000lo-V0
 for 77803 <at> debbugs.gnu.org; Tue, 15 Apr 2025 10:53:54 -0400
Received: from mail-nwsmtp-smtp-production-main-76.iva.yp-c.yandex.net
 (mail-nwsmtp-smtp-production-main-76.iva.yp-c.yandex.net
 [IPv6:2a02:6b8:c0c:6905:0:640:c8fc:0])
 by forward501a.mail.yandex.net (Yandex) with ESMTPS id 5449360B47;
 Tue, 15 Apr 2025 17:53:46 +0300 (MSK)
Received: by mail-nwsmtp-smtp-production-main-76.iva.yp-c.yandex.net
 (smtp/Yandex) with ESMTPSA id irIanZ1LhuQ0-NT9FpHe0; 
 Tue, 15 Apr 2025 17:53:45 +0300
X-Yandex-Fwd: 1
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail;
 t=1744728825; bh=XSPdIIPoJM2FNODUpRvS9KprdcXxWSR5G5nRGO/sT1o=;
 h=Date:In-Reply-To:Cc:References:To:From:Subject:Message-ID;
 b=VK/Ocz/0UgGOyaLN94RzXw5FSBj7MNDKIxczYyh1EPLXOEgFov8G87+DP1t9Fjc9g
 Fzo0HCQdTdIPAm7Jx3SGtf0alYlNXAj424oULaL5Jb7aW+vST+oaSKmLZ9b8+fjHgm
 +70kg7JmG35lWixMyWtyHR2ZJ/eFcD8ysxVcCtFs=
Authentication-Results: mail-nwsmtp-smtp-production-main-76.iva.yp-c.yandex.net;
 dkim=pass header.i=@yandex.ru
Message-ID: <6f6a0eca815fde659891e3e95ddfe48e1a46eb67.camel@HIDDEN>
Subject: [PATCH] Don't indent variable names to their declarator expression
 (bug#77803)
From: Konstantin Kharlamov <Hi-Angel@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Date: Tue, 15 Apr 2025 17:53:44 +0300
In-Reply-To: <865xj5h4fm.fsf@HIDDEN>
References: <6913797600552fba6cc2fdfac2d3aa3b9c1b541a.camel@HIDDEN>
 <86plhdhk5k.fsf@HIDDEN>
 <e99cd75dcd8aafe3e820bc9347658ea732752768.camel@HIDDEN>
 <2d790bd630ff1019984c78a690bd461b0629b02a.camel@HIDDEN>
 <865xj5h4fm.fsf@HIDDEN>
Content-Type: multipart/mixed; boundary="=-4pxizS3YKvpJHVRIXOz1"
User-Agent: Evolution 3.56.0 
MIME-Version: 1.0
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 77803
Cc: casouri@HIDDEN, theo@HIDDEN, 77803 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

--=-4pxizS3YKvpJHVRIXOz1
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

On Tue, 2025-04-15 at 17:42 +0300, Eli Zaretskii wrote:
>=20
> Try
> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 make -C test lisp/progmodes/typescript-ts-=
mode-tests

Thank you, please see the patch!

--=-4pxizS3YKvpJHVRIXOz1
Content-Disposition: attachment; filename="1.patch"
Content-Transfer-Encoding: base64
Content-Type: text/x-patch; name="1.patch"; charset="UTF-8"

RnJvbSA0YmY1OGM1MDRjNDk0ODg5MTA5MTZmOGZjNjcwMzExMDkzOWUxMzhiIE1vbiBTZXAgMTcg
MDA6MDA6MDAgMjAwMQpGcm9tOiBLb25zdGFudGluIEtoYXJsYW1vdiA8SGktQW5nZWxAeWFuZGV4
LnJ1PgpEYXRlOiBUdWUsIDE1IEFwciAyMDI1IDE3OjM0OjExICswMzAwClN1YmplY3Q6IFtQQVRD
SF0gRG9uJ3QgaW5kZW50IHZhcmlhYmxlIG5hbWVzIHRvIHRoZWlyIGRlY2xhcmF0b3IgZXhwcmVz
c2lvbgogKGJ1ZyM3NzgwMykKCkJlZm9yZSB0aGlzIGNvbW1pdCBpbiBjb2RlIGxpa2U6CgogICAg
Y29uc3QgYSA9IDEsCiAgICAgICAgICBiID0gMjsKCnRoZSBiIHdvdWxkIGdldCBpbmRlbnRlZCB0
byBgY29uc3QnLiBTaW1pbGFybHkgZm9yIGB2YXInIGFuZApgbGV0Jy4gVGhlIGV4cGVjdGVkIGJl
aGF2aW9yIGluc3RlYWQgaXMgZ2V0dGluZyBpbmRlbnRlZCB0bwpgdHlwZXNjcmlwdC10cy1tb2Rl
LWluZGVudC1vZmZzZXQnLgoKKiBsaXNwL3Byb2dtb2Rlcy90eXBlc2NyaXB0LXRzLW1vZGUuZWwK
KHR5cGVzY3JpcHQtdHMtbW9kZS0taW5kZW50LXJ1bGVzKTogaW5kZW50IGlkZW50aWZpZXJzIGRl
Y2xhcmF0aW9ucyB0bwpgdHlwZXNjcmlwdC10cy1tb2RlLWluZGVudC1vZmZzZXQnLgoqIHRlc3Qv
bGlzcC9wcm9nbW9kZXMvdHlwZXNjcmlwdC10cy1tb2RlLXJlc291cmNlcy9pbmRlbnQuZXJ0cwoo
TGV4aWNhbCBhbmQgdmFyaWFibGUgZGVjbGFyYXRpb25zKTogdXBkYXRlIHRlc3QgYWNjb3JhZGlu
Z2x5Ci0tLQogbGlzcC9wcm9nbW9kZXMvdHlwZXNjcmlwdC10cy1tb2RlLmVsICAgICAgICAgIHwg
IDIgKy0KIC4uLi90eXBlc2NyaXB0LXRzLW1vZGUtcmVzb3VyY2VzL2luZGVudC5lcnRzICB8IDI4
ICsrKysrKysrKy0tLS0tLS0tLS0KIDIgZmlsZXMgY2hhbmdlZCwgMTUgaW5zZXJ0aW9ucygrKSwg
MTUgZGVsZXRpb25zKC0pCgpkaWZmIC0tZ2l0IGEvbGlzcC9wcm9nbW9kZXMvdHlwZXNjcmlwdC10
cy1tb2RlLmVsIGIvbGlzcC9wcm9nbW9kZXMvdHlwZXNjcmlwdC10cy1tb2RlLmVsCmluZGV4IGJj
NGI2MzU3MzVmLi41OTBkMmI1NTIzNSAxMDA2NDQKLS0tIGEvbGlzcC9wcm9nbW9kZXMvdHlwZXNj
cmlwdC10cy1tb2RlLmVsCisrKyBiL2xpc3AvcHJvZ21vZGVzL3R5cGVzY3JpcHQtdHMtbW9kZS5l
bApAQCAtMTQwLDcgKzE0MCw3IEBAIHR5cGVzY3JpcHQtdHMtbW9kZS0taW5kZW50LXJ1bGVzCiAg
ICAgICgocGFyZW50LWlzICJ0eXBlX2FyZ3VtZW50cyIpIHBhcmVudC1ib2wgdHlwZXNjcmlwdC10
cy1tb2RlLWluZGVudC1vZmZzZXQpCiAgICAgICgocGFyZW50LWlzICJ0eXBlX3BhcmFtZXRlcnMi
KSBwYXJlbnQtYm9sIHR5cGVzY3JpcHQtdHMtbW9kZS1pbmRlbnQtb2Zmc2V0KQogICAgICAoKHBh
cmVudC1pcyAsKHJ4IChvciAidmFyaWFibGUiICJsZXhpY2FsIikgIl8iIChvciAiZGVjbGFyYXRp
b24iICJkZWNsYXJhdG9yIikpKQotICAgICAgdHlwZXNjcmlwdC10cy1tb2RlLS1hbmNob3ItZGVj
bCAxKQorICAgICAgcGFyZW50LWJvbCB0eXBlc2NyaXB0LXRzLW1vZGUtaW5kZW50LW9mZnNldCkK
ICAgICAgKChwYXJlbnQtaXMgImFyZ3VtZW50cyIpIHBhcmVudC1ib2wgdHlwZXNjcmlwdC10cy1t
b2RlLWluZGVudC1vZmZzZXQpCiAgICAgICgocGFyZW50LWlzICJhcnJheSIpIHBhcmVudC1ib2wg
dHlwZXNjcmlwdC10cy1tb2RlLWluZGVudC1vZmZzZXQpCiAgICAgICgocGFyZW50LWlzICJmb3Jt
YWxfcGFyYW1ldGVycyIpIHBhcmVudC1ib2wgdHlwZXNjcmlwdC10cy1tb2RlLWluZGVudC1vZmZz
ZXQpCmRpZmYgLS1naXQgYS90ZXN0L2xpc3AvcHJvZ21vZGVzL3R5cGVzY3JpcHQtdHMtbW9kZS1y
ZXNvdXJjZXMvaW5kZW50LmVydHMgYi90ZXN0L2xpc3AvcHJvZ21vZGVzL3R5cGVzY3JpcHQtdHMt
bW9kZS1yZXNvdXJjZXMvaW5kZW50LmVydHMKaW5kZXggMGRiMzUyOTUyMjIuLjEzMDUwMjlhOWUx
IDEwMDY0NAotLS0gYS90ZXN0L2xpc3AvcHJvZ21vZGVzL3R5cGVzY3JpcHQtdHMtbW9kZS1yZXNv
dXJjZXMvaW5kZW50LmVydHMKKysrIGIvdGVzdC9saXNwL3Byb2dtb2Rlcy90eXBlc2NyaXB0LXRz
LW1vZGUtcmVzb3VyY2VzL2luZGVudC5lcnRzCkBAIC02NywyMiArNjcsMjIgQEAgTmFtZTogTGV4
aWNhbCBhbmQgdmFyaWFibGUgZGVjbGFyYXRpb25zCiA9LT0KIGNvbnN0IGZvbyA9ICgpID0+IHsK
ICAgbGV0IHggPSAxLAotICAgICAgeXl5eTogewotICAgICAgICBbazogc3RyaW5nIHwgbnVtYmVy
XTogc3RyaW5nLAotICAgICAgfSA9IHsKLSAgICAgICAgImZvbyI6ICJmb28iLAotICAgICAgICAi
YmFyIjogImJhciIsCi0gICAgICB9OworICAgIHl5eXk6IHsKKyAgICAgIFtrOiBzdHJpbmcgfCBu
dW1iZXJdOiBzdHJpbmcsCisgICAgfSA9IHsKKyAgICAgICJmb28iOiAiZm9vIiwKKyAgICAgICJi
YXIiOiAiYmFyIiwKKyAgICB9OwogICB2YXIgb2JhciA9IDEsCi0gICAgICBmbzogeyBbeDogYW55
XTogYW55IH0gPSB7Ci0gICAgICAgICJhIjogMSwKLSAgICAgICAgImIiOiAyLAotICAgICAgfTsK
KyAgICBmbzogeyBbeDogYW55XTogYW55IH0gPSB7CisgICAgICAiYSI6IDEsCisgICAgICAiYiI6
IDIsCisgICAgfTsKICAgY29uc3QgY2NjYyA9IDEsCi0gICAgICAgIGJiYiA9IHsKLSAgICAgICAg
ICAieCI6IDAKLSAgICAgICAgfSwKLSAgICAgICAgZGRkZGQgPSAwOworICAgIGJiYiA9IHsKKyAg
ICAgICJ4IjogMAorICAgIH0sCisgICAgZGRkZGQgPSAwOwogICAvLyBGaXJzdCBkZWNscyB3aXRo
IHZhbHVlIHN0YXJ0aW5nIG9uIHNhbWUgbGluZQogICBjb25zdCBhID0gKHg6IHN0cmluZyk6IHN0
cmluZyA9PiB7CiAgICAgcmV0dXJuIHggKyB4OwotLSAKMi40OS4wCgo=


--=-4pxizS3YKvpJHVRIXOz1--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#77803; Package emacs. Full text available.

Message received at 77803 <at> debbugs.gnu.org:


Received: (at 77803) by debbugs.gnu.org; 15 Apr 2025 14:43:08 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Apr 15 10:43:08 2025
Received: from localhost ([127.0.0.1]:53185 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1u4hVD-00085n-2D
	for submit <at> debbugs.gnu.org; Tue, 15 Apr 2025 10:43:07 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:48730)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1u4hV9-00084e-Q6
 for 77803 <at> debbugs.gnu.org; Tue, 15 Apr 2025 10:43:04 -0400
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 <eliz@HIDDEN>)
 id 1u4hV4-0008Os-1X; Tue, 15 Apr 2025 10:42:58 -0400
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=cRU3sYSxGGNw0H8pHTzhPBfYjQAvOkTvk+EwrFzGyW0=; b=V4bv4SA1FrvuZvi0glds
 SBnrSRuS1Q8k6R/L5d8NAGK2t1lFlDITTSdPdnEl6hmMJhf8ZzMwYWK8pjdSj5AB1vfWsmMy4kPEO
 MexBr/eo4GY77Av/YhKPQH4/J61WuZahT6/xrMo2oR+6PrY9W3A85Su87tBa2NmallX/ix2hLk4S0
 oUA8HI4m3zknJxmPH4BoP2FxHaBzMeM41+1lqGhqMNCdk89B5WqFhkeyjlS8Diy9GolFnExLccGLX
 V9LIh9i7OQ7MOOYGT8S29mrpZ3ZBmTKsAWy4p38LlFHrUAuYBHVf/7rKe+0WovGF0E/VlfCanSAhy
 OqU+Hh48FEKq/A==;
Date: Tue, 15 Apr 2025 17:42:21 +0300
Message-Id: <865xj5h4fm.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Konstantin Kharlamov <Hi-Angel@HIDDEN>
In-Reply-To: <2d790bd630ff1019984c78a690bd461b0629b02a.camel@HIDDEN>
 (message from Konstantin Kharlamov on Tue, 15 Apr 2025 17:33:21 +0300)
Subject: Re: bug#77803: tsx-ts-mode: wrong indentation for variables
 declarations
References: <6913797600552fba6cc2fdfac2d3aa3b9c1b541a.camel@HIDDEN>
 <86plhdhk5k.fsf@HIDDEN>
 <e99cd75dcd8aafe3e820bc9347658ea732752768.camel@HIDDEN>
 <2d790bd630ff1019984c78a690bd461b0629b02a.camel@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 77803
Cc: casouri@HIDDEN, theo@HIDDEN, 77803 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Konstantin Kharlamov <Hi-Angel@HIDDEN>
> Cc: 77803 <at> debbugs.gnu.org
> Date: Tue, 15 Apr 2025 17:33:21 +0300
> 
> Okay, I figured it all out, going to send patch, but another thing I
> stumbled upon: are tests not working? I mean, the `test/README` says I
> could run "make <filename>  -or-  make <filename>.log".
> 
> But:
> 
> ╰─λ make typescript-ts-mode-tests
> make: *** No rule to make target 'typescript-ts-mode-tests'.  Stop.
> ╰─λ make typescript-ts-mode-tests.el                                  
> make: *** No rule to make target 'typescript-ts-mode-tests.el'.  Stop.
> ╰─λ make test/lisp/progmodes/typescript-ts-mode-tests.el
> make: 'test/lisp/progmodes/typescript-ts-mode-tests.el' is up to date.

Try
      make -C test lisp/progmodes/typescript-ts-mode-tests




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#77803; Package emacs. Full text available.

Message received at 77803 <at> debbugs.gnu.org:


Received: (at 77803) by debbugs.gnu.org; 15 Apr 2025 14:33:37 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Apr 15 10:33:37 2025
Received: from localhost ([127.0.0.1]:53049 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1u4hM0-000756-IL
	for submit <at> debbugs.gnu.org; Tue, 15 Apr 2025 10:33:37 -0400
Received: from forward500b.mail.yandex.net ([178.154.239.144]:57096)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <hi-angel@HIDDEN>)
 id 1u4hLt-00073k-Ah
 for 77803 <at> debbugs.gnu.org; Tue, 15 Apr 2025 10:33:31 -0400
Received: from mail-nwsmtp-smtp-production-main-73.sas.yp-c.yandex.net
 (mail-nwsmtp-smtp-production-main-73.sas.yp-c.yandex.net
 [IPv6:2a02:6b8:c37:f37c:0:640:1e45:0])
 by forward500b.mail.yandex.net (Yandex) with ESMTPS id 6955361415;
 Tue, 15 Apr 2025 17:33:22 +0300 (MSK)
Received: by mail-nwsmtp-smtp-production-main-73.sas.yp-c.yandex.net
 (smtp/Yandex) with ESMTPSA id LXIWC62LdOs0-a3ASmgqz; 
 Tue, 15 Apr 2025 17:33:22 +0300
X-Yandex-Fwd: 1
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail;
 t=1744727602; bh=Wa2CjDmO7FkD5Z1o8Ei4OACov+Bdl1JP0KhT2f1beV0=;
 h=References:Date:In-Reply-To:Cc:To:From:Subject:Message-ID;
 b=ea0rJNSJlqtRg9gR3yKoec7E6Q+5o5ZU49XSTRA4yw10Y4nam+g5IY6ltPfwDupmL
 2KxxNTTiEuyk4l3VArxuMwdKZZdvAKww3ktpHjPYhVH+giV8CxHojqysOKx2ffQJqm
 By0+dXHcYTiLoJm3orq9HbVkO1IVfPzXlw+BSBoY=
Authentication-Results: mail-nwsmtp-smtp-production-main-73.sas.yp-c.yandex.net;
 dkim=pass header.i=@yandex.ru
Message-ID: <2d790bd630ff1019984c78a690bd461b0629b02a.camel@HIDDEN>
Subject: Re: bug#77803: tsx-ts-mode: wrong indentation for variables
 declarations
From: Konstantin Kharlamov <Hi-Angel@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>, Theodor Thornhill <theo@HIDDEN>, 
 Yuan Fu <casouri@HIDDEN>
Date: Tue, 15 Apr 2025 17:33:21 +0300
In-Reply-To: <e99cd75dcd8aafe3e820bc9347658ea732752768.camel@HIDDEN>
References: <6913797600552fba6cc2fdfac2d3aa3b9c1b541a.camel@HIDDEN>
 <86plhdhk5k.fsf@HIDDEN>
 <e99cd75dcd8aafe3e820bc9347658ea732752768.camel@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
User-Agent: Evolution 3.56.0 
MIME-Version: 1.0
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 77803
Cc: 77803 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On Tue, 2025-04-15 at 16:35 +0300, Konstantin Kharlamov wrote:
> On Tue, 2025-04-15 at 12:02 +0300, Eli Zaretskii wrote:
> > > From: Konstantin Kharlamov <Hi-Angel@HIDDEN>
> > > Date: Mon, 14 Apr 2025 18:41:42 +0300
> > >=20
> > > Given this TypeScript snippet:
> > >=20
> > > =C2=A0=C2=A0=C2=A0 const a =3D 1,
> > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 b =3D 2;
> > > =C2=A0=C2=A0=C2=A0 var c =3D 3,
> > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 d =3D 4;
> > >=20
> > > =E2=80=A6both b and d are expected to be indented to `typescript-ts-m=
ode-
> > > indent-offset`
> > > (2 by default). This both makes logical sense and is the behavior
> > > in another
> > > editor VSCode.
> > >=20
> > > Instead it gets indented to the length of `const` and `var` +
> > > space.
> > >=20
> > > I'd note a separate problem: if you have this code:
> > >=20
> > >=20
> > > =C2=A0=C2=A0=C2=A0 const a =3D 1,
> > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 b =3D 2,
> > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 c =3D 3;
> > >=20
> > > =E2=80=A6and you try to indent `c`, instead of getting indented to th=
e
> > > previous line it
> > > keeps being at "const + space" length.
> >=20
> > Thanks.
> >=20
> > Theo and Yuan, any suggestions or comments?
>=20
> I dug into it a big =E2=80=94 I think, the solution should be adding this
> line
>=20
> =C2=A0=C2=A0=C2=A0=C2=A0 ((parent-is "variable_declarator") parent-bol ty=
pescript-ts-
> mode-indent-offset)
>=20
> to the list inside `typescript-ts-mode--indent-rules`.
>=20
> However, when I evaluate the defun and try re-indenting, nothing
> changes, it still gets indented to `const `.
>=20
> I see that evaluating `(treesit-node-parent (treesit-node-at
> (point)))`
> results in "#<treesit-node variable_declarator in 623-688>", so
> presumably the fix should work. I'd appreciate a hint on how to see
> what rule gets actually triggered during indentation, that results in
> the change not doing anything.

Okay, I figured it all out, going to send patch, but another thing I
stumbled upon: are tests not working? I mean, the `test/README` says I
could run "make <filename>  -or-  make <filename>.log".

But:

=E2=95=B0=E2=94=80=CE=BB make typescript-ts-mode-tests
make: *** No rule to make target 'typescript-ts-mode-tests'.  Stop.
=E2=95=B0=E2=94=80=CE=BB make typescript-ts-mode-tests.el                  =
               =20
make: *** No rule to make target 'typescript-ts-mode-tests.el'.  Stop.
=E2=95=B0=E2=94=80=CE=BB make test/lisp/progmodes/typescript-ts-mode-tests.=
el
make: 'test/lisp/progmodes/typescript-ts-mode-tests.el' is up to date.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#77803; Package emacs. Full text available.

Message received at 77803 <at> debbugs.gnu.org:


Received: (at 77803) by debbugs.gnu.org; 15 Apr 2025 13:35:18 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Apr 15 09:35:17 2025
Received: from localhost ([127.0.0.1]:51238 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1u4gRZ-0003LG-Cy
	for submit <at> debbugs.gnu.org; Tue, 15 Apr 2025 09:35:17 -0400
Received: from forward502d.mail.yandex.net ([178.154.239.210]:49318)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <hi-angel@HIDDEN>)
 id 1u4gRS-0003FS-NW
 for 77803 <at> debbugs.gnu.org; Tue, 15 Apr 2025 09:35:14 -0400
Received: from mail-nwsmtp-smtp-production-main-52.klg.yp-c.yandex.net
 (mail-nwsmtp-smtp-production-main-52.klg.yp-c.yandex.net
 [IPv6:2a02:6b8:c43:c94:0:640:bcb2:0])
 by forward502d.mail.yandex.net (Yandex) with ESMTPS id 5B1DF6142D;
 Tue, 15 Apr 2025 16:35:04 +0300 (MSK)
Received: by mail-nwsmtp-smtp-production-main-52.klg.yp-c.yandex.net
 (smtp/Yandex) with ESMTPSA id 3ZHH4R1LjOs0-vrwzaheY; 
 Tue, 15 Apr 2025 16:35:03 +0300
X-Yandex-Fwd: 1
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail;
 t=1744724104; bh=hW38u+HdDGH0Gki3UYjepYSXnlhV6skItSlJGClKZAo=;
 h=References:Date:In-Reply-To:Cc:To:From:Subject:Message-ID;
 b=eInHjhEChU76BXJx7XgbXtRQQC59Is26cdldJmC1PiNt2gsQTbOjam8rgMOS737I+
 7OpCMm8gYVSr8P3H+P+54gp6AXvsePDXNcGniUG/OEz5l0CYlWzu5rhd/hTGbJhPbK
 Iz8rW4rApCUNYxWxsoulo2XnAUJ9NvhbcgwSF8iQ=
Authentication-Results: mail-nwsmtp-smtp-production-main-52.klg.yp-c.yandex.net;
 dkim=pass header.i=@yandex.ru
Message-ID: <e99cd75dcd8aafe3e820bc9347658ea732752768.camel@HIDDEN>
Subject: Re: bug#77803: tsx-ts-mode: wrong indentation for variables
 declarations
From: Konstantin Kharlamov <Hi-Angel@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>, Theodor Thornhill <theo@HIDDEN>, 
 Yuan Fu <casouri@HIDDEN>
Date: Tue, 15 Apr 2025 16:35:02 +0300
In-Reply-To: <86plhdhk5k.fsf@HIDDEN>
References: <6913797600552fba6cc2fdfac2d3aa3b9c1b541a.camel@HIDDEN>
 <86plhdhk5k.fsf@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
User-Agent: Evolution 3.56.0 
MIME-Version: 1.0
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 77803
Cc: 77803 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On Tue, 2025-04-15 at 12:02 +0300, Eli Zaretskii wrote:
> > From: Konstantin Kharlamov <Hi-Angel@HIDDEN>
> > Date: Mon, 14 Apr 2025 18:41:42 +0300
> >=20
> > Given this TypeScript snippet:
> >=20
> > =C2=A0=C2=A0=C2=A0 const a =3D 1,
> > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 b =3D 2;
> > =C2=A0=C2=A0=C2=A0 var c =3D 3,
> > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 d =3D 4;
> >=20
> > =E2=80=A6both b and d are expected to be indented to `typescript-ts-mod=
e-
> > indent-offset`
> > (2 by default). This both makes logical sense and is the behavior
> > in another
> > editor VSCode.
> >=20
> > Instead it gets indented to the length of `const` and `var` +
> > space.
> >=20
> > I'd note a separate problem: if you have this code:
> >=20
> >=20
> > =C2=A0=C2=A0=C2=A0 const a =3D 1,
> > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 b =3D 2,
> > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 c =3D 3;
> >=20
> > =E2=80=A6and you try to indent `c`, instead of getting indented to the
> > previous line it
> > keeps being at "const + space" length.
>=20
> Thanks.
>=20
> Theo and Yuan, any suggestions or comments?

I dug into it a big =E2=80=94 I think, the solution should be adding this l=
ine

     ((parent-is "variable_declarator") parent-bol typescript-ts-mode-inden=
t-offset)

to the list inside `typescript-ts-mode--indent-rules`.

However, when I evaluate the defun and try re-indenting, nothing
changes, it still gets indented to `const `.

I see that evaluating `(treesit-node-parent (treesit-node-at (point)))`
results in "#<treesit-node variable_declarator in 623-688>", so
presumably the fix should work. I'd appreciate a hint on how to see
what rule gets actually triggered during indentation, that results in
the change not doing anything.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#77803; Package emacs. Full text available.

Message received at 77803 <at> debbugs.gnu.org:


Received: (at 77803) by debbugs.gnu.org; 15 Apr 2025 09:03:01 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Apr 15 05:03:01 2025
Received: from localhost ([127.0.0.1]:50614 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1u4cC5-0003kQ-4p
	for submit <at> debbugs.gnu.org; Tue, 15 Apr 2025 05:03:01 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:55792)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1u4cC2-0003k9-6R
 for 77803 <at> debbugs.gnu.org; Tue, 15 Apr 2025 05:02:58 -0400
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 <eliz@HIDDEN>)
 id 1u4cBv-00085o-BP; Tue, 15 Apr 2025 05:02:51 -0400
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=CDVAEtHAGA2cIN5xsDkBBmvpNNlbbm3/7HBdRnlawzI=; b=XohI0qRE+pnB0hKbm29E
 81/VWpcM+8HQ0JyL2cZvIS/bpZU+fkMnyDTVFeQujH3ltjITaYyP9qrPsSyFlVYdnNyxnukuVit6V
 bRW4E5rqxLvAnw5DHdcNcntbQLE1TW/1DHaMih7lkFVf4MPB/88x2k9M4r5oPaxtZ/HOY7OM5db2D
 aczzZFz2BtQamD5Lez3lh2tv1MfwWiBpNrxcID9dBKOSvciZ6fNj1ps1QAygAqb4yvQ7Ou1CiT5p3
 Lb3vR8/HihH5/5pTQlkEfEqsIF1WudJwWH8QEdSDE2hMJgQP1FxmFjSk9DfKNm56zoD4zFY7QpPFO
 5O7jlhP4e3e+cA==;
Date: Tue, 15 Apr 2025 12:02:47 +0300
Message-Id: <86plhdhk5k.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Konstantin Kharlamov <Hi-Angel@HIDDEN>,
 Theodor Thornhill <theo@HIDDEN>, Yuan Fu <casouri@HIDDEN>
In-Reply-To: <6913797600552fba6cc2fdfac2d3aa3b9c1b541a.camel@HIDDEN>
 (message from Konstantin Kharlamov on Mon, 14 Apr 2025 18:41:42 +0300)
Subject: Re: bug#77803: tsx-ts-mode: wrong indentation for variables
 declarations
References: <6913797600552fba6cc2fdfac2d3aa3b9c1b541a.camel@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 77803
Cc: 77803 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Konstantin Kharlamov <Hi-Angel@HIDDEN>
> Date: Mon, 14 Apr 2025 18:41:42 +0300
> 
> Given this TypeScript snippet:
> 
>     const a = 1,
>           b = 2;
>     var c = 3,
>         d = 4;
> 
> …both b and d are expected to be indented to `typescript-ts-mode-indent-offset`
> (2 by default). This both makes logical sense and is the behavior in another
> editor VSCode.
> 
> Instead it gets indented to the length of `const` and `var` + space.
> 
> I'd note a separate problem: if you have this code:
> 
> 
>     const a = 1,
>       b = 2,
>           c = 3;
> 
> …and you try to indent `c`, instead of getting indented to the previous line it
> keeps being at "const + space" length.

Thanks.

Theo and Yuan, any suggestions or comments?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#77803; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 14 Apr 2025 15:42:04 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Apr 14 11:42:04 2025
Received: from localhost ([127.0.0.1]:48561 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1u4Lwi-00031k-5U
	for submit <at> debbugs.gnu.org; Mon, 14 Apr 2025 11:42:04 -0400
Received: from lists.gnu.org ([2001:470:142::17]:57980)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <hi-angel@HIDDEN>)
 id 1u4Lwg-00031E-Jm
 for submit <at> debbugs.gnu.org; Mon, 14 Apr 2025 11:42:03 -0400
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 <hi-angel@HIDDEN>)
 id 1u4LwX-0008D8-Q5
 for bug-gnu-emacs@HIDDEN; Mon, 14 Apr 2025 11:41:53 -0400
Received: from forward101d.mail.yandex.net ([2a02:6b8:c41:1300:1:45:d181:d101])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <hi-angel@HIDDEN>)
 id 1u4LwT-0000Sk-KN
 for bug-gnu-emacs@HIDDEN; Mon, 14 Apr 2025 11:41:51 -0400
Received: from mail-nwsmtp-smtp-production-main-88.klg.yp-c.yandex.net
 (mail-nwsmtp-smtp-production-main-88.klg.yp-c.yandex.net
 [IPv6:2a02:6b8:c43:a29:0:640:6842:0])
 by forward101d.mail.yandex.net (Yandex) with ESMTPS id F166560C07
 for <bug-gnu-emacs@HIDDEN>; Mon, 14 Apr 2025 18:41:42 +0300 (MSK)
Received: by mail-nwsmtp-smtp-production-main-88.klg.yp-c.yandex.net
 (smtp/Yandex) with ESMTPSA id gfINwb0LdGk0-RMTflyo1; 
 Mon, 14 Apr 2025 18:41:42 +0300
X-Yandex-Fwd: 1
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail;
 t=1744645302; bh=f/djXEiwQNSmL5a/PgpBDJn0ufYW2qvQbxsyMRGym+c=;
 h=Date:To:From:Subject:Message-ID;
 b=hXTNwdLUPgiPv9bYCbye4TAV/u0RNXqxqQz7L01tLNXXDS3Fi3skDAvjaczIhTIlp
 eYkllQ/XPyVlKe/F1RccU65YhR5uGMUSiZMR2IBF/oWkk/sgaH2U/Xotaho5uSq1nw
 NwDXul+XsfkNNffxBZCLcwvKsCRwKhlww0OEtbzY=
Authentication-Results: mail-nwsmtp-smtp-production-main-88.klg.yp-c.yandex.net;
 dkim=pass header.i=@yandex.ru
Message-ID: <6913797600552fba6cc2fdfac2d3aa3b9c1b541a.camel@HIDDEN>
Subject: tsx-ts-mode: wrong indentation for variables declarations
From: Konstantin Kharlamov <Hi-Angel@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Date: Mon, 14 Apr 2025 18:41:42 +0300
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
User-Agent: Evolution 3.56.0 
MIME-Version: 1.0
Received-SPF: pass client-ip=2a02:6b8:c41:1300:1:45:d181:d101;
 envelope-from=hi-angel@HIDDEN; helo=forward101d.mail.yandex.net
X-Spam_score_int: -27
X-Spam_score: -2.8
X-Spam_bar: --
X-Spam_report: (-2.8 / 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_LOW=-0.7, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.0 (/)

Given this TypeScript snippet:

    const a =3D 1,
          b =3D 2;
    var c =3D 3,
        d =3D 4;

=E2=80=A6both b and d are expected to be indented to `typescript-ts-mode-in=
dent-offset`
(2 by default). This both makes logical sense and is the behavior in anothe=
r
editor VSCode.

Instead it gets indented to the length of `const` and `var` + space.

I'd note a separate problem: if you have this code:


    const a =3D 1,
      b =3D 2,
          c =3D 3;

=E2=80=A6and you try to indent `c`, instead of getting indented to the prev=
ious line it
keeps being at "const + space" length.




Acknowledgement sent to Konstantin Kharlamov <Hi-Angel@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#77803; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Sun, 27 Apr 2025 00:45:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.