From unknown Sat Aug 16 10:49:14 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#69625 <69625@debbugs.gnu.org> To: bug#69625 <69625@debbugs.gnu.org> Subject: Status: 30.0.50; [PATCH] rust-ts-mode doesn't fontify some enum Reply-To: bug#69625 <69625@debbugs.gnu.org> Date: Sat, 16 Aug 2025 17:49:14 +0000 retitle 69625 30.0.50; [PATCH] rust-ts-mode doesn't fontify some enum reassign 69625 emacs submitter 69625 Yuan Fu severity 69625 normal tag 69625 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 07 23:44:46 2024 Received: (at submit) by debbugs.gnu.org; 8 Mar 2024 04:44:46 +0000 Received: from localhost ([127.0.0.1]:55837 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1riS6A-0007TR-19 for submit@debbugs.gnu.org; Thu, 07 Mar 2024 23:44:46 -0500 Received: from lists.gnu.org ([209.51.188.17]:49502) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1riS63-0007TE-QV for submit@debbugs.gnu.org; Thu, 07 Mar 2024 23:44:43 -0500 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 1riS5X-0005E8-9Q for bug-gnu-emacs@gnu.org; Thu, 07 Mar 2024 23:44:07 -0500 Received: from mail-oi1-x22b.google.com ([2607:f8b0:4864:20::22b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1riS5V-0001YC-Kk for bug-gnu-emacs@gnu.org; Thu, 07 Mar 2024 23:44:06 -0500 Received: by mail-oi1-x22b.google.com with SMTP id 5614622812f47-3c1a1e1e539so1242456b6e.1 for ; Thu, 07 Mar 2024 20:44:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1709873043; x=1710477843; darn=gnu.org; h=to:date:message-id:subject:mime-version:content-transfer-encoding :from:from:to:cc:subject:date:message-id:reply-to; bh=KDuSUVKywPNW4oZU/z2rru0TUDFnBHHWfi2EFXirAyM=; b=F7w3O5bJWeLTL4QKr4WfhoKGEahH/btG/F/p2E7Mslo6jy73jG1oZdoudPoi5LJAul JmVRTuTYWOBcYiYYoCM68bTb1Of6q5yiEFJpXV7bQHRYvGbArJmi4AXVy8NaA23JztDO w1PyNNM9PSVV8tNwGRWKeUXuEbOJXnA4SFPQyygP79+Xx51AN7OSp0lredFLTL240cD9 47Yz1T2dm/4g4vVT4URR4i2OjtwKza7VxwTJ/JKCVz/OBDc68VEUBSMWIQ8YwGQlwswa WX1teUsP9vhku7GJbYHuYO9XsTB8FF9gm2imBAAvEfQmsldNQFlbJmH92JAEafGWrutw B6/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709873043; x=1710477843; h=to:date:message-id:subject:mime-version:content-transfer-encoding :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=KDuSUVKywPNW4oZU/z2rru0TUDFnBHHWfi2EFXirAyM=; b=OIDIIpm/h7FDLmuxT/1kKkuIVoeRmgHh3CK4t+DFPqwSYh5W1UdXiBuhTc3bG6H1CZ +tQOfujXxhWhx3q2mlJuWFXBhToP7PId/VH0ji4NdeghpwgKhcHM4CrddDLv+jsjK06Y F94XFyY+E/2rm72RtqLbM6rfREqWMfDrSzAYV3A0CJu/sH9jNRFUOFHDVwuxH0KezBDS R8gbVlpClx9Geveh1ewXgFMaUO2IYgFSmcsVzZfj+xow9SzteRKPQfwZNfNz67/YTvzA hWFz63nqLLZAwwDZsqQwEY7e6gYfdRhsFNoYGWj1K8mwMT5NaJ4eqrD4oCoZi1GSRqpr /lcw== X-Gm-Message-State: AOJu0YyO0XLDO0tcj2SXZ855zOUUJkfUDvtWjQG4Qg2xA30VmPeMW0Y/ 8wWwIyMOTAJCJNcVf+wQUhKk1dxV8CzzS7s81dHwG8Y3wLoKRQ52p0AU7uwQ X-Google-Smtp-Source: AGHT+IEGc03Ma+4DzIOPqF9g7wcsrausItXtVUk/9TqbgSpSNgAC1mJAyTZNWlFvU9hCuYoA67WCdA== X-Received: by 2002:a05:6808:4c8:b0:3c2:1e69:47db with SMTP id a8-20020a05680804c800b003c21e6947dbmr6057877oie.6.1709873043431; Thu, 07 Mar 2024 20:44:03 -0800 (PST) Received: from smtpclient.apple ([2601:641:300:4910:5d7a:40d1:8598:1830]) by smtp.gmail.com with ESMTPSA id a8-20020a63d408000000b005cf5bf78b74sm11879309pgh.17.2024.03.07.20.44.02 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 07 Mar 2024 20:44:02 -0800 (PST) From: Yuan Fu Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.700.6\)) Subject: 30.0.50; [PATCH] rust-ts-mode doesn't fontify some enum Message-Id: Date: Thu, 7 Mar 2024 20:43:51 -0800 To: Bug Report Emacs X-Mailer: Apple Mail (2.3731.700.6) Received-SPF: pass client-ip=2607:f8b0:4864:20::22b; envelope-from=casouri@gmail.com; helo=mail-oi1-x22b.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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) X-Debug-CC: dev@rjt.dev (I lied a little bit about on the [PATCH] part: I have a solution but = didn=E2=80=99t turn it into a patch yet.) The problem is follows: given the rust code below, some enum are not = fontified with type face under font lock level 3, and those enum are = fontified as function or variable under font lock level 4. fn main() { func(MyEnum::VariantA(0)); func(MyEnum::VariantB); func(VariantC); func(VariantD(0)); } VariantA and VariantB are fontified correctly, but VariantC and VariantD = are not. I think a simple rule that fontifies every capitalized identifier would = fix this. But I don=E2=80=99t know if that=E2=80=99ll create other = problem. AFAIK capitalized identifier is always some type in rust, = right? This is first reported on rust-mode=E2=80=99s GitHub repo: = https://github.com/rust-lang/rust-mode/issues/518 Yuan= From debbugs-submit-bounces@debbugs.gnu.org Fri Mar 08 17:56:53 2024 Received: (at 69625) by debbugs.gnu.org; 8 Mar 2024 22:56:53 +0000 Received: from localhost ([127.0.0.1]:59909 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rij92-0004br-M5 for submit@debbugs.gnu.org; Fri, 08 Mar 2024 17:56:53 -0500 Received: from wout5-smtp.messagingengine.com ([64.147.123.21]:50269) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rij8x-0004bZ-3G for 69625@debbugs.gnu.org; Fri, 08 Mar 2024 17:56:51 -0500 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.west.internal (Postfix) with ESMTP id 3230832002E2; Fri, 8 Mar 2024 17:56:07 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Fri, 08 Mar 2024 17:56:07 -0500 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=fm3; t=1709938566; x=1710024966; bh=L5HwASJ2oH7A6ovSYOjIkCsv4Rm0sXPmsiOnMfKWjAs=; b= RbGJutg6sWWcY80cJj8BLYp54Pw5117xAVYKf710XPyKb9h379ed+uxjU3RRFJ5p IVWLTbvC5JPyPWL/o5UsrvpvODVUAsx9C5xfqm3lpso7cdlIT0K8LtrHZJjxZRER 4qnXU7iOQR2h1KZdN3P9xWCx9xD7zOhokeJLYqXmRMh1dpZoaI/u7yv+6vG3LBmq p3y5XoBOgyXChAh5MR8PGjz5PGsDRTIrDBZrXe6LeLtKrQSwNsyeRUbWkked0sG7 jLqH3bUymFE63JCRpSLaqsVKx47O14jnnCDo1kH0cqY7mrNta03KtR7S9U+g0lPC Fn18ppm6Z/2Fa03Jjx9X3Q== 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-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1709938566; x= 1710024966; bh=L5HwASJ2oH7A6ovSYOjIkCsv4Rm0sXPmsiOnMfKWjAs=; b=h 1CToDRghMj3XmUoFhFx/kS552hi2VkJfQQizgqo8tUMP0Rixq1OYWwzglWf0Jqbb W0mID8M7pW+KRv9Cshj3gUSFXUtOPiHrMHlAhZOAmxCWPnwAuAuS2CP2LhKucOD3 FuvkSqPHoqVpY05mDrmFbrZMLfdhNuWKYbSwXD7vcgf/90Jgc2h6lsKPTjUHQz82 yexxBUZChYWATMeoozMbCfz2LOwaL4JMBqF9pZzPZ57U5idTYYjSj7EdXbT9JSs5 SUmYlbhPgEXMbnoheSq8JVIUW4opvNLUx+zVJ3KbvOFD64uMTMJlUchL9CRsK01C ale5P2ontpT4N12AB9IcA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrieeigddtgecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhepkfffgggfuffvfhfhjggtgfesthekre dttddvjeenucfhrhhomhepffhmihhtrhihucfiuhhtohhvuceoughmihhtrhihsehguhht ohhvrdguvghvqeenucggtffrrghtthgvrhhnpeegueegteffuddvjeevvdelleeitdeftd duhfeffeffjedukeevjedvfeffgfevgeenucevlhhushhtvghrufhiiigvpedtnecurfgr rhgrmhepmhgrihhlfhhrohhmpegumhhithhrhiesghhuthhovhdruggvvh X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 8 Mar 2024 17:56:05 -0500 (EST) Message-ID: <085f5fb8-ac4c-45de-80e8-8f60adf54515@gutov.dev> Date: Sat, 9 Mar 2024 00:56:04 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: bug#69625: 30.0.50; [PATCH] rust-ts-mode doesn't fontify some enum Content-Language: en-US To: Yuan Fu , 69625@debbugs.gnu.org References: From: Dmitry Gutov In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 69625 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) On 08/03/2024 06:43, Yuan Fu wrote: > The problem is follows: given the rust code below, some enum are not > fontified with type face under font lock level 3, and those enum are > fontified as function or variable under font lock level 4. > > fn main() { > func(MyEnum::VariantA(0)); > func(MyEnum::VariantB); > func(VariantC); > func(VariantD(0)); > } > > VariantA and VariantB are fontified correctly, but VariantC and VariantD > are not. > > I think a simple rule that fontifies every capitalized identifier would > fix this. But I don’t know if that’ll create other problem. AFAIK > capitalized identifier is always some type in rust, right? This might be more of an issue with highlighters order. As you can see, level 3 fontifies these as 'type' already, and does that because the identifiers are capitalized. Some level 4 rules probably either come earlier than where they should be (thus applying before the ones with the "capitalized" matcher), or they should use a "not capitalized" matcher if moving them down would cause other problems. From debbugs-submit-bounces@debbugs.gnu.org Fri Mar 08 22:51:28 2024 Received: (at 69625) by debbugs.gnu.org; 9 Mar 2024 03:51:28 +0000 Received: from localhost ([127.0.0.1]:60164 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rink7-0003mJ-Vn for submit@debbugs.gnu.org; Fri, 08 Mar 2024 22:51:28 -0500 Received: from mail-4317.proton.ch ([185.70.43.17]:18963) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rink5-0003m4-3r for 69625@debbugs.gnu.org; Fri, 08 Mar 2024 22:51:27 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rjt.dev; s=protonmail; t=1709956245; x=1710215445; bh=e67QKpJRvE6ZSXEts+GZOw0G3EqLkLeL5NmcM6RNhek=; 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=i94ujihql5InhKwIK0xN55HN3z2Xz9y4QC9TbZPDQonVeio3wG/aiXF7+o2Chhkzk ANUDZmbMF9GU3oZlG7GrdivIJwry7Vm0eZNNFwvJBLzQIoOsiHiDqPFU/cqkH0xBWo My4P+yrK7+rOPTFjsIWTHYECGw3ZyglcxgmivmReAZBB87bnLmcJGZ7Yi8XzagvJzT EyMy4NtJHBAfPhoyswHWW/rhOGi4gNga1pLWYrw54heds4dMkxSE4ZnrsmmvaREEhx HjW/WkPfhh60p4rJuAWPMkVo6ZlpTw0h8AaQEEj8JIzURYQV3zy0NgWl/8dCV53ICU 4NNT6cmj+lzgg== Date: Sat, 09 Mar 2024 03:50:38 +0000 To: Yuan Fu From: Randy Taylor Subject: Re: bug#69625: 30.0.50; [PATCH] rust-ts-mode doesn't fontify some enum Message-ID: <36fGsZdSJ-V_6XVD6SuMoXHJKJ3e5x6xytnwwi2VJ0zzfcRRgOnY2FnWmCLfz4hifa1fkoMw0xCv4glCe8MZkoMqsUxsaY2N8LA1avOeaQk=@rjt.dev> In-Reply-To: References: Feedback-ID: 44397038:user:proton MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 69625 Cc: Dmitry Gutov , 69625@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On Thursday, March 7th, 2024 at 23:43, Yuan Fu wrote: >=20 > X-Debug-CC: dev@rjt.dev mailto:dev@rjt.dev Should be X-Debbugs-CC ;). >=20 >=20 > (I lied a little bit about on the [PATCH] part: I have a solution but did= n=E2=80=99t turn it into a patch yet.) >=20 > The problem is follows: given the rust code below, some enum are not font= ified with type face under font lock level 3, and those enum are fontified = as function or variable under font lock level 4. >=20 > fn main() { > func(MyEnum::VariantA(0)); > func(MyEnum::VariantB); > func(VariantC); > func(VariantD(0)); > } >=20 > VariantA and VariantB are fontified correctly, but VariantC and VariantD = are not. >=20 > I think a simple rule that fontifies every capitalized identifier would f= ix this. But I don=E2=80=99t know if that=E2=80=99ll create other problem. = AFAIK capitalized identifier is always some type in rust, right? >=20 For VariantA and VariantD, these are constructors being used as functions, so I think they are technically being highlighted correctly at level 4. Whether or not that is desired is another question - I think that is simply a matter of opinion/preference. VariantA gets highlighted as a type and not a function at level 3 because t= hat level doesn't support functions, but does support types. Maybe that could b= e considered a bug in that it shouldn't be highlighted at all for level 3? I'm not sure how worth it would be to do something about that though, or ho= w easy. For VariantC, our (and tree-sitter's) best guess is that it's a variable. We can't really know it's a type without guessing - like assuming a capital= ized identifier is a type, and I don't think that's something we can assume. Peo= ple can have capitalized functions and variables even if that goes against Rust= 's usual style. Perhaps as a compromise we could introduce a variable (or some= thing) that lets the user specify that all capitalized identifiers should be treat= ed as types? Maybe it even makes sense to default it to that behaviour since I be= lieve most Rust code follows that style. I don't really think this is a tree-sitter problem to solve but more so an = LSP one: tree-sitter can't know that all of these are enums based on how they are us= ed. As was mentioned in that GitHub thread, LSP with semantic tokens is the way= to go for the most accuracy. But even with semantic tokens, how to highlight enum= variants being used as functions comes down to opinion methinks. > This is first reported on rust-mode=E2=80=99s GitHub repo: https://github= .com/rust-lang/rust-mode/issues/518 >=20 > Yuan From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 14 21:53:30 2024 Received: (at 69625) by debbugs.gnu.org; 15 Mar 2024 01:53:30 +0000 Received: from localhost ([127.0.0.1]:50999 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rkwlF-0004Lg-Ed for submit@debbugs.gnu.org; Thu, 14 Mar 2024 21:53:30 -0400 Received: from wout4-smtp.messagingengine.com ([64.147.123.20]:55967) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rkwlA-0004LQ-27 for 69625@debbugs.gnu.org; Thu, 14 Mar 2024 21:53:27 -0400 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id 32EC53200063; Thu, 14 Mar 2024 21:52:42 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Thu, 14 Mar 2024 21:52:42 -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=fm3; t=1710467561; x=1710553961; bh=wdJKPRQV+8TaiVsafUEWEttjLuLNnNjI6Chzlmxj3tM=; b= gAujNZx11x5qWYx0dTZwWt1LGBeyn5cNEI7gtV89KwulpjDHSKNUZgRBm7QyfgKm y/CPHF/45Y0COsZLG8zenNxrO3ToYZypyvWx00vvEd8CU6/JPiEtk2iufA0YH0Wi bptbQNiNeI51/T3QTr6SN2NoHQgqBmLpbqo5E/LyoLNtIniYiQjkGL/JZTtPTq13 ByxHUHSeZXjl/ZrD9vKNdtPNvipEVXmSh4THbh5BCbxpojsGNZdHw+xlK68gm7YA btliIQxvIHdPvfCSMD0cKMtikf32ktNtHw2dTs2BUWgcMAiVajwLG+gd+SAQ49mk qqpBgU5Sf6rXl306TWMz5Q== 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-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1710467561; x= 1710553961; bh=wdJKPRQV+8TaiVsafUEWEttjLuLNnNjI6Chzlmxj3tM=; b=B mnj/L/KhuZ2VJf3gm5QB8dQpPTVdOTtJtXiQacBmx08S/6DTCiLgm60fn1IrLFfg ig3aqCVV09vFdUbmKZZUGSrRJCmLvWiuOOmBEPqyFPAbSM3DNpDX9H11EEmV8XRG DqPMtca5yp1alp+RNJNh48WLqkCWfUE3o7nvR30vzIb/4+Ng7+KM2DTLCoiduoUZ VzSfPQE+MVbr+H6soEYM4lqKV9UexykeAsnytLh0Fjjv2WAI4goCurusCCkJUdQV 9cSAwVJepSIrDWWT4PnMu1ivXo+qGvhXfs/pG7Ny6I3eoIPK1ufUxKPNFMLVf0oY brWDEK22olWr0U8fjXqGQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrjeekgdefkecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhepkfffgggfuffvvehfhfgjtgfgsehtje ertddtvdejnecuhfhrohhmpeffmhhithhrhicuifhuthhovhcuoegumhhithhrhiesghhu thhovhdruggvvheqnecuggftrfgrthhtvghrnhepteduleejgeehtefgheegjeekueehvd evieekueeftddvtdevfefhvdevgedujeehnecuvehluhhsthgvrhfuihiivgeptdenucfr rghrrghmpehmrghilhhfrhhomhepughmihhtrhihsehguhhtohhvrdguvghv X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 14 Mar 2024 21:52:40 -0400 (EDT) Message-ID: <32ead709-88d3-4a96-b224-bc29aee3ae86@gutov.dev> Date: Fri, 15 Mar 2024 03:52:38 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: bug#69625: 30.0.50; [PATCH] rust-ts-mode doesn't fontify some enum Content-Language: en-US To: Randy Taylor , Yuan Fu References: <36fGsZdSJ-V_6XVD6SuMoXHJKJ3e5x6xytnwwi2VJ0zzfcRRgOnY2FnWmCLfz4hifa1fkoMw0xCv4glCe8MZkoMqsUxsaY2N8LA1avOeaQk=@rjt.dev> From: Dmitry Gutov In-Reply-To: <36fGsZdSJ-V_6XVD6SuMoXHJKJ3e5x6xytnwwi2VJ0zzfcRRgOnY2FnWmCLfz4hifa1fkoMw0xCv4glCe8MZkoMqsUxsaY2N8LA1avOeaQk=@rjt.dev> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 69625 Cc: 69625@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) On 09/03/2024 05:50, Randy Taylor wrote: > VariantA gets highlighted as a type and not a function at level 3 because that > level doesn't support functions, but does support types. Maybe that could be > considered a bug in that it shouldn't be highlighted at all for level 3? Probably. > I'm not sure how worth it would be to do something about that though, or how > easy. Same. I haven't looked into it. > For VariantC, our (and tree-sitter's) best guess is that it's a variable. > We can't really know it's a type without guessing - like assuming a capitalized > identifier is a type, and I don't think that's something we can assume. People > can have capitalized functions and variables even if that goes against Rust's > usual style. Perhaps as a compromise we could introduce a variable (or something) > that lets the user specify that all capitalized identifiers should be treated as > types? Maybe it even makes sense to default it to that behaviour since I believe > most Rust code follows that style. We do have some rules already that are based off whether an identifier is capitalized. I.e. some for use_as_clause, and another for highlighting an identifier with font-lock-constant-face if it's ALL_CAPS. So it might be logical to carry on with that approach. If the style is consistent enough across the ecosystem, of course. We could add a variable too, but that'd make the rules more complex so it would be helpful to understand first whether there are users who would benefit. From debbugs-submit-bounces@debbugs.gnu.org Fri Mar 15 21:39:02 2024 Received: (at 69625) by debbugs.gnu.org; 16 Mar 2024 01:39:03 +0000 Received: from localhost ([127.0.0.1]:54549 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rlJ0k-0007fC-MK for submit@debbugs.gnu.org; Fri, 15 Mar 2024 21:39:02 -0400 Received: from mail-4323.proton.ch ([185.70.43.23]:27769) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rlJ0W-0007ek-4d for 69625@debbugs.gnu.org; Fri, 15 Mar 2024 21:38:56 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rjt.dev; s=protonmail2; t=1710553079; x=1710812279; bh=YT4TrB0igK2oJGFwqyKcbAtgCCcokPKSxptxxOYB8B4=; 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=Iz5hEZw9tIYKLF5vYvYXOPxsiaegTXcpuhjEX75GC6u3uWyvsT/MGgzaqWQ5qorXV pYwgH4UBRWZuBc8Jx+sICtJ9S20P/bybpF3znN5F85IRshUQjU/Ex88jYzP3Uvx0jY JLZOhodB8Q7Otfg8fvX/JkTg/Kde59JiKJFu6SL2nlg98qBoqy3Uvi75FbSBVXCVnn viYkqnfsyTN9x6IYpU2Cd3iDgq303pyTiaDDGC89NutVjF4Z1CKFiqOtorbrk1VX2b fkbuflb/AGLN7bJmzqMqqO7Hlv6MIrVVryOSB/dPL+dX7jHrq7g+e17MaQNqI0Ftmk 56GdyQeVQv1yQ== Date: Sat, 16 Mar 2024 01:37:34 +0000 To: Dmitry Gutov From: Randy Taylor Subject: Re: bug#69625: 30.0.50; [PATCH] rust-ts-mode doesn't fontify some enum Message-ID: In-Reply-To: <32ead709-88d3-4a96-b224-bc29aee3ae86@gutov.dev> References: <36fGsZdSJ-V_6XVD6SuMoXHJKJ3e5x6xytnwwi2VJ0zzfcRRgOnY2FnWmCLfz4hifa1fkoMw0xCv4glCe8MZkoMqsUxsaY2N8LA1avOeaQk=@rjt.dev> <32ead709-88d3-4a96-b224-bc29aee3ae86@gutov.dev> Feedback-ID: 44397038:user:proton MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 69625 Cc: Yuan Fu , 69625@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On Thursday, March 14th, 2024 at 21:52, Dmitry Gutov wro= te: >=20 >=20 > On 09/03/2024 05:50, Randy Taylor wrote: >=20 > > VariantA gets highlighted as a type and not a function at level 3 becau= se that > > level doesn't support functions, but does support types. Maybe that cou= ld be > > considered a bug in that it shouldn't be highlighted at all for level 3= ? >=20 >=20 > Probably. >=20 > > I'm not sure how worth it would be to do something about that though, o= r how > > easy. >=20 >=20 > Same. I haven't looked into it. >=20 > > For VariantC, our (and tree-sitter's) best guess is that it's a variabl= e. > > We can't really know it's a type without guessing - like assuming a cap= italized > > identifier is a type, and I don't think that's something we can assume.= People > > can have capitalized functions and variables even if that goes against = Rust's > > usual style. Perhaps as a compromise we could introduce a variable (or = something) > > that lets the user specify that all capitalized identifiers should be t= reated as > > types? Maybe it even makes sense to default it to that behaviour since = I believe > > most Rust code follows that style. >=20 >=20 > We do have some rules already that are based off whether an identifier > is capitalized. I.e. some for use_as_clause, and another for > highlighting an identifier with font-lock-constant-face if it's > ALL_CAPS. So it might be logical to carry on with that approach. >=20 > If the style is consistent enough across the ecosystem, of course. >=20 Indeed, but those rules (minus the ALL_CAPS one) don't apply to all identifiers but rather specific kinds (most if not all applying to use declarations). > We could add a variable too, but that'd make the rules more complex so > it would be helpful to understand first whether there are users who > would benefit. Agreed. This is the first I've heard it mentioned. From debbugs-submit-bounces@debbugs.gnu.org Mon Apr 08 03:25:52 2024 Received: (at 69625) by debbugs.gnu.org; 8 Apr 2024 07:25:52 +0000 Received: from localhost ([127.0.0.1]:45212 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rtjO3-00078V-8H for submit@debbugs.gnu.org; Mon, 08 Apr 2024 03:25:52 -0400 Received: from mail-pf1-x435.google.com ([2607:f8b0:4864:20::435]:51623) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rtjNz-00077n-8j for 69625@debbugs.gnu.org; Mon, 08 Apr 2024 03:25:49 -0400 Received: by mail-pf1-x435.google.com with SMTP id d2e1a72fcca58-6ed267f2936so581304b3a.3 for <69625@debbugs.gnu.org>; Mon, 08 Apr 2024 00:25:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1712561134; x=1713165934; 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=nx2BEvTgraLMK+t3b68ZtYuWqfzNAGPeu2SMaO69BdE=; b=P8Xb9t3XTdQIiqFImM6zQmTSgsyyOBxsaH5uh5NkWR5cr8jELrc7K/wo3vY0Cg9vdK LXCJf4l+DBWuklTTVp8d6salUqO4IDrag1A9yDthiM2lN2eJ7cKVfr/JsIgw/ckMZx6y vdMiRh5GcGHnvCnYaF98fXmfSFeb4+tmlyFZlqLjn9i8wpCqJUfz2AY1mr0NpYq1AvZ3 3m3nFC4yY8cHR5aDGxFaZPNz/oAVEJ1dtz9voseOyvb/E5owUUtA4Gzdu3eiQ7zhvGZX ec1DtLj/teEXcJOy4F6DodTHHCamG0iwVbigBPAImqlT+z1gC16mKbhGXo3G1OhieTYg RXNQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712561134; x=1713165934; 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=nx2BEvTgraLMK+t3b68ZtYuWqfzNAGPeu2SMaO69BdE=; b=jNI9UegVe7PG4b+hKyIdKIAQGo/yACb1J1VA3Bkb20A6PAY6U93jFic1MG5oKfuyhO r6VUkzkJXVKBcfULDW5y27XZWo598Sl6Od7NwIFfKFv+mD5LYHIm5KdbDBZwC+n6vK9m YNEVzGoPL2ma/qWrMLlg0DpqSkAwbkJCI5Yz+hWPg6DjxPB0gMLRZgAqFT0T3BZKna+X oct2DEI8/AJ6r+VzSL0RuyJzz9hn1+GNPnAnLsKmlJd0ba4qPFITqLUCrs0OmSPLH5Nd 4mpL5IXKQz2d1ulhgxy5EKCwNzUdAkqPHwaF49zmSGNmBTitVoROrbWoOmlb5VwznsF8 /f5g== X-Forwarded-Encrypted: i=1; AJvYcCUZUjOX4Qp1gpqDPzAQHdjcDTQWM/UPTlVXAYCSgNnVXiyOSWAkK6tbEsrXDn4u/GS7/EG3cFZRfelBZuatlnJ/UEubPrU= X-Gm-Message-State: AOJu0YwCjHJgdXmpN5B+m78GHf8U557200GmhfIFjiAn6GzWH/XDJ563 xPM2iHdFCjR+4aUSZyJKhIx0gXH8KcMhmiwEH6CANrySrcPbm634SY7RUgUb X-Google-Smtp-Source: AGHT+IG2Qd+bjofJs9uNvj6o1W6VyqtwRm6c42kuLHJ2HQMoAT/aa/BT52uTUF+/5WW5/K55tSIn2Q== X-Received: by 2002:a05:6a20:430f:b0:1a7:6ae2:4811 with SMTP id h15-20020a056a20430f00b001a76ae24811mr2179168pzk.44.1712561134114; Mon, 08 Apr 2024 00:25:34 -0700 (PDT) Received: from smtpclient.apple ([2601:641:300:4910:6c00:57e9:a6fc:238b]) by smtp.gmail.com with ESMTPSA id g14-20020aa7874e000000b006e69a142458sm5810842pfo.213.2024.04.08.00.25.33 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 08 Apr 2024 00:25:33 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.700.6\)) Subject: Re: bug#69625: 30.0.50; [PATCH] rust-ts-mode doesn't fontify some enum From: Yuan Fu In-Reply-To: <32ead709-88d3-4a96-b224-bc29aee3ae86@gutov.dev> Date: Mon, 8 Apr 2024 00:25:22 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: References: <36fGsZdSJ-V_6XVD6SuMoXHJKJ3e5x6xytnwwi2VJ0zzfcRRgOnY2FnWmCLfz4hifa1fkoMw0xCv4glCe8MZkoMqsUxsaY2N8LA1avOeaQk=@rjt.dev> <32ead709-88d3-4a96-b224-bc29aee3ae86@gutov.dev> To: Dmitry Gutov X-Mailer: Apple Mail (2.3731.700.6) X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: 69625 Cc: Randy Taylor , 69625@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.3 (/) > On Mar 14, 2024, at 6:52 PM, Dmitry Gutov wrote: >=20 > On 09/03/2024 05:50, Randy Taylor wrote: >> VariantA gets highlighted as a type and not a function at level 3 = because that >> level doesn't support functions, but does support types. Maybe that = could be >> considered a bug in that it shouldn't be highlighted at all for level = 3? >=20 > Probably. >=20 >> I'm not sure how worth it would be to do something about that though, = or how >> easy. >=20 > Same. I haven't looked into it. >=20 >> For VariantC, our (and tree-sitter's) best guess is that it's a = variable. >> We can't really know it's a type without guessing - like assuming a = capitalized >> identifier is a type, and I don't think that's something we can = assume. People >> can have capitalized functions and variables even if that goes = against Rust's >> usual style. Perhaps as a compromise we could introduce a variable = (or something) >> that lets the user specify that all capitalized identifiers should be = treated as >> types? Maybe it even makes sense to default it to that behaviour = since I believe >> most Rust code follows that style. >=20 > We do have some rules already that are based off whether an identifier = is capitalized. I.e. some for use_as_clause, and another for = highlighting an identifier with font-lock-constant-face if it's = ALL_CAPS. So it might be logical to carry on with that approach. >=20 > If the style is consistent enough across the ecosystem, of course. >=20 > We could add a variable too, but that'd make the rules more complex so = it would be helpful to understand first whether there are users who = would benefit. For some reason I couldn=E2=80=99t see Randy=E2=80=99s messages. So = sorry if I missed anything. I suggest we go ahead with guessing and add = the variable if enough people complain. Personally speaking I believe = the vast majority of Rust community wouldn=E2=80=99t write Rust code = with capitalized variable and non-capitalized types. The Rust community = is very much inclined to the standard style, AFAICT. Yuan= From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 22 07:08:16 2024 Received: (at 69625) by debbugs.gnu.org; 22 Jun 2024 11:08:16 +0000 Received: from localhost ([127.0.0.1]:44558 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sKybQ-00040U-7k for submit@debbugs.gnu.org; Sat, 22 Jun 2024 07:08:16 -0400 Received: from mail-ed1-f48.google.com ([209.85.208.48]:47369) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sKybN-00040B-7V for 69625@debbugs.gnu.org; Sat, 22 Jun 2024 07:08:14 -0400 Received: by mail-ed1-f48.google.com with SMTP id 4fb4d7f45d1cf-57d06101d76so2942786a12.3 for <69625@debbugs.gnu.org>; Sat, 22 Jun 2024 04:08:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719054428; x=1719659228; darn=debbugs.gnu.org; h=content-transfer-encoding:cc:to:subject:message-id:date :mime-version:references:in-reply-to:from:from:to:cc:subject:date :message-id:reply-to; bh=pOxQs/YybgkdpPZxutKIxcBIth/v0BoukLzTRSzTboc=; b=SVj0LgWj67nUTsb3xgEbRfzO6zQ2w3YSgypmbAu/40zec1/k0ZIKnmIgIjD84GDR4k reVxxGCQWCh+yyWMYqU1HumNQvRW4JYDA30U8uMm+aee509dQG7BJbRtW+Bd1niL8u56 14Qwvh0ZsqJs7YZ1mGTKen94ubZ/8DVWmFW0qR4pHPNPNYp9TBv4pjieYAVB56tXqZSj 0+Bdts//YsRwoofTnG643K0Pf5HJjah9MjKSROrX4dQo1wv3iuLNSnuDznZBT1bCLzG0 zq1NPfrlMCtHvhIdDVs2eCM0mviyCQuGxQ1svm7g+QWCtg5DBS9bJbtv481s+S0p8ImY fBWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719054428; x=1719659228; h=content-transfer-encoding:cc:to:subject:message-id:date :mime-version:references:in-reply-to:from:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=pOxQs/YybgkdpPZxutKIxcBIth/v0BoukLzTRSzTboc=; b=jSb5j+yLKeZVOkfUpUX9Hg1zYe8HPY7TGifjbv9GjLkRAp9mcCWkjYAttTlQnPd094 Q8d+cqXDofApThKhpO7Nh+klC6PA9JZIRtAGUboETWb077/ocPVp7wl8FUqZTLpVKflw ZsgxZEEeNrSiQIbluVuDdFV280gc1Rf8Co+z+dAhqPoHHqtstC9gpz69q7s6HjONiyTf zjrP1lpX7XdL85kCuhjMMGMSRYGQa1xiIH30ayz7Ge0KUj/L0gP+98POdACp+uFroMxA zFeLbMOm1pWhzV7hjzG03Fundigbu10Ax4jRrLs3ZGBdXQPFpsp0cP2G35lA9duidmCV wUtA== X-Forwarded-Encrypted: i=1; AJvYcCXLExYQhvhmRvEMuu4KEl4fVXAIa5+UmYCtHczCQ5KVD4FFApgHbJmUFpdsGvXIl3g20DsVfHsbQjo10zqgIFsFVfGbsA0= X-Gm-Message-State: AOJu0YzZHNLHABdFpX82zZC4UMb1UBHjiGtwmM7bBVANOKNY1OPSKOte 4mv3BYtDTky7WtxNELwaR9lsxyIgMH8c1PtBUtypIkyz84pQ8j4g5zKoSI965Uzpwd+KykNtFeu 5bLaJJBHO4npYnC0isV/zQH1VU/k= X-Google-Smtp-Source: AGHT+IGs9tk3fME6TR03z6r3JN5hFVaf/0OidiI4ULD0rEbQV+cNax3HydvlGFVvxfKCyEeZBpir/QRopVZ2f8gsJcs= X-Received: by 2002:a50:a693:0:b0:57c:68fd:2bc9 with SMTP id 4fb4d7f45d1cf-57d49c976d1mr149447a12.3.1719054427364; Sat, 22 Jun 2024 04:07:07 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Sat, 22 Jun 2024 04:07:07 -0700 From: Stefan Kangas In-Reply-To: References: <36fGsZdSJ-V_6XVD6SuMoXHJKJ3e5x6xytnwwi2VJ0zzfcRRgOnY2FnWmCLfz4hifa1fkoMw0xCv4glCe8MZkoMqsUxsaY2N8LA1avOeaQk=@rjt.dev> <32ead709-88d3-4a96-b224-bc29aee3ae86@gutov.dev> MIME-Version: 1.0 Date: Sat, 22 Jun 2024 04:07:07 -0700 Message-ID: Subject: Re: bug#69625: 30.0.50; [PATCH] rust-ts-mode doesn't fontify some enum To: Yuan Fu , Dmitry Gutov Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 69625 Cc: Randy Taylor , 69625@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Yuan Fu writes: >> On Mar 14, 2024, at 6:52 PM, Dmitry Gutov wrote: >> >> On 09/03/2024 05:50, Randy Taylor wrote: >>> VariantA gets highlighted as a type and not a function at level 3 becau= se that >>> level doesn't support functions, but does support types. Maybe that cou= ld be >>> considered a bug in that it shouldn't be highlighted at all for level 3= ? >> >> Probably. >> >>> I'm not sure how worth it would be to do something about that though, o= r how >>> easy. >> >> Same. I haven't looked into it. >> >>> For VariantC, our (and tree-sitter's) best guess is that it's a variabl= e. >>> We can't really know it's a type without guessing - like assuming a cap= italized >>> identifier is a type, and I don't think that's something we can assume.= People >>> can have capitalized functions and variables even if that goes against = Rust's >>> usual style. Perhaps as a compromise we could introduce a variable (or = something) >>> that lets the user specify that all capitalized identifiers should be t= reated as >>> types? Maybe it even makes sense to default it to that behaviour since = I believe >>> most Rust code follows that style. >> >> We do have some rules already that are based off whether an identifier i= s capitalized. I.e. some for use_as_clause, and another for highlighting an= identifier with font-lock-constant-face if it's ALL_CAPS. So it might be l= ogical to carry on with that approach. >> >> If the style is consistent enough across the ecosystem, of course. >> >> We could add a variable too, but that'd make the rules more complex so i= t would be helpful to understand first whether there are users who would be= nefit. > > For some reason I couldn=E2=80=99t see Randy=E2=80=99s messages. So sorry= if I missed anything. I suggest we go ahead with guessing and add the vari= able if enough people complain. Personally speaking I believe the vast majo= rity of Rust community wouldn=E2=80=99t write Rust code with capitalized va= riable and non-capitalized types. The Rust community is very much inclined = to the standard style, AFAICT. Yuan, did you make any progress here? From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 22 19:18:36 2024 Received: (at 69625) by debbugs.gnu.org; 22 Jun 2024 23:18:37 +0000 Received: from localhost ([127.0.0.1]:35596 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sLA0C-0008NA-Ir for submit@debbugs.gnu.org; Sat, 22 Jun 2024 19:18:36 -0400 Received: from mail-pg1-f180.google.com ([209.85.215.180]:53534) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sLA0A-0008Mr-7X for 69625@debbugs.gnu.org; Sat, 22 Jun 2024 19:18:35 -0400 Received: by mail-pg1-f180.google.com with SMTP id 41be03b00d2f7-7182a634815so978769a12.3 for <69625@debbugs.gnu.org>; Sat, 22 Jun 2024 16:18:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719098248; x=1719703048; 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=aJP/UeTGgc6JiEjrvHcQWjTk723KsxwLRSX9hUImOH8=; b=ROaKbOChIyDpb6hZ8KwwlF9bIPijdp+vXN/XjtaHCH6Eimk5xln69o0N9rQKxEWVI2 KnwzPzAn8fNSaCc5WE3u3glZJW0X8Wg2hOwQy3nU0qbh4C4nMNt8utCgJbv54PE2Vbxr ofOZplL5WkZ2DH7Rvgy73yVZyQd43r7fNwyicwqi0/NG7IYgY6nOlR7ZW1JAmGIsuR+b R8G2amM+t10/i2g3kGwNjJiO7xQ+2ohctOsSA2Z5T5Bf/CJPnfh1zD0xWjO/1XWRTmn1 JVMu9IfJhlpZb8Hq6C7wZznNGTvsIymqVmltCTui6sTb7RcST/e/mhfkV4tWzoSxOr+W hvAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719098248; x=1719703048; 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=aJP/UeTGgc6JiEjrvHcQWjTk723KsxwLRSX9hUImOH8=; b=P1iMWpIgGRs72NfhYZ7IU7/jYS62R+Ub1AZxJAt4XrVEoSTsbPM2a0AGmRoUjwCq8n lY8LVqO5cLC6SqKyvcR6WG0GsTBCM8KZsS0Qw0syllZyyEW8vDFGHC+U2mZSl9pWcRnh AepF7olHxoeKuYPRHGqx5ubKWvHVboAKHcIoT/jXddkV4LgOiUswrK7X1+n6KHgyyHah 9U9EWo5PLH4m074LF6bAtbQVcwRlTjWnF7KGPGnp4OGnUXgQEy2Tk/GkNXXOCfsInJNa ag9/hmX5YfB3/u/GCC/EBmTO0jWWNwPrWhfjY3/f+C1H4Fv9W+SpgFVPKug7tSD9nucW j64w== X-Forwarded-Encrypted: i=1; AJvYcCXSbY8HBeICTrWANF9e0bISzPTcVMbXQ0Cfq0EhfS95005tZvJfwHAtOs9/Oqrpa4vlRo++jzUBnr5VaB+r+LQIZKZXXn4= X-Gm-Message-State: AOJu0Yy6XEvVSwu+0tILk0JQeh/SXAlbe05RCApXF2qZaPkW1kjnhl8Q 5pcSGDzvApDq2sxH5UPTy0oYFQmWx3s1yWv7fgmYvv5NWgtR1NL9 X-Google-Smtp-Source: AGHT+IHbBdToY5ntJ5WSiUmbXEZKGh1Vbzza9fJtW840Ur7Fx3ewsMhWaAtxK5158Zwk7eyyNmODvA== X-Received: by 2002:a17:903:32ce:b0:1f9:b9ed:e84e with SMTP id d9443c01a7336-1fa23f1f37dmr12263535ad.58.1719098248106; Sat, 22 Jun 2024 16:17:28 -0700 (PDT) Received: from smtpclient.apple ([2601:646:8f81:6120:20fa:247c:4f0e:e2a2]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1f9eb3c5ea7sm36021795ad.175.2024.06.22.16.17.27 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 22 Jun 2024 16:17:27 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3774.600.62\)) Subject: Re: bug#69625: 30.0.50; [PATCH] rust-ts-mode doesn't fontify some enum From: Yuan Fu In-Reply-To: Date: Sat, 22 Jun 2024 16:17:16 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: References: <36fGsZdSJ-V_6XVD6SuMoXHJKJ3e5x6xytnwwi2VJ0zzfcRRgOnY2FnWmCLfz4hifa1fkoMw0xCv4glCe8MZkoMqsUxsaY2N8LA1avOeaQk=@rjt.dev> <32ead709-88d3-4a96-b224-bc29aee3ae86@gutov.dev> To: Stefan Kangas X-Mailer: Apple Mail (2.3774.600.62) X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 69625 Cc: Dmitry Gutov , 69625@debbugs.gnu.org, Randy Taylor X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > On Jun 22, 2024, at 4:07=E2=80=AFAM, Stefan Kangas = wrote: >=20 > Yuan Fu writes: >=20 >>> On Mar 14, 2024, at 6:52 PM, Dmitry Gutov wrote: >>>=20 >>> On 09/03/2024 05:50, Randy Taylor wrote: >>>> VariantA gets highlighted as a type and not a function at level 3 = because that >>>> level doesn't support functions, but does support types. Maybe that = could be >>>> considered a bug in that it shouldn't be highlighted at all for = level 3? >>>=20 >>> Probably. >>>=20 >>>> I'm not sure how worth it would be to do something about that = though, or how >>>> easy. >>>=20 >>> Same. I haven't looked into it. >>>=20 >>>> For VariantC, our (and tree-sitter's) best guess is that it's a = variable. >>>> We can't really know it's a type without guessing - like assuming a = capitalized >>>> identifier is a type, and I don't think that's something we can = assume. People >>>> can have capitalized functions and variables even if that goes = against Rust's >>>> usual style. Perhaps as a compromise we could introduce a variable = (or something) >>>> that lets the user specify that all capitalized identifiers should = be treated as >>>> types? Maybe it even makes sense to default it to that behaviour = since I believe >>>> most Rust code follows that style. >>>=20 >>> We do have some rules already that are based off whether an = identifier is capitalized. I.e. some for use_as_clause, and another for = highlighting an identifier with font-lock-constant-face if it's = ALL_CAPS. So it might be logical to carry on with that approach. >>>=20 >>> If the style is consistent enough across the ecosystem, of course. >>>=20 >>> We could add a variable too, but that'd make the rules more complex = so it would be helpful to understand first whether there are users who = would benefit. >>=20 >> For some reason I couldn=E2=80=99t see Randy=E2=80=99s messages. So = sorry if I missed anything. I suggest we go ahead with guessing and add = the variable if enough people complain. Personally speaking I believe = the vast majority of Rust community wouldn=E2=80=99t write Rust code = with capitalized variable and non-capitalized types. The Rust community = is very much inclined to the standard style, AFAICT. >=20 > Yuan, did you make any progress here? =46rom what I can tell Randy isn=E2=80=99t very convince of this idea, = so I didn=E2=80=99t make any changes. Randy, should we keep the status = quo and close this or should we explore something else? Yuan= From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 28 01:53:21 2024 Received: (at 69625) by debbugs.gnu.org; 28 Jun 2024 05:53:21 +0000 Received: from localhost ([127.0.0.1]:51383 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sN4Xx-0000Tf-1o for submit@debbugs.gnu.org; Fri, 28 Jun 2024 01:53:21 -0400 Received: from mail-yw1-f180.google.com ([209.85.128.180]:58401) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sN4Xu-0000TR-Kt for 69625@debbugs.gnu.org; Fri, 28 Jun 2024 01:53:19 -0400 Received: by mail-yw1-f180.google.com with SMTP id 00721157ae682-6480542003dso2099407b3.0 for <69625@debbugs.gnu.org>; Thu, 27 Jun 2024 22:53:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719553934; x=1720158734; 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=OC2nOoRYHf831xvZeyU6c0yZ0wQdeU4p7VpefIJnjY8=; b=IlYWDRAGcEVGq7DX2BcAtVMhUaymeZ0B+mkZDffs4oX4iUeFAm+Ojhb6bgOj7TqDvI CdkvPYLQEMSUHja4CO0XDzBoJZ0MRXYgkTFcm+wZ7u7X08boVRK7eAV0nV+ePcgqaVze a4FPWoLPryGSTTMjRXEzdTuGYQe6x1dJkEUhs1m7PshnhlD3/WCFnMWqJlVLVfPmRKL/ JOdDZjTuSLJsPBgkP6mdoIHXOZH4xMht6fMFGjlEhrwVnKN73wn4dXWDDVlP28W6+Dj8 I0RFGNsvftWpj7yhBGOyNH7JaYTZhCsrxe04F7cQFi+5nsprIm9oeuFkXm7urD2iNc50 qpTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719553934; x=1720158734; 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=OC2nOoRYHf831xvZeyU6c0yZ0wQdeU4p7VpefIJnjY8=; b=W9+tVy0HxGI6ayzWXXHQlq+rAGOgC25lm0Cy4GMsDJ2vHN+1TY26fCq5rUNmFumUeO ywDl2KAOePyxGI0cdiOwsABTnpUAnr5nFLcFN979EOwGCOFTdFic63tbBKGOISpXCVWK l2OVLNQCooq18Uf4IkfKJWlbmr/MANe8zarxVrAPs/XtieWGYK6toiO8sp2TSZja3E1X gozoOU3Ki60+Os7GEzehHD8i11jbVtLj7QDfIrD+b0JaCX/Xs+A/GOE9R6d/rnXy3Q/8 NQkn04j0XhV2FZuRHlmZJSJVs1SqKDRn90sL1A6o2u7GsGZ1GZzZzVvqGH4todQqFOry TUIQ== X-Forwarded-Encrypted: i=1; AJvYcCU8BjqIayEqFXFKRK9rmGUL4MQFgQtkYqYkck4GTqIgRrokaZ7mS7748A89aVl+GA1Edrlf4UCCVBcbEtHsAV8wg7PF0iQ= X-Gm-Message-State: AOJu0YxAJvhKIAFddpQ/r+TA7/FrLuSCpU689cKyFfv+5fnZX7ri3V+q mRs9ybjQMOwyWCcGQN/rzSJfjIjeF5Pupn3OQ6SPaTVT1k9la5hozHkCciGD X-Google-Smtp-Source: AGHT+IFk/HGFQjQsaiCrf2RR07vmyomn9KWMlj8HYXGkMmHq30Jz2b0/lJiQpIJYoHU61wHItz6X3Q== X-Received: by 2002:a05:6a20:6a1d:b0:1bd:1d15:f089 with SMTP id adf61e73a8af0-1bd1d15f1cbmr14303937637.54.1719549842988; Thu, 27 Jun 2024 21:44:02 -0700 (PDT) Received: from smtpclient.apple ([2601:646:8f81:6120:905e:641:dacc:2f83]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1fac10d1c83sm6186295ad.17.2024.06.27.21.44.01 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 27 Jun 2024 21:44:02 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3774.600.62\)) Subject: Re: bug#69625: 30.0.50; [PATCH] rust-ts-mode doesn't fontify some enum From: Yuan Fu In-Reply-To: Date: Thu, 27 Jun 2024 21:43:51 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: <8D23DC8F-AC1A-4A33-8AC3-9583B9FC11AE@gmail.com> References: <36fGsZdSJ-V_6XVD6SuMoXHJKJ3e5x6xytnwwi2VJ0zzfcRRgOnY2FnWmCLfz4hifa1fkoMw0xCv4glCe8MZkoMqsUxsaY2N8LA1avOeaQk=@rjt.dev> <32ead709-88d3-4a96-b224-bc29aee3ae86@gutov.dev> To: Randy Taylor X-Mailer: Apple Mail (2.3774.600.62) X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 69625 Cc: Dmitry Gutov , Stefan Kangas , 69625@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > On Jun 27, 2024, at 7:40=E2=80=AFPM, Randy Taylor wrote: >=20 > On Saturday, June 22nd, 2024 at 19:17, Yuan Fu = wrote: >>=20 >>=20 >>=20 >>=20 >>> On Jun 22, 2024, at 4:07=E2=80=AFAM, Stefan Kangas = stefankangas@gmail.com wrote: >>>=20 >>> Yuan Fu casouri@gmail.com writes: >>>=20 >>>>> On Mar 14, 2024, at 6:52 PM, Dmitry Gutov dmitry@gutov.dev wrote: >>>>>=20 >>>>> On 09/03/2024 05:50, Randy Taylor wrote: >>>>>=20 >>>>>> VariantA gets highlighted as a type and not a function at level 3 = because that >>>>>> level doesn't support functions, but does support types. Maybe = that could be >>>>>> considered a bug in that it shouldn't be highlighted at all for = level 3? >>>>>=20 >>>>> Probably. >>>>>=20 >>>>>> I'm not sure how worth it would be to do something about that = though, or how >>>>>> easy. >>>>>=20 >>>>> Same. I haven't looked into it. >>>>>=20 >>>>>> For VariantC, our (and tree-sitter's) best guess is that it's a = variable. >>>>>> We can't really know it's a type without guessing - like assuming = a capitalized >>>>>> identifier is a type, and I don't think that's something we can = assume. People >>>>>> can have capitalized functions and variables even if that goes = against Rust's >>>>>> usual style. Perhaps as a compromise we could introduce a = variable (or something) >>>>>> that lets the user specify that all capitalized identifiers = should be treated as >>>>>> types? Maybe it even makes sense to default it to that behaviour = since I believe >>>>>> most Rust code follows that style. >>>>>=20 >>>>> We do have some rules already that are based off whether an = identifier is capitalized. I.e. some for use_as_clause, and another for = highlighting an identifier with font-lock-constant-face if it's = ALL_CAPS. So it might be logical to carry on with that approach. >>>>>=20 >>>>> If the style is consistent enough across the ecosystem, of course. >>>>>=20 >>>>> We could add a variable too, but that'd make the rules more = complex so it would be helpful to understand first whether there are = users who would benefit. >>>>=20 >>>> For some reason I couldn=E2=80=99t see Randy=E2=80=99s messages. So = sorry if I missed anything. I suggest we go ahead with guessing and add = the variable if enough people complain. Personally speaking I believe = the vast majority of Rust community wouldn=E2=80=99t write Rust code = with capitalized variable and non-capitalized types. The Rust community = is very much inclined to the standard style, AFAICT. >>>=20 >>> Yuan, did you make any progress here? >>=20 >>=20 >> =46rom what I can tell Randy isn=E2=80=99t very convince of this = idea, so I didn=E2=80=99t make any changes. Randy, should we keep the = status quo and close this or should we explore something else? >>=20 >> Yuan >=20 > Sorry for the late response. >=20 > I thought we were waiting to see if enough people complain, and AFAIK = no one else has. > Perhaps I misinterpreted your message and > you meant we should go ahead with adding this and only add the > variable to control it if people complain - apologies if so. That=E2=80=99s what I proposed, yeah. You didn=E2=80=99t say =E2=80=9Clet=E2= =80=99s do this=E2=80=9D (maybe I missed it, apologies if I did), so = obviously I didn=E2=80=99t want to jump the gun ;-) >=20 > I'm not opposed to the idea - it's the best we can do with what > we've got. The only thing I am undecided on is if we want to bother > with the variable to control it. If we did add it, it should be > on by default since, as you mentioned, the vast majority of Rust > code follows the same convention, and at that point who is actually > going to turn it off? So it's probably not worth the hassle... >=20 > Were you thinking of adding this to the type feature or its own > feature? I was thinking adding this to the type feature. IMHO config options = should be implemented by variables, not by splitting stuff into separate = tree-sitter font-lock features. I admit the name =E2=80=9Cfeature=E2=80=9D= is a bit misleading in this regard... Yuan From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 28 02:17:10 2024 Received: (at 69625) by debbugs.gnu.org; 28 Jun 2024 06:17:10 +0000 Received: from localhost ([127.0.0.1]:51629 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sN4v0-0001Di-8w for submit@debbugs.gnu.org; Fri, 28 Jun 2024 02:17:10 -0400 Received: from mail-41103.protonmail.ch ([185.70.41.103]:34143) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sN4uw-0001D9-6W for 69625@debbugs.gnu.org; Fri, 28 Jun 2024 02:17:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rjt.dev; s=protonmail2; t=1719542453; x=1719801653; bh=iYq7sMV5fox+fUnfLJoUQh+GodzYfoXsX5+ACSz/fGE=; 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=twH8TDRwpVpHQTUSdmCed/cO6f0aE5YEA0m/EGHKZAKdMt1O6/LnkFj6K90oY//P9 wJX5m88K7YDpoIa+ia0gQvkoQjBCXMgQebREEAxc4mZIkxtYjESmlLGZndbFnjX11W TNTpndIAI56+/+H7auB52FZW4EgGkdWMt6tAQ6gKjKTTC5JQ8cZsGZBeW6xqUmyncA OALgQnFolUL8/uqnEZf5xQFUBSiIfJfYwCNJyuMTcBDL2vTsZkoGA1JgzILs5Zms3P FtpEydJGd6mYfadhZ7PjxC53Xt1GR8V5grFUTb3W6juQ1fnHa4ObjEH1gg7Y1pgIUx vFUkgzgbqQq1w== Date: Fri, 28 Jun 2024 02:40:49 +0000 To: Yuan Fu From: Randy Taylor Subject: Re: bug#69625: 30.0.50; [PATCH] rust-ts-mode doesn't fontify some enum Message-ID: In-Reply-To: References: <36fGsZdSJ-V_6XVD6SuMoXHJKJ3e5x6xytnwwi2VJ0zzfcRRgOnY2FnWmCLfz4hifa1fkoMw0xCv4glCe8MZkoMqsUxsaY2N8LA1avOeaQk=@rjt.dev> <32ead709-88d3-4a96-b224-bc29aee3ae86@gutov.dev> Feedback-ID: 44397038:user:proton X-Pm-Message-ID: e2e2c5b5fe38e15e4b6505571d840aa17a8e1263 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 1.1 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: On Saturday, June 22nd, 2024 at 19:17, Yuan Fu wrote: > > > > > > On Jun 22, 2024, at 4:07 AM, Stefan Kangas stefankangas@gmail.com wrote: > > > > Yuan Fu casouri@gmail.com write [...] Content analysis details: (1.1 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 1.1 DATE_IN_PAST_03_06 Date: is 3 to 6 hours before Received: date -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [185.70.41.103 listed in list.dnswl.org] X-Debbugs-Envelope-To: 69625 Cc: Dmitry Gutov , Stefan Kangas , 69625@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.1 (/) On Saturday, June 22nd, 2024 at 19:17, Yuan Fu wrote: >=20 >=20 >=20 >=20 > > On Jun 22, 2024, at 4:07=E2=80=AFAM, Stefan Kangas stefankangas@gmail.c= om wrote: > >=20 > > Yuan Fu casouri@gmail.com writes: > >=20 > > > > On Mar 14, 2024, at 6:52 PM, Dmitry Gutov dmitry@gutov.dev wrote: > > > >=20 > > > > On 09/03/2024 05:50, Randy Taylor wrote: > > > >=20 > > > > > VariantA gets highlighted as a type and not a function at level 3= because that > > > > > level doesn't support functions, but does support types. Maybe th= at could be > > > > > considered a bug in that it shouldn't be highlighted at all for l= evel 3? > > > >=20 > > > > Probably. > > > >=20 > > > > > I'm not sure how worth it would be to do something about that tho= ugh, or how > > > > > easy. > > > >=20 > > > > Same. I haven't looked into it. > > > >=20 > > > > > For VariantC, our (and tree-sitter's) best guess is that it's a v= ariable. > > > > > We can't really know it's a type without guessing - like assuming= a capitalized > > > > > identifier is a type, and I don't think that's something we can a= ssume. People > > > > > can have capitalized functions and variables even if that goes ag= ainst Rust's > > > > > usual style. Perhaps as a compromise we could introduce a variabl= e (or something) > > > > > that lets the user specify that all capitalized identifiers shoul= d be treated as > > > > > types? Maybe it even makes sense to default it to that behaviour = since I believe > > > > > most Rust code follows that style. > > > >=20 > > > > We do have some rules already that are based off whether an identif= ier is capitalized. I.e. some for use_as_clause, and another for highlighti= ng an identifier with font-lock-constant-face if it's ALL_CAPS. So it might= be logical to carry on with that approach. > > > >=20 > > > > If the style is consistent enough across the ecosystem, of course. > > > >=20 > > > > We could add a variable too, but that'd make the rules more complex= so it would be helpful to understand first whether there are users who wou= ld benefit. > > >=20 > > > For some reason I couldn=E2=80=99t see Randy=E2=80=99s messages. So s= orry if I missed anything. I suggest we go ahead with guessing and add the = variable if enough people complain. Personally speaking I believe the vast = majority of Rust community wouldn=E2=80=99t write Rust code with capitalize= d variable and non-capitalized types. The Rust community is very much incli= ned to the standard style, AFAICT. > >=20 > > Yuan, did you make any progress here? >=20 >=20 > From what I can tell Randy isn=E2=80=99t very convince of this idea, so I= didn=E2=80=99t make any changes. Randy, should we keep the status quo and = close this or should we explore something else? >=20 > Yuan Sorry for the late response. I thought we were waiting to see if enough people complain, and AFAIK no on= e else has. Perhaps I misinterpreted your message and you meant we should go ahead with adding this and only add the variable to control it if people complain - apologies if so. I'm not opposed to the idea - it's the best we can do with what we've got. The only thing I am undecided on is if we want to bother with the variable to control it. If we did add it, it should be on by default since, as you mentioned, the vast majority of Rust code follows the same convention, and at that point who is actually going to turn it off? So it's probably not worth the hassle... Were you thinking of adding this to the type feature or its own feature? From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 28 22:38:00 2024 Received: (at 69625) by debbugs.gnu.org; 29 Jun 2024 02:38:00 +0000 Received: from localhost ([127.0.0.1]:36517 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sNNyR-0006zo-GG for submit@debbugs.gnu.org; Fri, 28 Jun 2024 22:37:59 -0400 Received: from mail-4323.proton.ch ([185.70.43.23]:19715) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sNNyP-0006zZ-5m for 69625@debbugs.gnu.org; Fri, 28 Jun 2024 22:37:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rjt.dev; s=protonmail2; t=1719628670; x=1719887870; bh=cvXRiyQk06YNVE5C1WQp8yu74BCi2qpUm2R9xeh/TWo=; 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=IafsvkEjyh0HVbmRnfm2khlvDbZhv2PAG+IT3T4LPU75uldGD+bc2CnQLWQ2ZP9iR DpaUzamOqPsY1v9ayBiZTfOUGnbcI1N8ujA8scxrBeIVs+7SaNcfEVBeJUJj1XhSRt KzEkkBVROQBgaQM3IyyjO3DfNyN7P56BSDQIyF5utA8aEgxVlFdNaSGw9We78+QjE6 cWq07LUPXftCa6wqzLQQiGDl3PlmXHcsDpee4S5tOlhufjS33yMatKpgDVEyfupiqU z3ThdsaAeTRVZvAcK10nx2uKwIYGKSA/PL97mx3aGhpbWrYlRQ79bZIu/u8iQCM0XU RW7JiCHQlnX4A== Date: Sat, 29 Jun 2024 02:37:45 +0000 To: Yuan Fu From: Randy Taylor Subject: Re: bug#69625: 30.0.50; [PATCH] rust-ts-mode doesn't fontify some enum Message-ID: In-Reply-To: <8D23DC8F-AC1A-4A33-8AC3-9583B9FC11AE@gmail.com> References: <36fGsZdSJ-V_6XVD6SuMoXHJKJ3e5x6xytnwwi2VJ0zzfcRRgOnY2FnWmCLfz4hifa1fkoMw0xCv4glCe8MZkoMqsUxsaY2N8LA1avOeaQk=@rjt.dev> <32ead709-88d3-4a96-b224-bc29aee3ae86@gutov.dev> <8D23DC8F-AC1A-4A33-8AC3-9583B9FC11AE@gmail.com> Feedback-ID: 44397038:user:proton X-Pm-Message-ID: f9731bc393a449a8d774664030416ebab1dc0a79 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 69625 Cc: Dmitry Gutov , Stefan Kangas , 69625@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On Friday, June 28th, 2024 at 00:43, Yuan Fu wrote: >=20 > > On Jun 27, 2024, at 7:40=E2=80=AFPM, Randy Taylor dev@rjt.dev wrote: > >=20 > > On Saturday, June 22nd, 2024 at 19:17, Yuan Fu casouri@gmail.com wrote: > >=20 > > > > On Jun 22, 2024, at 4:07=E2=80=AFAM, Stefan Kangas stefankangas@gma= il.com wrote: > > > >=20 > > > > Yuan Fu casouri@gmail.com writes: > > > >=20 > > > > > > On Mar 14, 2024, at 6:52 PM, Dmitry Gutov dmitry@gutov.dev wrot= e: > > > > > >=20 > > > > > > On 09/03/2024 05:50, Randy Taylor wrote: > > > > > >=20 > > > > > > > VariantA gets highlighted as a type and not a function at lev= el 3 because that > > > > > > > level doesn't support functions, but does support types. Mayb= e that could be > > > > > > > considered a bug in that it shouldn't be highlighted at all f= or level 3? > > > > > >=20 > > > > > > Probably. > > > > > >=20 > > > > > > > I'm not sure how worth it would be to do something about that= though, or how > > > > > > > easy. > > > > > >=20 > > > > > > Same. I haven't looked into it. > > > > > >=20 > > > > > > > For VariantC, our (and tree-sitter's) best guess is that it's= a variable. > > > > > > > We can't really know it's a type without guessing - like assu= ming a capitalized > > > > > > > identifier is a type, and I don't think that's something we c= an assume. People > > > > > > > can have capitalized functions and variables even if that goe= s against Rust's > > > > > > > usual style. Perhaps as a compromise we could introduce a var= iable (or something) > > > > > > > that lets the user specify that all capitalized identifiers s= hould be treated as > > > > > > > types? Maybe it even makes sense to default it to that behavi= our since I believe > > > > > > > most Rust code follows that style. > > > > > >=20 > > > > > > We do have some rules already that are based off whether an ide= ntifier is capitalized. I.e. some for use_as_clause, and another for highli= ghting an identifier with font-lock-constant-face if it's ALL_CAPS. So it m= ight be logical to carry on with that approach. > > > > > >=20 > > > > > > If the style is consistent enough across the ecosystem, of cour= se. > > > > > >=20 > > > > > > We could add a variable too, but that'd make the rules more com= plex so it would be helpful to understand first whether there are users who= would benefit. > > > > >=20 > > > > > For some reason I couldn=E2=80=99t see Randy=E2=80=99s messages. = So sorry if I missed anything. I suggest we go ahead with guessing and add = the variable if enough people complain. Personally speaking I believe the v= ast majority of Rust community wouldn=E2=80=99t write Rust code with capita= lized variable and non-capitalized types. The Rust community is very much i= nclined to the standard style, AFAICT. > > > >=20 > > > > Yuan, did you make any progress here? > > >=20 > > > From what I can tell Randy isn=E2=80=99t very convince of this idea, = so I didn=E2=80=99t make any changes. Randy, should we keep the status quo = and close this or should we explore something else? > > >=20 > > > Yuan > >=20 > > Sorry for the late response. > >=20 > > I thought we were waiting to see if enough people complain, and AFAIK n= o one else has. > > Perhaps I misinterpreted your message and > > you meant we should go ahead with adding this and only add the > > variable to control it if people complain - apologies if so. >=20 >=20 > That=E2=80=99s what I proposed, yeah. You didn=E2=80=99t say =E2=80=9Clet= =E2=80=99s do this=E2=80=9D (maybe I missed it, apologies if I did), so obv= iously I didn=E2=80=99t want to jump the gun ;-) >=20 > > I'm not opposed to the idea - it's the best we can do with what > > we've got. The only thing I am undecided on is if we want to bother > > with the variable to control it. If we did add it, it should be > > on by default since, as you mentioned, the vast majority of Rust > > code follows the same convention, and at that point who is actually > > going to turn it off? So it's probably not worth the hassle... > >=20 > > Were you thinking of adding this to the type feature or its own > > feature? >=20 >=20 > I was thinking adding this to the type feature. IMHO config options shoul= d be implemented by variables, not by splitting stuff into separate tree-si= tter font-lock features. I admit the name =E2=80=9Cfeature=E2=80=9D is a bi= t misleading in this regard... >=20 > Yuan Sounds good, we can consider an option if anyone complains. This is for master, right? From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 28 23:04:47 2024 Received: (at 69625) by debbugs.gnu.org; 29 Jun 2024 03:04:47 +0000 Received: from localhost ([127.0.0.1]:36540 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sNOON-0007fb-2A for submit@debbugs.gnu.org; Fri, 28 Jun 2024 23:04:47 -0400 Received: from mail-ed1-f47.google.com ([209.85.208.47]:59671) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sNOOL-0007fN-A0 for 69625@debbugs.gnu.org; Fri, 28 Jun 2024 23:04:46 -0400 Received: by mail-ed1-f47.google.com with SMTP id 4fb4d7f45d1cf-57cf8880f95so1544574a12.3 for <69625@debbugs.gnu.org>; Fri, 28 Jun 2024 20:04:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719630220; x=1720235020; darn=debbugs.gnu.org; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:from:to:cc:subject:date:message-id:reply-to; bh=23UouII4pQMnZOBo9a2ZzRNyCwmcUV3uwTHRdkeLfVo=; b=UXumpYTeyBIHlUqTXR/tV9C5Sx27j1EXwossOT2Kg0VvPTq7PZzn5pABhCxiEkBZWz Bpu6LnQSJGsoo0PjELkYf4A15SbCPBu/RiKQk0vLcQjgEiQlT9mPQez2UwNTxqTNUWD6 AWQmY4+GNhk7S0uksPzkXE7x43VWmYBWM+qRCyZxHH3gQnrwuh24FyJI/EVc8uI9hL3H /zBxCU510rzSOUW8RcSgfVHRfNCagrMlThX3aqlu4XHGPlySMwSGhuSyyydVX10ZlfNY 7N1+2e6/cNcJBis1HNCKfnf+dLKwEwejTLIRezc+Wy5mA6cmkACegep81eL2Z+9MTgFu edoA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719630220; x=1720235020; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=23UouII4pQMnZOBo9a2ZzRNyCwmcUV3uwTHRdkeLfVo=; b=NBZNfqbnuLyJC9Uq5YA5Efawii42u9rvv7HlGHRsF0gHdiodbVq+A9hz3z7H01j67M jkS1S1KEWZQ4GcFdp1mWCMLWE8uJirNO/b52r6Oiqk8h+AKuUjqtup4DEKAIcffS0mw9 J58RrNogywxRAILMeEkys/XdNHhpTXFybdU5YivJ1/vPB5n/JXvIH2UouuJkeaLvmDrn 9GiUEEJxT8vOeVoJjvCW/IlvSC163Kns3Qc6Y7X7x5bt6ILikF2+m03OlmB6QQKVG2YI ThdKEXjZET8BBlG5HcRwrYH9Zq1U7yCXe/q+EN0dI6SVJAme1DxtxKUnPuTsh+MZ3HLt vL/w== X-Forwarded-Encrypted: i=1; AJvYcCVA+kZDLlfGEyOTzxQASkVz61TQkLqR4QGMpwTGgKEG4B1vSUrPiNLT4FRhWDlXlZJlbmU+lKyUsYpNUdc8DVTpspymghU= X-Gm-Message-State: AOJu0YwB0+NOAJ6jLfCTOyZhKQa2hz6rfHXs79ZJ0qL+Oq4q8BB5/yah SztBJgsMmW0n0xfiLb/caiBO2b5GAX4wLBIcqwhsPW9cAsbKxuyF+9jwgw0uNpUKkhVfNSY29Xz V5bLVC5x86C/jNeFuFjcKRlJ+PqmYm/Q0g0U= X-Google-Smtp-Source: AGHT+IFfRchzPucxU2WtoLKI23RzxscnwHgU2X8WLCOdc4U5Q8FC+G1wWq3LIEsDuHfUO9e2pf5nJKmHYdY8QM6TbQI= X-Received: by 2002:a50:a455:0:b0:57c:c2b6:176d with SMTP id 4fb4d7f45d1cf-57d4bdbe7dbmr15457407a12.32.1719630220040; Fri, 28 Jun 2024 20:03:40 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Fri, 28 Jun 2024 20:03:39 -0700 From: Stefan Kangas In-Reply-To: References: <36fGsZdSJ-V_6XVD6SuMoXHJKJ3e5x6xytnwwi2VJ0zzfcRRgOnY2FnWmCLfz4hifa1fkoMw0xCv4glCe8MZkoMqsUxsaY2N8LA1avOeaQk=@rjt.dev> <32ead709-88d3-4a96-b224-bc29aee3ae86@gutov.dev> <8D23DC8F-AC1A-4A33-8AC3-9583B9FC11AE@gmail.com> MIME-Version: 1.0 Date: Fri, 28 Jun 2024 20:03:39 -0700 Message-ID: Subject: Re: bug#69625: 30.0.50; [PATCH] rust-ts-mode doesn't fontify some enum To: Randy Taylor , Yuan Fu Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 69625 Cc: Dmitry Gutov , 69625@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Randy Taylor writes: > Sounds good, we can consider an option if anyone complains. > This is for master, right? Yeah, it's probably too late for Emacs 30. That said, if the patch is very small and/or trivial, and well-tested, we sometimes make exceptions for important changes. I have no idea if any of that would apply here, so I'm mentioning it for completion. From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 29 01:42:25 2024 Received: (at 69625) by debbugs.gnu.org; 29 Jun 2024 05:42:25 +0000 Received: from localhost ([127.0.0.1]:36744 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sNQqu-000416-RY for submit@debbugs.gnu.org; Sat, 29 Jun 2024 01:42:25 -0400 Received: from mail-pg1-f182.google.com ([209.85.215.182]:53349) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sNQqs-00040x-Sq for 69625@debbugs.gnu.org; Sat, 29 Jun 2024 01:42:23 -0400 Received: by mail-pg1-f182.google.com with SMTP id 41be03b00d2f7-656d8b346d2so803288a12.2 for <69625@debbugs.gnu.org>; Fri, 28 Jun 2024 22:42:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719639682; x=1720244482; 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=8y9JEwt5qg+/Qkqfw+XI3s7+7nc+YPW6sYAH27oOvbY=; b=Ru0BMFnLxOVzhplnYYBSgkKzus58yY4J6Utm5Ebg8BKSBVAm11pB9cB/OsCslUuJ1Z s7h0W+e3dtcXoSeHS/o3nb2p1Hw09/n40uM9se8F9hHTqTkG8NxlpvFnXW9/FZgJxhrw UAktP5jSyvg1byQCYmVeR7nFskGAuW/iHUrJixh5lEm9gZIblWCTevH+ahAH+sAPop0a lLGAaLZmejdRzoew2uLHpQRYgu7s6JR/b5u5P4C4RC3r+h0Y72a6bbLVZSWNG74K4pYo QRHAE1zfA2CvM3gp6wFnl7t5mygyxepc4j9+6aiuekw6K1zua5jGlNRUro8KlRkbKHwr Bg6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719639682; x=1720244482; 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=8y9JEwt5qg+/Qkqfw+XI3s7+7nc+YPW6sYAH27oOvbY=; b=pw82/mK1G6xo14/sJVLnpvIu+MISHmFJh0sdvDAqAgzzeUz0UDYUA88ufSpHGkFxU4 BMTDLHXnVXi0Q+WZi0pnWivrVmyp9QGUUISLL4057uase4jJorpAq+j+wyuEEiDLvEEq 8nfmnqEVp/oj5cJecxElIXdKx2qMq8f6X+97BlHoZ3VPch57df1IImkLGwdgzzqDeG/W +lDk82ztXIjek6Yjr/Xu9dNN1DgGyOeWE2yMVPJAOjReO1c8xugPI48gUdtuVtYY8yaN QizoErznZZlUxJ5W0GjlqTih+hnTPQR7I0KWqKkWY48XAkpg/K1VfCOL5nZMlCHhqHgt e+jg== X-Forwarded-Encrypted: i=1; AJvYcCXOMcVds7ifa2ykE9XJtvm6hlHfuLsvSWnpwiTTx/Yr6QF1IRfUMrXDx17lB0Z1UBh+wFQp7dhEU1sh0Iauv590rpcztjY= X-Gm-Message-State: AOJu0YyVDufLjAauYELGCyIp+xyWdBrettLyJLL1qIt45cs7/n9G1ons bxTY+75QyNyRGEqLGo+0IZOpMqRSSQw7CsbTfBBACvby9GhFdVk5 X-Google-Smtp-Source: AGHT+IEKpq79d8aMuY1gJdvsCBnQrUljjV9+pVJV7u81f3+wHTyJqBaqCwm3f57DLFqpw9MRf3DH0g== X-Received: by 2002:a05:6a20:6a09:b0:1b5:d063:339e with SMTP id adf61e73a8af0-1bef60fad03mr349655637.23.1719639682231; Fri, 28 Jun 2024 22:41:22 -0700 (PDT) Received: from smtpclient.apple ([2601:646:8f81:6120:905e:641:dacc:2f83]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1fac10e3832sm25279145ad.91.2024.06.28.22.41.21 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 28 Jun 2024 22:41:21 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3774.600.62\)) Subject: Re: bug#69625: 30.0.50; [PATCH] rust-ts-mode doesn't fontify some enum From: Yuan Fu In-Reply-To: Date: Fri, 28 Jun 2024 22:41:18 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: <89A72044-E406-46DE-B39C-E1F381BCAD3C@gmail.com> References: <36fGsZdSJ-V_6XVD6SuMoXHJKJ3e5x6xytnwwi2VJ0zzfcRRgOnY2FnWmCLfz4hifa1fkoMw0xCv4glCe8MZkoMqsUxsaY2N8LA1avOeaQk=@rjt.dev> <32ead709-88d3-4a96-b224-bc29aee3ae86@gutov.dev> <8D23DC8F-AC1A-4A33-8AC3-9583B9FC11AE@gmail.com> To: Stefan Kangas X-Mailer: Apple Mail (2.3774.600.62) X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 69625 Cc: Randy Taylor , 69625@debbugs.gnu.org, Dmitry Gutov X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > On Jun 28, 2024, at 8:03=E2=80=AFPM, Stefan Kangas = wrote: >=20 > Randy Taylor writes: >=20 >> Sounds good, we can consider an option if anyone complains. >> This is for master, right? >=20 > Yeah, it's probably too late for Emacs 30. >=20 > That said, if the patch is very small and/or trivial, and well-tested, > we sometimes make exceptions for important changes. I have no idea if > any of that would apply here, so I'm mentioning it for completion. I would apply it to master. So that people on master would have time to = complain, if ever. Yuan= From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 29 17:36:41 2024 Received: (at 69625) by debbugs.gnu.org; 29 Jun 2024 21:36:41 +0000 Received: from localhost ([127.0.0.1]:53830 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sNfkP-0001dq-2e for submit@debbugs.gnu.org; Sat, 29 Jun 2024 17:36:41 -0400 Received: from mail-41103.protonmail.ch ([185.70.41.103]:37193) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sNfkL-0001da-3x for 69625@debbugs.gnu.org; Sat, 29 Jun 2024 17:36:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rjt.dev; s=protonmail2; t=1719688130; x=1719947330; bh=JL+Ks3EvrtgdUEWrjCHiK6w+oTn5g33NEFcbV1QFb+k=; 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=FkY4TcM0xR3ZTWyzvbLsIUMChrg3K7lJjLvxCVyUX05qHIKwYOX5Uu699JfcZ9eCj Tzt56Zq8a74PI9GeRpwDZwrdM6pX7kBwL4dXcQAmlurSGu93kXrxtZuSNS4Lu3O8OW ogm7qFfS/iOFUdpr0fY2kxFoCTHG5MnR7e8hZGjbSzrM18U/B+HwPTLlQf/g85YV8k ZqthBokG6QsIwAi6oOzCCp3R0/1xJzQgx1gXbn8eUtuXrf7U00xKCwLQXpEtJyV11k /bhmvkO13vqIY5321uleV6tWLMWTTX4XmO5L82SBCxoI7B3wypauCSiDlLMotfy2vE dCD8kNG8aG/nw== Date: Sat, 29 Jun 2024 19:08:47 +0000 To: Yuan Fu From: Randy Taylor Subject: Re: bug#69625: 30.0.50; [PATCH] rust-ts-mode doesn't fontify some enum Message-ID: In-Reply-To: <89A72044-E406-46DE-B39C-E1F381BCAD3C@gmail.com> References: <8D23DC8F-AC1A-4A33-8AC3-9583B9FC11AE@gmail.com> <89A72044-E406-46DE-B39C-E1F381BCAD3C@gmail.com> Feedback-ID: 44397038:user:proton X-Pm-Message-ID: 202fd481be8ec593f9e094b5f9e8ea46314703ea MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 69625 Cc: Dmitry Gutov , Stefan Kangas , 69625@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On Saturday, June 29th, 2024 at 01:41, Yuan Fu wrote: >=20 >=20 > > On Jun 28, 2024, at 8:03=E2=80=AFPM, Stefan Kangas stefankangas@gmail.c= om wrote: > >=20 > > Randy Taylor dev@rjt.dev writes: > >=20 > > > Sounds good, we can consider an option if anyone complains. > > > This is for master, right? > >=20 > > Yeah, it's probably too late for Emacs 30. > >=20 > > That said, if the patch is very small and/or trivial, and well-tested, > > we sometimes make exceptions for important changes. I have no idea if > > any of that would apply here, so I'm mentioning it for completion. >=20 >=20 > I would apply it to master. So that people on master would have time to c= omplain, if ever. >=20 > Yuan We're on the same wavelength :). From debbugs-submit-bounces@debbugs.gnu.org Sat Jul 06 04:05:44 2024 Received: (at 69625) by debbugs.gnu.org; 6 Jul 2024 08:05:44 +0000 Received: from localhost ([127.0.0.1]:45544 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sQ0QS-000684-AI for submit@debbugs.gnu.org; Sat, 06 Jul 2024 04:05:44 -0400 Received: from eggs.gnu.org ([209.51.188.92]:33598) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sQ0QP-00067n-Bw for 69625@debbugs.gnu.org; Sat, 06 Jul 2024 04:05:42 -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 ) id 1sQ0QF-000766-5K; Sat, 06 Jul 2024 04:05:31 -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=5YvOw6BNNaxmB/vSp0OfMoAPK2yjZN+WfFm3+1ETf3Y=; b=JJNH7pJUaW/Qo6IBLldp 98ZYcpIG6bicVNN3QgtFFD94IPHDTAeNkIncfETcp+uyuFG4nMM8ZyufJ3dMbMi2cs2ljvZ8DYkfg m/QLjLTFUSm9jao+MygXeWDPQ6YQE+4v0VovxDcGRmTIjGduoxnDEh5nwLBuzOVFWTCqwe1/XBufw Uxdp8bBcdcPYp1OeeODqTzUoiA640Kstiqt3B5JmxRpQAN/bEZRw9Yjqx2IYAu691r71XjMXheayp YtwQocmnSLMNDe0+aaXPvvBFTTM4EuayIzP/0W8QONr6w7bpIZkR3IOufQonrt6fHrQT2undU+6T6 8L6Gmz7vUmM0aA==; Date: Sat, 06 Jul 2024 11:05:29 +0300 Message-Id: <861q4754ja.fsf@gnu.org> From: Eli Zaretskii To: Randy Taylor In-Reply-To: (message from Randy Taylor on Sat, 29 Jun 2024 19:08:47 +0000) Subject: Re: bug#69625: 30.0.50; [PATCH] rust-ts-mode doesn't fontify some enum References: <8D23DC8F-AC1A-4A33-8AC3-9583B9FC11AE@gmail.com> <89A72044-E406-46DE-B39C-E1F381BCAD3C@gmail.com> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 69625 Cc: dmitry@gutov.dev, casouri@gmail.com, stefankangas@gmail.com, 69625@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Cc: Dmitry Gutov , Stefan Kangas , > 69625@debbugs.gnu.org > Date: Sat, 29 Jun 2024 19:08:47 +0000 > From: Randy Taylor > > On Saturday, June 29th, 2024 at 01:41, Yuan Fu wrote: > > > > > > > On Jun 28, 2024, at 8:03 PM, Stefan Kangas stefankangas@gmail.com wrote: > > > > > > Randy Taylor dev@rjt.dev writes: > > > > > > > Sounds good, we can consider an option if anyone complains. > > > > This is for master, right? > > > > > > Yeah, it's probably too late for Emacs 30. > > > > > > That said, if the patch is very small and/or trivial, and well-tested, > > > we sometimes make exceptions for important changes. I have no idea if > > > any of that would apply here, so I'm mentioning it for completion. > > > > > > I would apply it to master. So that people on master would have time to complain, if ever. > > > > Yuan > > We're on the same wavelength :). Ping! Can we complete this by installing the patch, please? I don't see any patches in this discussion. If someone knows what is the patch, please either post it here or install on master. Thanks. From debbugs-submit-bounces@debbugs.gnu.org Sat Jul 06 17:11:31 2024 Received: (at 69625-done) by debbugs.gnu.org; 6 Jul 2024 21:11:31 +0000 Received: from localhost ([127.0.0.1]:46867 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sQCgt-0004Tm-3w for submit@debbugs.gnu.org; Sat, 06 Jul 2024 17:11:31 -0400 Received: from mail-oi1-f171.google.com ([209.85.167.171]:51447) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sQCgq-0004Te-Ni for 69625-done@debbugs.gnu.org; Sat, 06 Jul 2024 17:11:29 -0400 Received: by mail-oi1-f171.google.com with SMTP id 5614622812f47-3d853e31de8so1562878b6e.2 for <69625-done@debbugs.gnu.org>; Sat, 06 Jul 2024 14:11:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1720300224; x=1720905024; 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=4ziGo/7WlelTdkb6674LsyJlb5tZL0Y/oLPpauppfy8=; b=YOOm0GYdgVazlyZpE54SPxBa5qQp86zrhqXG8zyjDzU29tCo2hJ4lDvCZiIfg84eUQ xCk8YweQkDlmWMigvy7X9b26N06JzKhzRuaI7FXJ9QeJeVEo6iUUfpROwdVu2O8m3dXe vaHmDerU1+88QEqislQtGwq7hTi+poEtgs9/2JbRsE5f/FCxdLuf8G6Wdp0a9a0n3SME InU8aTaiEudrVUBjOdndBGilYGfwn5/tDnEU6cEWydFIgUNTnILJQe/b7Ms7EOlFMmjc ApPHNQSuWf/9fs+8U1iNtsYw8DfHk+3r+UU7YgwVB0aE4i4UaGljt84AZYjZCyXekTa1 UkVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720300224; x=1720905024; 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=4ziGo/7WlelTdkb6674LsyJlb5tZL0Y/oLPpauppfy8=; b=su/S+3Eas0leQ+lobFKF7TjMAwxQGT6/Se+aemG/DwzLCk0POVHRLTWlqXvIi6Uc+U SfCBvxZKH1pc1wlJxuN6tyIwZ03WL3u1u4prEDmKjelBJYHGL3ggP6w1OId1TVPd1Eop lTI4zvlDgMEOU+FnVJwigSsiVnhvLH82GmdOSqXsuMdn8E+lbhQOhYxKGucZ/KYpuyAE IBIrYWEgDAkVfZz6unDXlwFkY9EQZLAoBgH2nDYaoGBVU0vo4U5dPWzbfL9Zo/+XgVbY 7NS+a84U+sf/oPz3Xq0tHCtgzjNiU5qHLoXcvIhcTxaDsLgEuYjJr2TWA1P0j8i7Auyp F7rQ== X-Forwarded-Encrypted: i=1; AJvYcCVIxxUjfMn0guzBi2Oa35vbEI78K50JQkE9z/bj0HHSqDG4GRXx07n5c8AyGOUBD4Pwhy+ls81VKWkc+CqnuSeUX/nYBQ6SSfl63A== X-Gm-Message-State: AOJu0YzwfapHXs9UuObKpFgJODNoGCgqvlS9NmMx7t6JLriHXXIZ6Y0b iW+2kZmWH4IsGlpJcBW5W7FZmunbjIrUYODuM/7i0la8nPCrrHgJ X-Google-Smtp-Source: AGHT+IHbtZd6GV3Mx4cIziuS1935oGeXSt3iTcEJQZd4mRWlu+5iDgfgDa0sVFeFNMdrjaOyEg+/Bg== X-Received: by 2002:a05:6808:11cf:b0:3d5:5fbe:b31a with SMTP id 5614622812f47-3d914ea9d48mr11504961b6e.51.1720300224061; Sat, 06 Jul 2024 14:10:24 -0700 (PDT) Received: from smtpclient.apple ([2601:646:8f81:6120:84a4:5f24:8a3e:a909]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-70b1086d32dsm3286497b3a.46.2024.07.06.14.10.22 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 06 Jul 2024 14:10:23 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3774.600.62\)) Subject: Re: bug#69625: 30.0.50; [PATCH] rust-ts-mode doesn't fontify some enum From: Yuan Fu In-Reply-To: <861q4754ja.fsf@gnu.org> Date: Sat, 6 Jul 2024 14:10:12 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: References: <8D23DC8F-AC1A-4A33-8AC3-9583B9FC11AE@gmail.com> <89A72044-E406-46DE-B39C-E1F381BCAD3C@gmail.com> <861q4754ja.fsf@gnu.org> To: Eli Zaretskii X-Mailer: Apple Mail (2.3774.600.62) X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 69625-done Cc: Randy Taylor , 69625-done@debbugs.gnu.org, Stefan Kangas , Dmitry Gutov X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > On Jul 6, 2024, at 1:05=E2=80=AFAM, Eli Zaretskii = wrote: >=20 >> Cc: Dmitry Gutov , Stefan Kangas = , >> 69625@debbugs.gnu.org >> Date: Sat, 29 Jun 2024 19:08:47 +0000 >> From: Randy Taylor >>=20 >> On Saturday, June 29th, 2024 at 01:41, Yuan Fu = wrote: >>>=20 >>>=20 >>>> On Jun 28, 2024, at 8:03=E2=80=AFPM, Stefan Kangas = stefankangas@gmail.com wrote: >>>>=20 >>>> Randy Taylor dev@rjt.dev writes: >>>>=20 >>>>> Sounds good, we can consider an option if anyone complains. >>>>> This is for master, right? >>>>=20 >>>> Yeah, it's probably too late for Emacs 30. >>>>=20 >>>> That said, if the patch is very small and/or trivial, and = well-tested, >>>> we sometimes make exceptions for important changes. I have no idea = if >>>> any of that would apply here, so I'm mentioning it for completion. >>>=20 >>>=20 >>> I would apply it to master. So that people on master would have time = to complain, if ever. >>>=20 >>> Yuan >>=20 >> We're on the same wavelength :). >=20 > Ping! Can we complete this by installing the patch, please? >=20 > I don't see any patches in this discussion. If someone knows what is > the patch, please either post it here or install on master. >=20 > Thanks. I installed 2e9777512a0 to master. Yuan From unknown Sat Aug 16 10:49:14 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sun, 04 Aug 2024 11:24:09 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator