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#58873: 29.0.50; Fix indent-line-function in tree-sitter Date: Sat, 29 Oct 2022 13:06:55 -0700 Message-ID: <271AF531-593E-4E49-A447-B2E783A197FD@gmail.com> References: <87eduqsaw0.fsf@thornhill.no> Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.1\)) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7984"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 58873@debbugs.gnu.org To: Theodor Thornhill Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Oct 29 22:08:14 2022 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 1oos7q-0001ua-G6 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 29 Oct 2022 22:08:14 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oos7f-0005Y8-RA; Sat, 29 Oct 2022 16:08:03 -0400 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 1oos7f-0005Xz-67 for bug-gnu-emacs@gnu.org; Sat, 29 Oct 2022 16:08:03 -0400 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 1oos7e-0002ve-Ud for bug-gnu-emacs@gnu.org; Sat, 29 Oct 2022 16:08:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oos7e-0007MA-B3 for bug-gnu-emacs@gnu.org; Sat, 29 Oct 2022 16:08:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Yuan Fu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 29 Oct 2022 20:08:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58873 X-GNU-PR-Package: emacs Original-Received: via spool by 58873-submit@debbugs.gnu.org id=B58873.166707402928219 (code B ref 58873); Sat, 29 Oct 2022 20:08:02 +0000 Original-Received: (at 58873) by debbugs.gnu.org; 29 Oct 2022 20:07:09 +0000 Original-Received: from localhost ([127.0.0.1]:36745 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oos6m-0007L2-LU for submit@debbugs.gnu.org; Sat, 29 Oct 2022 16:07:08 -0400 Original-Received: from mail-pf1-f182.google.com ([209.85.210.182]:34504) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oos6h-0007KX-M6 for 58873@debbugs.gnu.org; Sat, 29 Oct 2022 16:07:07 -0400 Original-Received: by mail-pf1-f182.google.com with SMTP id f140so7541416pfa.1 for <58873@debbugs.gnu.org>; Sat, 29 Oct 2022 13:07:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=O4N/n+O5NznmwG/Qzolh1nP5BVL7xpDnBjmwizH47pk=; b=CRzkV3l4h8frQKouDo59h6NO6Z6PO52f2PuZdOruEYnsH01GjdnR4qL0pZpym01i13 JCZmuTOWwq4UdZXatHFL/FCgVW0Iad3WI/pYWNNu5myq3ZmLtMEWAI4mCOWBkti9966T FEnRxM8NNxOi14XEky7INu1bBKjhIG88PrNNjySM7WFlGPIRM1VHqAid3nCI6oRYF7s5 hYW9EOBe5yQhsTWzm9iKoY89KbOzj7tybXoBsOgyNNE/fVVMiEEF4KST96q2ocCCkp2J pVAO2UqTsWjSmWlgfR+JyR8alN68n5u9drAcLrFkWC9Ui9Cdd6XBkHbCMvW9Z2XLTECJ GcTw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=O4N/n+O5NznmwG/Qzolh1nP5BVL7xpDnBjmwizH47pk=; b=4x6Fq0OZ3JKemrh6K6/dQ5a29MKjQmTiN/iwHWTX6IW/pKTM4axIJ12fyfMnrDrDk/ PN+1JpGVBGALocEM9xBJY4f93wenzJbRP50f+U/0wDwlTg3jeSrnq4dx9iMuyow/lh75 EzKw6CZesFFMfRvyc3F5B1+U8CTUuVnLLR7SjaoDwYtzymFSRdxjz5kvGdLGRLyskJW0 NHN8ra8k+GCmKIjadI4MZpLlWHfa/latN6fC7AwB3sorVpztjMco+kgywzQ5vBSVlQM/ 7C76Y++u3divo5w6jUVoY9tg9432I7dFSZrhXc/rjuMGoII6wSkFS//a2ov3vlkByrre 2UiA== X-Gm-Message-State: ACrzQf3P2lOJuzf70Fd73kXWdoZ0C/XzU81h7/NOwPSTGa0nk4sohAeT YR7XQrPzmCFqcyYs5XoHMis= X-Google-Smtp-Source: AMsMyM6TrjtokzqIwkUb03k3nUmqJiKjkpFTFkUxRBOEiApB78h17GcJW4S7m4Oj6HlZYRYRr+DPDw== X-Received: by 2002:a63:4a18:0:b0:46f:8e43:e959 with SMTP id x24-20020a634a18000000b0046f8e43e959mr2505171pga.184.1667074017687; Sat, 29 Oct 2022 13:06:57 -0700 (PDT) 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 t4-20020a17090ad50400b002130c269b6fsm1409659pju.1.2022.10.29.13.06.56 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 29 Oct 2022 13:06:56 -0700 (PDT) In-Reply-To: <87eduqsaw0.fsf@thornhill.no> X-Mailer: Apple Mail (2.3696.120.41.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: , Original-Sender: "bug-gnu-emacs" Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:246570 Archived-At: > On Oct 29, 2022, at 12:11 PM, Theodor Thornhill via Bug reports for = GNU Emacs, the Swiss army knife of text editors = wrote: >=20 >=20 > Hi Yuan! >=20 > There were some regressions with the new indent-line-function - see > attached patch. We need the point, not the indentation, and the > save-excursion is actually needed. >=20 > consider: >=20 > ``` > foo({ > thing: 1, > tho|ng: 2, // <--- point is | > }) > ``` >=20 > if you indent now you want to end up like this: >=20 > ``` > foo({ > thing: 1, > tho|ng: 2, // <--- point is | > }) > ``` >=20 > or if=20 >=20 > ``` > foo({ > thing: 1, > |thong: 2, // <--- point is | > }) > ``` > You want to end up like this: >=20 > ``` > foo({ > thing: 1, > |thong: 2, // <--- point is | > }) > ``` >=20 > This patch addresses this :-) >=20 > In addition there was a bug where the parent-bol didn't indent > correctly, this should also be fixed now. >=20 > Thanks again, Yuan! I applied your change (manually), thanks! Yuan=