From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Randy Taylor Newsgroups: gmane.emacs.bugs Subject: bug#61302: 29.0.60; rust-ts-mode does not show function-invocation on field-properties Date: Mon, 06 Feb 2023 02:57:54 +0000 Message-ID: References: <6209c097-0369-828a-7513-d8afb73fd7f0@secure.kjonigsen.net> <5bd2f9f0-39d5-4d6b-815d-eda20d366441@app.fastmail.com> <32e34056-1a88-469a-819c-ae52e7d60712@app.fastmail.com> <3e40d23f-1629-c5b7-1f17-d769790d6494@yandex.ru> Mime-Version: 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="40165"; mail-complaints-to="usenet@ciao.gmane.io" Cc: eliz@gnu.org, Jostein =?UTF-8?Q?Kj=C3=B8nigsen?= , 61302@debbugs.gnu.org To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Feb 06 03:59:22 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pOriz-000AFD-H4 for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 06 Feb 2023 03:59:21 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pOrik-0000EE-HT; Sun, 05 Feb 2023 21:59:06 -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 1pOrih-0000Dv-Es for bug-gnu-emacs@gnu.org; Sun, 05 Feb 2023 21:59:05 -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 1pOrig-0002Pr-Ua for bug-gnu-emacs@gnu.org; Sun, 05 Feb 2023 21:59:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pOrig-00059a-DC for bug-gnu-emacs@gnu.org; Sun, 05 Feb 2023 21:59:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Randy Taylor Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 06 Feb 2023 02:59:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61302 X-GNU-PR-Package: emacs Original-Received: via spool by 61302-submit@debbugs.gnu.org id=B61302.167565229119754 (code B ref 61302); Mon, 06 Feb 2023 02:59:02 +0000 Original-Received: (at 61302) by debbugs.gnu.org; 6 Feb 2023 02:58:11 +0000 Original-Received: from localhost ([127.0.0.1]:47030 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pOrhr-00058W-Dg for submit@debbugs.gnu.org; Sun, 05 Feb 2023 21:58:11 -0500 Original-Received: from mail-4317.proton.ch ([185.70.43.17]:40743) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pOrho-00058I-UN for 61302@debbugs.gnu.org; Sun, 05 Feb 2023 21:58:10 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rjt.dev; s=protonmail2; t=1675652282; x=1675911482; bh=nFTHAeRGzrcBFUvVbAiPgE33GDv/ElUrz0sB5B5gvr8=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=iMosjHJ5SNo5qtbHTmW/Pnp5JS1QZsnqk1zQLnjJu+mOaS4Dd/Vq824Z+WOohYQ7s OnczmGbciRHgRw67nq6vOIg9g9WVLgsp1y8lDC3bCk3x/ct8qsk0ISiAvNVWOY4ozJ JKBAn8XoPxmeRyKl2Q8lXfa3VjCmRl8AX8jwTyE6beIFObaW4KumaQZ2dD+x8HNwxT t1FH6l2LrVj+mo8wrEZmw+y1GPFjez/sAI0O0TOlIPrVGa/vjq6+Q7TkIyo7hGs2gH zRpfbdpRVMCa/Kow5nrzvhb/QoBhPoBhPefypy+89QU/wMJxL3+3rkTKQVvdOfeTDF ICFO37RuCgnTw== In-Reply-To: <3e40d23f-1629-c5b7-1f17-d769790d6494@yandex.ru> Feedback-ID: 44397038:user:proton 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:254923 Archived-At: On Sunday, February 5th, 2023 at 21:45, Dmitry Gutov wro= te: > On 06/02/2023 03:50, Randy Taylor wrote: >=20 > > On Sun, Feb 5, 2023, at 22:52, Jostein Kj=C3=B8nigsen wrote: > >=20 > > > > On Sun, Feb 5, 2023, at 22:30, Randy Taylor wrote: > > > >=20 > > > > > That's expected (at least to me) because it's a property. The sam= e applies to c-ts-mode and go-ts-mode as well. > > > > > I mean=E2=80=A6 yea it=E2=80=99s a property, but it=E2=80=99s cle= arly a function-valued property, and you=E2=80=99re calling it. > > > >=20 > > > > Even simpler: If you store a function reference in a plain variable= and call that variable, is that a variable or a function you=E2=80=99re ca= lling? ;) > > > >=20 > > > > As for consistency, csharp-ts-mode, js-ts-mode, typescript-ts-mode = (and tsx-ts-mode) all does the exact opposite: functions always takes prece= dence over properties. > > > >=20 > > > > In fact, they mostly highlight declarations of properties only, not= regular access, which kind avoids the duality-problem we=E2=80=99re seeing= in rust-ts-mode in this particular case. > > > >=20 > > > > Would it be an option/goal to try to align these other modes with a= such a model which is somewhat more clearly defined to make it simpler to = resolve cases like this? > >=20 > > When I introduced font-lock-property-face, I intended for it to be used > > to highlight all properties. > >=20 > > Clearly that's not what most people had in mind, and it seems that many > > would prefer property functions (for lack of better term) be highlighte= d > > as functions. > > I can live with that, and yes, all the modes should be consistent so > > Rust, Go, C/C++ and any anything else should be fixed up to abide. > > I'll fix Go up sometime next week unless someone beats me to it. >=20 >=20 > We're getting very close to when the pretest should be cut, I'm not sure > if we have an extra week. We're probably pushing the limits of the > feature freeze here already. >=20 > I've pushed a fix for Go as well, it looked very similar to Rust's one. Thanks! It's still Sunday over here, so I meant within the next couple of d= ays or so. My fault for speaking so self-centredly and lazily :). >=20 > Curiously, in both cases the 'function' feature already contained the > necessary rule (which matched only "property functions"), which then was > later overridden by a rule in 'property' feature. >=20 > > Perhaps in the future we can introduce more fine-grained options for > > properties if it's desired. >=20 >=20 > Sure, in case you or others really feel that need. There are several > ways we could go about adding that capability. >=20 > In the meantime, I've also added highlighting of variable declarations > to go-ts-mode (to 'definition', so it's on feature level 3). This should > finish bringing rust and go ts modes to parity with the rest. >=20 > Please take it for a spin when you have the time. I'm not too familiar > with Go, so I could have missed some cases. But hopefully not. Will do, thanks again.