GNU bug report logs - #70367
30.0.50; Inconsistent Syntax Highlighting

Previous Next

Package: emacs;

Reported by: Amol Surati <suratiamol <at> gmail.com>

Date: Sat, 13 Apr 2024 16:40:04 UTC

Severity: normal

Found in version 30.0.50

Done: Alan Mackenzie <acm <at> muc.de>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 70367 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Amol Surati <suratiamol <at> gmail.com>
Cc: 70367 <at> debbugs.gnu.org
Subject: Re: bug#70367: 30.0.50; Inconsistent Syntax Highlighting
Date: Sat, 13 Apr 2024 20:44:37 +0300
> From: Amol Surati <suratiamol <at> gmail.com>
> 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 tried both the default cc-mode and c-ts-mode, and they both produce
correct display with fill syntax highlighting that does NOT break.

If the above is not the file where you see the problem, please post
the offending file, or tell where it can be downloaded.




This bug report was last modified 1 year and 39 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.