all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Amol Surati <suratiamol@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 70367@debbugs.gnu.org
Subject: bug#70367: 30.0.50; Inconsistent Syntax Highlighting
Date: Sun, 14 Apr 2024 00:44:59 +0530	[thread overview]
Message-ID: <CA+nuEB_dzUo8LTChYM2Z128ZLhqHwVDk0dbS12BfDY0DMTH6ow@mail.gmail.com> (raw)
In-Reply-To: <86plutnogj.fsf@gnu.org>

On Sat, 13 Apr 2024 at 23:18, Eli Zaretskii <eliz@gnu.org> wrote:
>
> > Cc: 70367@debbugs.gnu.org
> > Date: Sat, 13 Apr 2024 20:44:37 +0300
> > From: Eli Zaretskii <eliz@gnu.org>
> >
> > > From: Amol Surati <suratiamol@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 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





      parent reply	other threads:[~2024-04-13 19:14 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-13 12:42 bug#70367: 30.0.50; Inconsistent Syntax Highlighting Amol Surati
2024-04-13 17:44 ` Eli Zaretskii
2024-04-13 17:48   ` Eli Zaretskii
2024-04-13 19:00     ` Stephen Berman via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-04-13 19:05       ` Eli Zaretskii
2024-04-13 22:14         ` Amol Surati
2024-04-14  2:46           ` Alan Mackenzie
2024-04-14  5:07             ` Amol Surati
2024-04-14  8:33               ` Alan Mackenzie
2024-04-13 19:14     ` Amol Surati [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CA+nuEB_dzUo8LTChYM2Z128ZLhqHwVDk0dbS12BfDY0DMTH6ow@mail.gmail.com \
    --to=suratiamol@gmail.com \
    --cc=70367@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.