GNU bug report logs -
#61923
30.0.50; go-ts-mode, multiline raw-string-literal wrong indentation
Previous Next
Reported by: Gleb Zakharov <snyssfx <at> posteo.net>
Date: Thu, 2 Mar 2023 22:21:01 UTC
Severity: normal
Found in version 30.0.50
Fixed in version 29.1
Done: Dmitry Gutov <dmitry <at> gutov.dev>
Bug is archived. No further changes may be made.
Full log
Message #17 received at 61923 <at> debbugs.gnu.org (full text, mbox):
Eli Zaretskii <eliz <at> gnu.org> writes:
> If you are saying that the indentation inside string is incorrect in
> general, then I agree we should fix it. (I don't use Go.) But then
> please present the reproduction recipe which doesn't use another
> language in the string, but simply has a string, which is corrupted by
> indentation.
Yes, it seems to be incorrect in general. Sorry for the misguidance
regarding language embedding, it is just how I noticed the issue.
Here is a recipe of how to reproduce it for a usual piece of text in a
scratch buffer with `emacs -Q` :
```
/*
(require 'treesit)
(require 'go-ts-mode)
(setq treesit-extra-load-path '("/home/snyssfx/.guix-home/profile/lib/tree-sitter"))
(go-ts-mode)
*/
func a() {
_ = `
Lorem ipsum dolor sit amet,
consectetur adipiscing elit,
sed do eiusmod tempor incididunt ut
labore et dolore magna aliqua.`
}
```
If we call M-q anywhere in a function or insert a new line in the
string literal, the text or its part will be indented. However, the
expected behavior is for it to stay as it is.
Best Regards,
Gleb
This bug report was last modified 1 year and 179 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.