From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jostein =?UTF-8?Q?Kj=C3=B8nigsen?= Newsgroups: gmane.emacs.bugs Subject: bug#59660: 29.0.50; typescript-ts-mode consistently fontifies method-names incorrectly Date: Tue, 29 Nov 2022 17:35:31 +0100 Message-ID: <30978023-D3F6-4A5D-B3D2-AF975807A637@secure.kjonigsen.net> References: <87h6yhajap.fsf@thornhill.no> Mime-Version: 1.0 (1.0) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26072"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 59660@debbugs.gnu.org, Eli Zaretskii , jostein@kjonigsen.net, Yuan Fu To: Theodor Thornhill Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Nov 29 17:36:19 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1p03ai-0006Uq-H8 for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 29 Nov 2022 17:36:18 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p03aW-0008FI-1t; Tue, 29 Nov 2022 11:36:04 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p03aU-0008EI-IB for bug-gnu-emacs@gnu.org; Tue, 29 Nov 2022 11:36:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p03aU-0004KP-3H for bug-gnu-emacs@gnu.org; Tue, 29 Nov 2022 11:36:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p03aT-0004Oh-MV for bug-gnu-emacs@gnu.org; Tue, 29 Nov 2022 11:36:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Jostein =?UTF-8?Q?Kj=C3=B8nigsen?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 29 Nov 2022 16:36:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59660 X-GNU-PR-Package: emacs Original-Received: via spool by 59660-submit@debbugs.gnu.org id=B59660.166973975716897 (code B ref 59660); Tue, 29 Nov 2022 16:36:01 +0000 Original-Received: (at 59660) by debbugs.gnu.org; 29 Nov 2022 16:35:57 +0000 Original-Received: from localhost ([127.0.0.1]:55092 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p03aP-0004OT-0v for submit@debbugs.gnu.org; Tue, 29 Nov 2022 11:35:57 -0500 Original-Received: from wout1-smtp.messagingengine.com ([64.147.123.24]:59259) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p03aK-0004OM-Ra for 59660@debbugs.gnu.org; Tue, 29 Nov 2022 11:35:56 -0500 Original-Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.west.internal (Postfix) with ESMTP id AD5F832001BB; Tue, 29 Nov 2022 11:35:46 -0500 (EST) Original-Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Tue, 29 Nov 2022 11:35:47 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= secure.kjonigsen.net; h=cc:cc:content-transfer-encoding :content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to; s=fm3; t=1669739746; x=1669826146; bh=H4geYeTGhh YNPpb8tKqht7r3SOFPPkLZFICEYuGJcik=; b=MdMVb7mGL3QF4iNzDtfbgnkGK1 karm2UjZxhVwt7KWKJN7cY/GyEFCIo+tczMxy6lV6sp3kLR5Z7YpEBZkKmGtWDzy RoWslU9Y1y5mA/4TJx/9KTnWbxdkz1d8b/HSw9Cw0VEVlfgUjgh2ZITcx3EtYi7O 1TGjazg9KDPSG7Z/e+Qnd/rKNqsR74gRuO0JMoQHvk9iQInUJyIfkIw01aFSRjEG qMWPCmeYJl0o3tXPdou8XBfuvH85zGNQDDd0oU/gS3hhuLP9guG1/CMlbH9BiQQl el8zTpRpKwWnqv6IP5bdKezoRVLKSRob0mfXKTPuXSvh/boXLyAOiut5FvTA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1669739746; x= 1669826146; bh=H4geYeTGhhYNPpb8tKqht7r3SOFPPkLZFICEYuGJcik=; b=c yl1TEVmSinN08555RCfSQK9Z2WDbUPl7b6yLqPXNSCuh45bWJe0RqnvdrBfQzaDl boZHqQ7ZYAeMSNRVjkDPpZ5cdjIhbscmLk/7+D6K7xmhkgBlp6sET2GGodGzDRZQ PQ4b9XaJ4e+79txNKOjmpTx5x33fauupBz6nVr3J+Fc9CshBXPDzjjvTfyKyjyIK eifuSsjdiUyxSCgk7br7AK63zYVZCC2d5jIWGpN6su0LUjHjmElTlJJNZ29ZanaW 78qOPTLpXtQ/NpJNIikmQJVIVB++kmWX/fFegEPQcxSWtZ0Zj040j/Tz7H6JYoL+ 6FlwNQmPC73mZ4d1FSVUA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrtddtgdeiudcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpegtgffhggfufffkfhevjgfvofesthhqmhdthhdtjeenucfhrhhomheplfhoshht vghinhcumfhjpphnihhgshgvnhcuoehjohhsthgvihhnsehsvggtuhhrvgdrkhhjohhnih hgshgvnhdrnhgvtheqnecuggftrfgrthhtvghrnhepfffgkefhvdeivdduhfeuieehfeev kedvveduudevfeeuleegffetfffgvdelueevnecuffhomhgrihhnpehthihpvghstghrih hpthhlrghnghdrohhrghdpkhhjnhhighhsvghnrdhnvghtnecuvehluhhsthgvrhfuihii vgeptdenucfrrghrrghmpehmrghilhhfrhhomhepjhhoshhtvghinhesshgvtghurhgvrd hkjhhonhhighhsvghnrdhnvght X-ME-Proxy: Feedback-ID: ib2f84088:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 29 Nov 2022 11:35:45 -0500 (EST) In-Reply-To: <87h6yhajap.fsf@thornhill.no> X-Mailer: iPhone Mail (20C5049e) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:249415 Archived-At: > On 29 Nov 2022, at 16:10, Theodor Thornhill wrote: >=20 > =EF=BB=BFJostein Kj=C3=B8nigsen writes: >=20 >> Cc: 59660@debbugs.gnu.org, theo@thornhill.no >>>> From: Yuan Fu >>>> Date: Mon, 28 Nov 2022 15:06:30 -0800 >>>>=20 >>>> Maybe you can remove the :override flag for the property_identifier rul= e, so it doesn=E2=80=99t shadow the function rule? Would that work better? >> I plan to test that as quickly as I time permits. If we can make both=20 >> behaviours work, that would obviously be the best. >>> This could be a personal preference, perhaps? It isn't clear to me that= >>> only one of the two is definitely correct. So maybe we need a user opti= on >>> for which one overrides which? >>=20 >> I honestly think this is reasonably clear. >>=20 >> "Properties" with getters and setters are at this point in time almost=20= >> entirely unused in EcmaScript/TypeScript space. They are optional and=20 >> have complicated syntax, and don't play well with JSON serialization=20 >> (and thus can't be used in REST APIs). >>=20 >> You however cannot write a program without defining or invoking=20 >> methods/functions. So not having method-fontification working correctly=20= >> will literally impact **all** TypeScript-users. >=20 > Could you give me a code example, Jostein? I'm just interested in a > repro, because I can't reproduce it with the typescript-ts-mode. >=20 > I tried using this from [0]: > ``` > class Greeter { > greeting: string; >=20 > constructor(message: string) { > this.greeting =3D message; > } >=20 > greet() { > return "Hello, " + this.greeting; > } > } > ``` >=20 > On my end I get no property-face, just function-name-face. Both on > constructor and greet. I'm not saying I disagree with you, but what am > I missing? >=20 > Theo >=20 > [0]: https://www.typescriptlang.org/docs/handbook/classes.html >=20 I=E2=80=99ve already submitted patches to fix this which Yuan has pushed. Tr= y going a couple days back in time and try again ;)=20 What remains to be decided is what we do with property-highlighting, and if w= e can find a way to enable that without colliding with function-names.=20 =E2=80=94 Jostein Kj=C3=B8nigsen https://jostein.kj=C3=B8nigsen.net=