From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#61923: 30.0.50; go-ts-mode, multiline raw-string-literal wrong indentation Date: Sat, 4 Mar 2023 01:50:57 +0200 Message-ID: <1d59dc78-1480-9690-204c-317d552c4b90@yandex.ru> References: <877cvz5b0t.fsf@posteo.net> <6313B57B-47BB-47D3-94F4-BA0C60FFD913@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35550"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.7.1 Cc: Eli Zaretskii , 61923@debbugs.gnu.org To: Yuan Fu , snyssfx@posteo.net Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Mar 04 00:52:24 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 1pYFCJ-00095B-Hz for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 04 Mar 2023 00:52:23 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pYFC2-0005I7-Fr; Fri, 03 Mar 2023 18:52:06 -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 1pYFBz-0005GR-4X for bug-gnu-emacs@gnu.org; Fri, 03 Mar 2023 18:52: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 1pYFBy-0004Ow-RX for bug-gnu-emacs@gnu.org; Fri, 03 Mar 2023 18:52:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pYFBy-0002XJ-Mi for bug-gnu-emacs@gnu.org; Fri, 03 Mar 2023 18:52:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 03 Mar 2023 23:52: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.16778874679651 (code B ref 61923); Fri, 03 Mar 2023 23:52:02 +0000 Original-Received: (at 61923) by debbugs.gnu.org; 3 Mar 2023 23:51:07 +0000 Original-Received: from localhost ([127.0.0.1]:34227 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pYFB5-0002Vb-Hf for submit@debbugs.gnu.org; Fri, 03 Mar 2023 18:51:07 -0500 Original-Received: from mail-wr1-f51.google.com ([209.85.221.51]:35782) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pYFB3-0002V1-7U for 61923@debbugs.gnu.org; Fri, 03 Mar 2023 18:51:05 -0500 Original-Received: by mail-wr1-f51.google.com with SMTP id q16so3793895wrw.2 for <61923@debbugs.gnu.org>; Fri, 03 Mar 2023 15:51:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1677887459; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :sender:from:to:cc:subject:date:message-id:reply-to; bh=4KEHpS9imHkTPlDY5HNJUcwT4qUyvIHNszNZ+7ttx5w=; b=EyqM/z/RAfes4Y6ciwpnPFKfeTTtXChKQuCxy3L6VS95zfjYr+lLMa+HajBEVWpUnN aX0A6B6yiwRb2EsudXg1gNUfjkDZcq4e79XzoXxx0ABK089YVN1KkTR2IPNM7HgLPdWU UBjQBt+do33iPstr7qOOtoYIChuQ0aUzuknwIeDdJBlSSinRnt3WGZDIbQMvOD/Jk30s req/6ZPT6AnTJ2MEuQ0UfjLT+PLxSDckTcFJP8O/vV+VElDyeGjA3p2Ce4ejOVp9+xM3 RpetpkxaDH3xsP5x8XGPAZ9IUxsPyZ5hKePg/IdaOKwqZW3Nyd8NE5I88c++CpWiAuSQ eOSw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1677887459; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :sender:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=4KEHpS9imHkTPlDY5HNJUcwT4qUyvIHNszNZ+7ttx5w=; b=H3/jJMTrEzHiVW5Lmn8jSYA1rh6yzWly01WXxVjWot8G6l4aifRMeXxuYlLM+dsSEl k8wpKZJR8DtVburP33vyqc1Ch+7jwwuZy7osgSo/Y0qJ8RMvij8zeSwukEq+5syQe2+P cI8vCGbQTz2ZdXLxIIeRSTNo+ldxkxEWXVIfM2RiZP+2dGRMKXC4yjMNt4r6N/mgAy5u A66UmqwP30itRe9iCYtwOCoEUejCexRzzBrKh/4hOGVwWgqtckXZOIxRKUKUhs/tgrFb 4fwOMfd3RWpI/wMOr40uknLmEGBR9Vp8otN2TwH7qrJR7uuO4xlBSrLcpNzyzMagb9Yb ODag== X-Gm-Message-State: AO0yUKXp/J7WtUaSZwhK4gtJzhZ8xbF79GKDO6ObJcuBR/c3q/RIdm7l tzTOoG3PS9clgFqiFiVhl4w= X-Google-Smtp-Source: AK7set9i4Cw645U/G2cnHg7ZUX1VQx7MUnuI9QZTf1Yf7liznOzdA9ZB+25mCbTeXWqBnEHCaCnTOA== X-Received: by 2002:adf:d850:0:b0:2c5:a742:572f with SMTP id k16-20020adfd850000000b002c5a742572fmr2385040wrl.49.1677887459144; Fri, 03 Mar 2023 15:50:59 -0800 (PST) Original-Received: from [192.168.0.2] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id e15-20020a5d594f000000b002c56046a3b5sm3382365wri.53.2023.03.03.15.50.58 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 03 Mar 2023 15:50:58 -0800 (PST) Content-Language: en-US In-Reply-To: <6313B57B-47BB-47D3-94F4-BA0C60FFD913@gmail.com> 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:257239 Archived-At: On 04/03/2023 00:29, Yuan Fu wrote: > In general we shouldn’t mess with indentation inside of multi-line strings, > Let me see what go-ts-mode is doing. This seems to work: diff --git a/lisp/progmodes/go-ts-mode.el b/lisp/progmodes/go-ts-mode.el index e8f93d14744..1857c67bb82 100644 --- a/lisp/progmodes/go-ts-mode.el +++ b/lisp/progmodes/go-ts-mode.el @@ -71,6 +71,7 @@ go-ts-mode--indent-rules ((node-is "]") parent-bol 0) ((node-is "}") parent-bol 0) ((node-is "labeled_statement") no-indent) + ((parent-is "raw_string_literal") no-indent) ((parent-is "argument_list") parent-bol go-ts-mode-indent-offset) ((parent-is "block") parent-bol go-ts-mode-indent-offset) ((parent-is "communication_case") parent-bol go-ts-mode-indent-offset)