GNU bug report logs - #61260
29.0.60; wrong indentation will break the highlight on yaml-ts-mode

Previous Next

Package: emacs;

Reported by: Eason Huang <aqua0210 <at> foxmail.com>

Date: Sat, 4 Feb 2023 01:22:01 UTC

Severity: normal

Found in version 29.0.60

Done: Randy Taylor <dev <at> rjt.dev>

Bug is archived. No further changes may be made.

Full log


Message #10 received at 61260-done <at> debbugs.gnu.org (full text, mbox):

From: Randy Taylor <dev <at> rjt.dev>
To: Eason Huang <aqua0210 <at> foxmail.com>
Cc: "61260-done <at> debbugs.gnu.org" <61260-done <at> debbugs.gnu.org>
Subject: Re: bug#61260: 29.0.60;
 wrong indentation will break the highlight on yaml-ts-mode
Date: Wed, 08 Feb 2023 13:33:18 +0000
On Friday, February 3rd, 2023 at 20:20, Eason Huang <aqua0210 <at> foxmail.com> wrote:
> 
> Hi Emacs dev team,
> 
> I found that when editing yaml file with yaml-ts-mode, the buffer
> highlight will be break when the indentation of current line is wrong.
> 
> Steps to reproduce:
> 
> 1. Start Emacs with `emacs -Q`
> 2. Open any a yaml file, such as `C-x, C-f ~/test.yaml`
> 3. M-x yaml-ts-mode, enable the yaml-ts-mode on test.yaml buffer
> 4. input the code below in the test.yaml buffer
> `values: a: 10 b: 20 c: 30`
> 5. so far so good.
> 6. if the line 2 have a wrong indentation, such as four spaces in stead of
> two spaces. Now the hightlight of line 3 and line 4 will be break
> `values: a: 10 b: 20 c: 30`
> 
> The commit I built Emacs is f25c15ceb7d from emacs-29 branch.

Hi, and thanks for the report.

This is because the second incantation:
```
values:
    a: 10
  b: 20
  c: 30
```

is not valid YAML, and the parser reports an error.

Therefore I'm closing this bug since I don't think there's anything we can do here.




This bug report was last modified 2 years and 164 days ago.

Previous Next


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