Subject: bug#61923: 30.0.50; go-ts-mode, multiline raw-string-literal wrong indentation

From: Gleb Zakharov <[email-masked]>
Date: Fri, 03 Mar 2023 14:38:19 +0000

Eli Zaretskii <[email-masked]> 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