From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Amol Surati Newsgroups: gmane.emacs.bugs Subject: bug#70367: 30.0.50; Inconsistent Syntax Highlighting Date: Sun, 14 Apr 2024 00:44:59 +0530 Message-ID: References: <86r0f9nomy.fsf@gnu.org> <86plutnogj.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21814"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 70367@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Apr 14 08:58:49 2024 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 1rvtpB-0005UG-Du for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 14 Apr 2024 08:58:49 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rvtoO-0000L9-VV; Sun, 14 Apr 2024 02:58:00 -0400 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 1rvtoM-0000Jl-1F for bug-gnu-emacs@gnu.org; Sun, 14 Apr 2024 02:57:58 -0400 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 1rvtoK-0008M0-Rc for bug-gnu-emacs@gnu.org; Sun, 14 Apr 2024 02:57:57 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rvtoU-0000Uz-OB for bug-gnu-emacs@gnu.org; Sun, 14 Apr 2024 02:58:06 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Amol Surati Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 14 Apr 2024 06:58:06 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70367 X-GNU-PR-Package: emacs Original-Received: via spool by 70367-submit@debbugs.gnu.org id=B70367.17130778591582 (code B ref 70367); Sun, 14 Apr 2024 06:58:06 +0000 Original-Received: (at 70367) by debbugs.gnu.org; 14 Apr 2024 06:57:39 +0000 Original-Received: from localhost ([127.0.0.1]:34153 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rvto0-0000Or-6g for submit@debbugs.gnu.org; Sun, 14 Apr 2024 02:57:38 -0400 Original-Received: from mail-lj1-x233.google.com ([2a00:1450:4864:20::233]:43171) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rviq4-0004Vh-Mc for 70367@debbugs.gnu.org; Sat, 13 Apr 2024 15:15:10 -0400 Original-Received: by mail-lj1-x233.google.com with SMTP id 38308e7fff4ca-2d872102372so19065271fa.0 for <70367@debbugs.gnu.org>; Sat, 13 Apr 2024 12:14:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1713035684; x=1713640484; darn=debbugs.gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=a4kgxdfiZ49aV4ngQ3ib2g2iHzmnZXwcDBZs17yjbLA=; b=Gh1NKpie9g9wyOHwfariQdIUnDURjRTUBzDgBzNS4VmfT0jrkW5jV/yQB4Ulk0jUqg WnTppTWA1jRCQRwq8VZMG4eilWOicJ+R5kogKY95s5QGffO49PKiBAESMs9OADPKd+tB aZtUcxMFEmVQ/dcPmmeKgqTuhd517GSbx3qwJMyyT6wDHsMKnQneaAaxTzIuc0gqxajz 23Dvk3HN2+RZ0l0H4bqFay4Lm75A1C91Pp9HqpCixMeZl6xxX4vkYDa3jpIZwD0/TWfP 1l3YcPSJidyWBzlAH4Hk/aq/D7HqvfilbBzFt7h1rNZPjNSSmmQz1KrsWZHmGQ8raFHB DRJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713035684; x=1713640484; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=a4kgxdfiZ49aV4ngQ3ib2g2iHzmnZXwcDBZs17yjbLA=; b=CUNhDZAwp0O3o2JQ1Fj64aN0T1E44rfcbqfuJD8voxyszSe9u1JdPAJrJGFVJmjkbn Snc91ejNJiXnQPDl/4+8MiMxRr2/HeqkzvaFHxOJ9zkzArZ7QdwBRXpVrULNhLH8QEAL 9du5L1BDwhXvrpWE+tasPAv5lXc60nAO2SmBudBsCIC9dS9U1KYZAbmKBW0EGuTJxuoC hJJ8ECHU/QHpGjGhZh3aPuxjT56o4eJVvKATu5RhWzFPdJW0yr2kMII2N3n6pbi2M/wP hNmW7AsHT+WEMmx7CKjNnOU2474rMD5dM44lHCnfNfm6UWkE1WgOnRAjL8UcmoCt9t4R ljgg== X-Gm-Message-State: AOJu0YyuKIL9GLQDZ6a8ROswFsBWdI2MQD5vuwybIuUo9pjb15XF/BtP FQZchgjLD5QKlwQHOypXPqryv7+ofkBHB6D1rmnttQRKxekBOV7rRbMEQu7yuYvXAQKA59XV15W 4CQB7Wx3mzr04snEWJovykitOYwY= X-Google-Smtp-Source: AGHT+IGQTuK5lI+eRIAj7500RzH8XkP8k2IESPLvFDeLPf87jfz3DG1YJH9JS5NvVy1qioXE4dVcB8kjjjRJO+ZoCKA= X-Received: by 2002:a05:651c:c1:b0:2d8:fc50:4281 with SMTP id 1-20020a05651c00c100b002d8fc504281mr2480830ljr.22.1713035683608; Sat, 13 Apr 2024 12:14:43 -0700 (PDT) In-Reply-To: <86plutnogj.fsf@gnu.org> X-Mailman-Approved-At: Sun, 14 Apr 2024 02:57:35 -0400 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:283252 Archived-At: On Sat, 13 Apr 2024 at 23:18, Eli Zaretskii wrote: > > > Cc: 70367@debbugs.gnu.org > > Date: Sat, 13 Apr 2024 20:44:37 +0300 > > From: Eli Zaretskii > > > > > From: Amol Surati > > > Date: Sat, 13 Apr 2024 18:12:54 +0530 > > > > > > The problem is not found in terminal emacs built from the released 29.3.tar.gz, > > > or with emacs running under GUI (i.e. under PGTK). > > > > > > The problem is seen with terminal emacs built from the master branch, at various > > > commit levels. > > > > > > Problem: When a large file (for e.g. vulkan_core.h) is opened, certain > > > constructs have their syntax highlighting broken. The video found at [1] shows > > > the behaviour. At the end of the video, one can see one instance of the problem; > > > the syntax highlighting for the enum constant > > > 'VK_STRUCTURE_TYPE_EVENT_CREATE_INFO = 10,' abruptly breaks. The entire > > > identifier VK_STRUCTURE_TYPE_EVENT_CREATE_INFO must be one colour. Instead, > > > 'VK_STRUCTURE_TYPE_EVENT_CREA' is of the expected colour, while > > > 'TE_INFO' is of the colour that is expected with '= 10,'. You may want to > > > download the video and then play it, if Google Drive plays it at a resolution > > > that is lower than the video's native resolution. > > > > > > Within this same session, there were other such enum constants with broken > > > highlighting, though they have not been captured in the video. > > > The termscript is attached at [2]. > > > > > > The graphics session is Wayland with swaywm as its compositor; XWayland is > > > not enabled. The terminal emulator is 'foot'. Another terminal emulator, > > > 'alacritty' was also tested; the problem occurred there too. > > > > > > The problem doesn't seem to occur with small-sized files; After reducing the > > > vulkan_core.h to contain only around 235 lines, emacs was able to show the > > > (reduced) file with consistent highlighting. > > > > FWIW, I cannot reproduce this with stock Emacs 29.3 and vulkan_core.h > > file that I downloaded from this site: > > > > https://github.com/KhronosGroup/dfdutils/blob/main/vulkan/vulkan_core.h > > I see now that you say you see this with the master branch, so I > tested that version as well, and I still don't see the problem. Thank you for looking into this problem. The file can be found at [3], though I was able to reproduce the problem even with the link that you had downloaded. You may have to scroll the file up-down (I use page-up/dn keys) in order to trigger the problem, though it usually exhibits the problem within a few (less 10) page-up/down scroll commands. Within the file [3], it seems only enums are affected, though I haven't checked the entire file for consistency of syntax highlighting. Which particular enum constant gets affected may also vary at times, even within the same session, if one scrolls out and away to another portion of the file, and then returns back. The video I had posted was with 'emacs -Q'. A screenshot with better colour contrast is at [4]; the corresponding termscript is at [5]. This time I was able to capture a corresponding breakage within the termscript. The break within the highlighting [4] can be clearly matched with a break in the termscript contents. If the termscript file [5] is searched for L_DEVICE_LINEAR_COLOR_ATTACHMENT_FEATURES_NV, one can clearly see that the identifier is broken into two. The unbroken identifier is: VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINEAR_COLOR_ATTACHMENT_FEATURES_NV. The highlight breaks between 'PHYSICA' and 'L_DEVICE...'. The termscript [5] exhibits a corresponding break, *exactly* matching the break in the syntax highlighting. Thank you, Amol Surati ----------------------------------------------------------------- [3] https://raw.githubusercontent.com/KhronosGroup/Vulkan-Headers/main/include/vulkan/vulkan_core.h [4] https://imgur.com/a/gqNZGDO [5] https://pastebin.com/VQR76Gsy