From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#67569: 29.1; ruby-mode syntax highlighting breaks with variable named "index" and "/" operator Date: Sat, 16 Dec 2023 14:17:36 +0200 Message-ID: <58e3e731-099a-41a4-4c36-9da7ed093c18@gutov.dev> References: <83o7ezydwp.fsf@gnu.org> <83sf42mka6.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27791"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Cc: mjh@mjhoy.com, 67569@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Dec 16 13:18:17 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 1rETcV-00074z-RB for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 16 Dec 2023 13:18:16 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rETcI-000373-Jd; Sat, 16 Dec 2023 07:18:02 -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 1rETcH-00036c-JI for bug-gnu-emacs@gnu.org; Sat, 16 Dec 2023 07:18:01 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rETcH-00068x-Al for bug-gnu-emacs@gnu.org; Sat, 16 Dec 2023 07:18:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rETcH-00014a-JH for bug-gnu-emacs@gnu.org; Sat, 16 Dec 2023 07:18:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 16 Dec 2023 12:18:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 67569 X-GNU-PR-Package: emacs Original-Received: via spool by 67569-submit@debbugs.gnu.org id=B67569.17027290704105 (code B ref 67569); Sat, 16 Dec 2023 12:18:01 +0000 Original-Received: (at 67569) by debbugs.gnu.org; 16 Dec 2023 12:17:50 +0000 Original-Received: from localhost ([127.0.0.1]:54111 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rETc6-000149-Du for submit@debbugs.gnu.org; Sat, 16 Dec 2023 07:17:50 -0500 Original-Received: from out2-smtp.messagingengine.com ([66.111.4.26]:45147) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rETc3-00013u-At for 67569@debbugs.gnu.org; Sat, 16 Dec 2023 07:17:49 -0500 Original-Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 924845C00A0; Sat, 16 Dec 2023 07:17:41 -0500 (EST) Original-Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Sat, 16 Dec 2023 07:17:41 -0500 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=1702729061; x=1702815461; bh=NnetjeCK2hD8KvJnsoDe84lDwXOvEm6KpOiENNHcl3k=; b= okl6fOm3UpluWeldEPtCsrG17wdRPxnLdnyTmoYDdau2gY8f+hivUlfUc7aGQLz/ AGGfdHXSHSE6J2rpC85bTW2LxaVjjsdHVjfEQTtJYqaROIMPn3OYcXrYr2am4FI8 Nl7eg4PNKv5SD8lT2qhOym2u48HeuCN2yRj//MYnHs0hc+lvz7/bA6EpvVWZXoEX pNXwq5044IksgChIS1fjU3JYDR3Hxhn1bPK1qL61OL419jh1TfYoYo/lkW4GxSbf tsXCgrHGTkw2zOJt9kZxWOhFFRNGVgSGjVNdY/H9Zj8EkBn9ebgRaQ2aXw1AfaPu FJPB+Ay/4UNeyb4f7oOkhA== 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=fm2; t=1702729061; x= 1702815461; bh=NnetjeCK2hD8KvJnsoDe84lDwXOvEm6KpOiENNHcl3k=; b=s LhwJZWMBFUSFObUVsvk3AeW6fC5vE/pIWPBa7DSb3nRnVfPZXhP3f1+qS9z9kbk+ uz4x7fFzSPCtpuNSzoub8WMMKi2cW8lStl78JHjx+u/6ag6VVBlsXrJeCQ7T5u2M vA2srHZgwO3nsNJOsGkyvI+UfP7aJtmeiF7PmpO6S43QXSEMpvnXylmeiNcICgQv FnzTQMkRE00j0G8C8/bQBlbvbHb/KrI8vBMrpQu41TDfJ0cM/Dmdz7+caJUkgHA4 YLHwkYmuFt0BhrMjKSDlyp1Vchs+G5vvDvKy6fc61eOHU6U7YckbrFif2yZP22fJ VfrEknPWFefOnA/7FtKWA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrvddtgedgfeelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtfeejnecuhfhrohhmpeffmhhi thhrhicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdruggvvheqnecuggftrfgrth htvghrnhepteeggeeuffeffeevhefgheekfeelheehgfehveeffeelfefhvdduuefghfff tdejnecuffhomhgrihhnpehsthgrtghkvgigtghhrghnghgvrdgtohhmnecuvehluhhsth gvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepughmihhtrhihsehguhht ohhvrdguvghv X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 16 Dec 2023 07:17:40 -0500 (EST) Content-Language: en-US In-Reply-To: <83sf42mka6.fsf@gnu.org> 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:276323 Archived-At: This is resolved and closed, I just replied to a different subthread. I suppose you set up some automation for pinging non-respondents? :) On 16/12/2023 13:58, Eli Zaretskii wrote: > Ping! > >> Cc:67569@debbugs.gnu.org >> Date: Sat, 09 Dec 2023 10:32:22 +0200 >> From: Eli Zaretskii >> >>> From: Michael Hoy >>> Date: Fri, 01 Dec 2023 09:27:47 -0500 >>> >>> In the standard ruby-mode, a variable named "index" followed by a "/" >>> causes the syntax highlighting to break -- it appears that after the >>> slash everything is interpreted as part of a regular expression until >>> another "/" appears. >>> >>> You can reproduce this fairly easily. using 'emacs -Q', go to the >>> scratch buffer and clear it. Run 'M-x ruby-mode'. Enter something like >>> the following: >>> >>> def foo >>> index = 5 >>> x = index / 3 >>> puts "#{x}" >>> end >>> >>> Note that starting after the "/" until the end, syntax highlighting and >>> indentation break (everything, in my color scheme, is purple). If you >>> add a "/" for instance to the "puts" line, syntax highlighting and >>> indentation will be restored after that. >>> >>> There is a report here about the bug: >>> https://emacs.stackexchange.com/questions/23802/division-sometimes-breaks-syntax-highlighting-in-ruby-mode >>> The author says in the comments they used "M-x report-emacs-bug", but I >>> couldn't find it (and the comments suggest that it may not have been >>> sent correctly). Apologies if this is already reported! >> Dmitry, any comments? >> >> >> >>