GNU bug report logs - #77746
[PATCH] sh-mode: Fix incorrect word syntax for punctuation in sh-mode

Previous Next

Package: emacs;

Reported by: James Cherti <contact <at> jamescherti.com>

Date: Fri, 11 Apr 2025 14:56:02 UTC

Severity: normal

Tags: patch

Done: Stefan Monnier <monnier <at> iro.umontreal.ca>

Bug is archived. No further changes may be made.

Full log


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

From: James Cherti <contact <at> jamescherti.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 77746 <at> debbugs.gnu.org, monnier <at> iro.umontreal.ca, juri <at> linkov.net
Subject: Re: bug#77746: [PATCH] sh-mode: Fix incorrect word syntax for
 punctuation in sh-mode
Date: Tue, 15 Apr 2025 10:06:14 -0400
[Message part 1 (text/plain, inline)]
On 2025-04-15 08:48, Eli Zaretskii wrote:
>> Date: Tue, 15 Apr 2025 07:21:08 -0400
>> Cc: 77746 <at> debbugs.gnu.org, monnier <at> iro.umontreal.ca, juri <at> linkov.net
>> From: James Cherti <contact <at> jamescherti.com>
>>
>> The issue occurs in both sh-mode and bash-ts-mode.
> 
> I'm surprised that bash-ts-mode should use syntax tables, instead of
> relying on the results of parsing by tree-sitter.

Here are a few screenshots that show exactly the issue. The
mode used when I took the screenshot was bash-ts-mode.

- without-patch1-highlight.png: Only varname should have
  been highlighted
- without-patch2-highlight.png: varname in the comment
  should have been highlighted
- without-patch3-completion.png: The completion included
  invalid variable names.
- without-patch4-major-mode.png: The major mode is
  bash-ts-mode. The same issue happens with sh-mode
  without this patch.

Here are screenshots with this patch applied:
- with-patch1.png: varname highlighted correctly
- with-patch2.png: only complete valid variable names

--
James Cherti
GitHub: https://github.com/jamescherti
Website: https://www.jamescherti.com/
[without-patch1-highlight.png (image/png, attachment)]
[without-patch2-highlight.png (image/png, attachment)]
[without-patch3-completion.png (image/png, attachment)]
[without-patch4-major-mode.png (image/png, attachment)]
[with-patch1.png (image/png, attachment)]
[with-patch2.png (image/png, attachment)]

This bug report was last modified 107 days ago.

Previous Next


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