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#61302: 29.0.60; rust-ts-mode does not show function-invocation on field-properties Date: Sun, 05 Feb 2023 22:59:03 +0100 Message-ID: <32e34056-1a88-469a-819c-ae52e7d60712@app.fastmail.com> References: <6209c097-0369-828a-7513-d8afb73fd7f0@secure.kjonigsen.net> <5bd2f9f0-39d5-4d6b-815d-eda20d366441@app.fastmail.com> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=e441efb8f63147b68c55e03faa815053 Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="33648"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Cyrus-JMAP/3.9.0-alpha0-107-g82c3c54364-fm-20230131.002-g82c3c543 Cc: 61302@debbugs.gnu.org To: "Randy Taylor" , "Eli Zaretskii" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Feb 05 23:00:16 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pOn3Y-0008Yj-8p for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 05 Feb 2023 23:00:16 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pOn3M-0001hg-Oh; Sun, 05 Feb 2023 17:00: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 1pOn3K-0001hP-Qi for bug-gnu-emacs@gnu.org; Sun, 05 Feb 2023 17:00:03 -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 1pOn3K-0001hL-HA for bug-gnu-emacs@gnu.org; Sun, 05 Feb 2023 17:00:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pOn3K-0001K7-6v for bug-gnu-emacs@gnu.org; Sun, 05 Feb 2023 17:00:02 -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: Sun, 05 Feb 2023 22:00:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61302 X-GNU-PR-Package: emacs X-Debbugs-Original-Cc: "bug-gnu-emacs@gnu.org" Original-Received: via spool by submit@debbugs.gnu.org id=B.16756343725014 (code B ref -1); Sun, 05 Feb 2023 22:00:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 5 Feb 2023 21:59:32 +0000 Original-Received: from localhost ([127.0.0.1]:46632 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pOn2p-0001Io-TI for submit@debbugs.gnu.org; Sun, 05 Feb 2023 16:59:32 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:55824) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pOn2o-0001Ih-II for submit@debbugs.gnu.org; Sun, 05 Feb 2023 16:59:31 -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 1pOn2o-0001bD-9J for bug-gnu-emacs@gnu.org; Sun, 05 Feb 2023 16:59:30 -0500 Original-Received: from mail-qt1-x833.google.com ([2607:f8b0:4864:20::833]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pOn2l-0001ap-Bk for bug-gnu-emacs@gnu.org; Sun, 05 Feb 2023 16:59:29 -0500 Original-Received: by mail-qt1-x833.google.com with SMTP id 5so1091701qtp.9 for ; Sun, 05 Feb 2023 13:59:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kjonigsen.net; s=google; h=subject:cc:to:from:date:references:in-reply-to:message-id :mime-version:user-agent:feedback-id:from:to:cc:subject:date :message-id:reply-to; bh=KnMkvtmi2gfNeV3X2UiLXR6XUuLouMTBUnbgt1b8pl8=; b=Vfczs7a9j2vQCXvnLWUy1factV2FUwtmwYmE/YgUYePcYXsqb2G3n/M3vHNHgqc6xW h3slJ/fZyWcqXRVU2V+prWpO2BWq4/885YK7J4MRFVHaFxuNxp6CpTs1umuw/WIdRwBJ IAfb7l1tzZrhFt5a+/nsZ2bXSiZBAtkn12Csc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=subject:cc:to:from:date:references:in-reply-to:message-id :mime-version:user-agent:feedback-id:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=KnMkvtmi2gfNeV3X2UiLXR6XUuLouMTBUnbgt1b8pl8=; b=F3N+Ewark9EZ1JqcV668NN2UxPhKrDbgFalY4gz4vHfGrAM5/laIH83mzxCVo9Lway SMSvYaDATiI86WvFxotg0xqxmP2B6oxSaOqVLKWV9BOLs1qh+FHXUq9+zBAF/9450FKb vcbsauKIxjS9wFU35Mb93x6ss+T3NuPiUvKdIVWdVN2sIjhvbRG74mX3MGGsDYHH0dFP ywWDWzf7bmLq4jK7r05JkI5rfEEKj+o3avPCrSd3c2EYo6rQyjGERKPmSqYWTIRLKSxv TgGu1CpIpuQduJpteRa4WfsiNCixWTZccfkIEfgQGYGBd0+vjY95jjoZUmSU+TzmsZei 5yMw== X-Gm-Message-State: AO0yUKWQNjujnqpEbRsYHujoC277BL04vs6KG0LTaAv+kafXk8BEsvG2 6GXpEdKEjyd7qSmKGG8Xl6Ov712d/Aaq8HPN X-Google-Smtp-Source: AK7set/vO9Mfo5e82YFTc3+Qnobu8q7JfIs+WwrVoQOtu64QCp54P52muK7MQ7jt1nMchDWbQDlU3w== X-Received: by 2002:a05:622a:294:b0:3b6:3e4f:f876 with SMTP id z20-20020a05622a029400b003b63e4ff876mr32788901qtw.18.1675634365868; Sun, 05 Feb 2023 13:59:25 -0800 (PST) Original-Received: from auth2-smtp.messagingengine.com (auth2-smtp.messagingengine.com. [66.111.4.228]) by smtp.gmail.com with ESMTPSA id z20-20020ac87cb4000000b003b950b03b6dsm5998540qtv.37.2023.02.05.13.59.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 Feb 2023 13:59:25 -0800 (PST) Original-Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailauth.nyi.internal (Postfix) with ESMTP id F2CAF27C0054; Sun, 5 Feb 2023 16:59:24 -0500 (EST) Original-Received: from imap50 ([10.202.2.100]) by compute3.internal (MEProxy); Sun, 05 Feb 2023 16:59:24 -0500 X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrudeggedgudehhecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefofgggkfgjfhffhffvvefutgesrgdtreerreerjeenucfhrhhomheplfho shhtvghinhcumfhjpphnihhgshgvnhcuoehjohhsthgvihhnsehkjhhonhhighhsvghnrd hnvghtqeenucggtffrrghtthgvrhhnpefhheelveejueekkeeifffhleefjeeuleetkedu hfdtkedtkeeliefgudegveejueenucffohhmrghinhepkhhjnhhighhsvghnrdhnohenuc evlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehjohhsthgv ihhnodhmvghsmhhtphgruhhthhhpvghrshhonhgrlhhithihqdduvdegkedvtdduudejqd duudegudeffeeftddqjhhoshhtvghinheppehkjhhonhhighhsvghnrdhnvghtsehfrghs thhmrghilhdrfhhm X-ME-Proxy: Feedback-ID: iaf4c46de:Fastmail Original-Received: by mailuser.nyi.internal (Postfix, from userid 501) id CB81F1700089; Sun, 5 Feb 2023 16:59:24 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface In-Reply-To: <5bd2f9f0-39d5-4d6b-815d-eda20d366441@app.fastmail.com> Received-SPF: none client-ip=2607:f8b0:4864:20::833; envelope-from=jostein@kjonigsen.net; helo=mail-qt1-x833.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action 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:254900 Archived-At: --e441efb8f63147b68c55e03faa815053 Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: quoted-printable -- Vennlig hilsen Jostein Kj=C3=B8nigsen jostein@kjonigsen.net =F0=9F=8D=B5 jostein@gmail.com https://jostein.kj=C3=B8nigsen.no 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 same ap= plies to c-ts-mode and go-ts-mode as well. >>=20 > I mean=E2=80=A6 yea it=E2=80=99s a property, but it=E2=80=99s clearly = a function-valued property, and you=E2=80=99re calling it.=20 >=20 > Even simpler: If you store a function reference in a plain variable an= d 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 (an= d tsx-ts-mode) all does the exact opposite: functions always takes prec= edence over properties. >=20 > In fact, they mostly highlight declarations of properties only, not re= gular access, which kind avoids the duality-problem we=E2=80=99re seeing= in rust-ts-mode in this particular case.=20 >=20 > Would it be an option/goal to try to align these other modes with a su= ch a model which is somewhat more clearly defined to make it simpler to= resolve cases like this? >=20 > =E2=80=94 > Jostein Also worth noting, there are clearly highly tailored treesitter-queries = to fontify these exact property-access based function-invocations. They = are not getting fontified by luck or wide/general matchers elsewhere.=20 Someone somewhere wanted these to be fontified, and had patches accepted= for that exact purpose.=20 To say that it is expected for them not to be used would then imply the = queries should not be there in the first place.=20 I=E2=80=99m not saying which side is right, but if we are to chose one, = we should strive to do so consistently :)=20 =E2=80=94 Jostein --e441efb8f63147b68c55e03faa815053 Content-Type: text/html;charset=utf-8 Content-Transfer-Encoding: quoted-printable

=

--
<= /div>
Vennlig hilsen
Jostein Kj=C3=B8= nigsen


On Sun, Feb 5, 2023, at 22:52, Jostein Kj=C3=B8nigsen wrote:

O= n Sun, Feb 5, 2023, at 22:30, Randy Taylor wrote:

That's expected (at least to me) because it's a property. The same= 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 clearly a function-valued property, and you=E2=80=99re calling it.&= nbsp;

Even simpler: If you store a function= reference in a plain variable and call that variable, is that a variabl= e or a function you=E2=80=99re calling? ;)

= As for consistency, csharp-ts-mode, js-ts-mode, typescript-ts-mode (and = tsx-ts-mode) all does the  exact opposite: functions always takes p= recedence over properties.

In fact, they mo= stly highlight declarations of properties only, not regular access, whic= h kind avoids the duality-problem we=E2=80=99re seeing in rust-ts-mode i= n this particular case. 

Would it be a= n option/goal to try to align these other modes with a such a model whic= h is somewhat more clearly defined to make it simpler  to resolve c= ases like this?

=E2=80=94
Jos= tein

Also worth noting, = there are clearly highly tailored treesitter-queries to fontify these ex= act property-access based function-invocations. They are not getting fon= tified by luck or wide/general matchers elsewhere. 
<= br>
Someone somewhere wanted these to be fontified, and had pa= tches accepted for that exact purpose.

To = say that it is expected for them not to be used would then imply the que= ries should not be there in the first place. 

I=E2=80=99m not saying which side is right, but if we are to cho= se one, we should strive to do so consistently :) 

=E2=80=94
Jostein
--e441efb8f63147b68c55e03faa815053--