From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Yuan Fu Newsgroups: gmane.emacs.bugs Subject: bug#61923: 30.0.50; go-ts-mode, multiline raw-string-literal wrong indentation Date: Fri, 3 Mar 2023 14:29:28 -0800 Message-ID: <6313B57B-47BB-47D3-94F4-BA0C60FFD913@gmail.com> References: <877cvz5b0t.fsf@posteo.net> Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.400.51.1.1\)) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="630"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , 61923@debbugs.gnu.org To: snyssfx@posteo.net Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Mar 03 23:30:31 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pYDv5-000Aa9-Dg for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 03 Mar 2023 23:30:31 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pYDuf-0004ra-5r; Fri, 03 Mar 2023 17:30:05 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pYDud-0004rH-1a for bug-gnu-emacs@gnu.org; Fri, 03 Mar 2023 17:30:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pYDuc-0007QH-OO for bug-gnu-emacs@gnu.org; Fri, 03 Mar 2023 17:30:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pYDuc-0008TW-Fq for bug-gnu-emacs@gnu.org; Fri, 03 Mar 2023 17:30:02 -0500 X-Loop: help-debbugs@gnu.org In-Reply-To: <877cvz5b0t.fsf@posteo.net> Resent-From: Yuan Fu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 03 Mar 2023 22:30:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61923 X-GNU-PR-Package: emacs Original-Received: via spool by 61923-submit@debbugs.gnu.org id=B61923.167788259332539 (code B ref 61923); Fri, 03 Mar 2023 22:30:02 +0000 Original-Received: (at 61923) by debbugs.gnu.org; 3 Mar 2023 22:29:53 +0000 Original-Received: from localhost ([127.0.0.1]:34117 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pYDuP-0008Sg-Oy for submit@debbugs.gnu.org; Fri, 03 Mar 2023 17:29:53 -0500 Original-Received: from mail-pf1-f179.google.com ([209.85.210.179]:40642) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pYDuL-0008SR-EG for 61923@debbugs.gnu.org; Fri, 03 Mar 2023 17:29:49 -0500 Original-Received: by mail-pf1-f179.google.com with SMTP id x7so527148pff.7 for <61923@debbugs.gnu.org>; Fri, 03 Mar 2023 14:29:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1677882580; h=to:cc:date:message-id:subject:mime-version :content-transfer-encoding:from:from:to:cc:subject:date:message-id :reply-to; bh=K3NzRa/z8nwvauc5GKYm3RMXelnpWkkeZHv4TZg5MUQ=; b=GN82AKKPXzSv6X51LgoUloT5JWD29aN5FCU4Au6oKrWIQh/1KR2AA723a3U6m3Xf3J TQOD+jbLj8wWIhKRw1HYB5lJ4/F0TfJY+oqjQYBKyKFVs0wJFG8AUI4aM6S25IKab+tM jFGnz/hIi94ZWp9Uwfop2gfgz8r51/AouiZ92ORAJUUS7QDp7ZJ02Ke5tQinRD19ruEo gjGX+v613ZsJRVYe/b6eUgi/KY3rersFIF7RuVHcvnP2NS5gFhVyFhp5zSW8fTJ2Yhhf Zh2OxQKrMWIJAxgGXwXlTksaaKgMG1H/YMnz0tlpxb/aOm3JtF3kRR6jYb4IoPzbDOf2 EW5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1677882580; h=to:cc:date:message-id:subject:mime-version :content-transfer-encoding:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=K3NzRa/z8nwvauc5GKYm3RMXelnpWkkeZHv4TZg5MUQ=; b=3rYa4MsnvQg26CfZYXa+64MYtvqGsmxWjnjhD+DhdT/tw3cMk/7E/Nt5zkMaILxZLT mXYRyUogA0Svp00EKDvV4QG4rrkrlD0A7xWisXe9OSKg15tvjeraHP4aHqcIr13aBGmg kkI4v1S8q5PEg7bNyAy/PilGpRSYaTxdYolKiuLMQoz1WtULZ53lRgsk7xIlRp9HRCjn 8IaexCul+9eI5VzENhRy3Ucz0rQr1/bfUea382N2r2jwM7OJmF5ukxkcLE/cIMVBWJDH QwDWeQvINied4pKz6YwZhGVCcI4Kyp8HyKWurXaeaB+6bkb6XSYAubygHzlVxbCBgwY+ 9RfA== X-Gm-Message-State: AO0yUKXI1bury1xEr2bbJEPnlP+paRltZdHsNnLNRpuzjXadtszmnpil SA5nOE6Akfy4O48SBLkjFWM= X-Google-Smtp-Source: AK7set912N0O4uYlxoF+O+ndNXeFNT0d4qx9RbdQZIn5fo8euWpjiC/y1WA0+G8uZLe1OsrWMVVtcw== X-Received: by 2002:a62:7b94:0:b0:5ce:ef1b:a80 with SMTP id w142-20020a627b94000000b005ceef1b0a80mr3525593pfc.32.1677882579763; Fri, 03 Mar 2023 14:29:39 -0800 (PST) Original-Received: from smtpclient.apple (cpe-172-117-161-177.socal.res.rr.com. [172.117.161.177]) by smtp.gmail.com with ESMTPSA id e19-20020a62aa13000000b005b6f63c6cf4sm2111241pff.30.2023.03.03.14.29.39 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 03 Mar 2023 14:29:39 -0800 (PST) X-Mailer: Apple Mail (2.3731.400.51.1.1) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:257236 Archived-At: Gleb Zakharov writes: > Eli Zaretskii 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() { > _ =3D ` > 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 In general we shouldn=E2=80=99t mess with indentation inside of = multi-line strings, Let me see what go-ts-mode is doing. Yuan