From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Andrey Listopadov Newsgroups: gmane.emacs.bugs Subject: bug#66159: [PATCH] Various improvements to lua-ts-mode (Bug#66159) Date: Sun, 08 Oct 2023 12:43:50 +0300 Message-ID: <87r0m5qw2n.fsf@gmail.com> References: <8734ynz15f.fsf@pub.pink> <87zg0u9zn2.fsf@gmail.com> <87edi6xpvn.fsf@pub.pink> Mime-Version: 1.0 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="28031"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.8.11; emacs 30.0.50 Cc: 66159@debbugs.gnu.org To: john muhl Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Oct 08 11:54:57 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 1qpQUy-00073I-Ui for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 08 Oct 2023 11:54:56 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qpQUm-0004wv-7c; Sun, 08 Oct 2023 05:54:44 -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 1qpQUk-0004wn-Nz for bug-gnu-emacs@gnu.org; Sun, 08 Oct 2023 05:54:42 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qpQUk-0003vf-Df for bug-gnu-emacs@gnu.org; Sun, 08 Oct 2023 05:54:42 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qpQV3-0007Xp-Oz for bug-gnu-emacs@gnu.org; Sun, 08 Oct 2023 05:55:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Andrey Listopadov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 08 Oct 2023 09:55:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 66159 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 66159-submit@debbugs.gnu.org id=B66159.169675884828917 (code B ref 66159); Sun, 08 Oct 2023 09:55:01 +0000 Original-Received: (at 66159) by debbugs.gnu.org; 8 Oct 2023 09:54:08 +0000 Original-Received: from localhost ([127.0.0.1]:56263 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qpQUB-0007WK-O7 for submit@debbugs.gnu.org; Sun, 08 Oct 2023 05:54:08 -0400 Original-Received: from mail-ed1-x532.google.com ([2a00:1450:4864:20::532]:51687) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qpQU8-0007Vo-Cp for 66159@debbugs.gnu.org; Sun, 08 Oct 2023 05:54:05 -0400 Original-Received: by mail-ed1-x532.google.com with SMTP id 4fb4d7f45d1cf-5344d996bedso6335447a12.3 for <66159@debbugs.gnu.org>; Sun, 08 Oct 2023 02:53:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1696758818; x=1697363618; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:message-id:in-reply-to:date :subject:cc:to:from:user-agent:references:from:to:cc:subject:date :message-id:reply-to; bh=syYq0qlGvBQbVTPK9E8yTLxVnm6oEvJOn8aTrvHTTAY=; b=Qm4LsDqR+IMwMQQ3VrOh9+UH9HCci2unUdhjpCu1VSscMhC/2R8PheIDm7v6ZvbB9o BGzZRt8ZhJUUxKKAJG4hUwghKbIEHFWhOFJLBJIEMhCFqJB2ydYBDneaKqYig6vXna0j foZEbRuFVvPjN+exAtWwiZXcxdlIF803275uF+fKqrRRhYVseIN3D3SsDsus/dTN+VQ/ hbrwdFafp4H9srpcoehiwaYweU0FHXPZj01fGnoZunVO13r3/jgG8VWdLKizf5TT9BKk IFARtJgbvHdlLX8KmW7r1LVyrh0fRUAwy9JVAL7qTh+mZd17TdT4jVulndeTcvTUy70P 0mHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696758818; x=1697363618; h=content-transfer-encoding:mime-version:message-id:in-reply-to:date :subject:cc:to:from:user-agent:references:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=syYq0qlGvBQbVTPK9E8yTLxVnm6oEvJOn8aTrvHTTAY=; b=wKxom3iw/9V1QlxQt8fXKHB18+avIehuas6GYYXXReCUa4oBK2gEsuDwl1OBSl3hWu dBqbfnYbB4ABJ9U4CTdtzgta+hxusfoqf91b5DGZX5LwJsegYDYWN35fuiZTZuvcHgjd bmG7JybMaJdiIuRE8Sq23uw7AzHBPVyR2nJGCpBfC6M9rmrxKTbxDpfbMkWktRJmWYPn bU+UWZTZIAuTGAWZcgqxaDFYaZl9BJFVNzu8tkieurtbJa0soolIXnpQeqh2Bjzn7TyO Sw9S7sNO5vPZsjy/eWA6NcCTcePJQYl2GFKRPRvOD7Lkh8TaXwamk72XFnOqeo97pktR +ElA== X-Gm-Message-State: AOJu0YwDm4g+VBc7lpiuDRo6kBCSgggZdolTgUTbgVt1RJhmBLRsIvnt tJLihgzp8WQ5FUuQCb2faV1ibZU4cks= X-Google-Smtp-Source: AGHT+IH3lDAjtGVGJAdhasnVUMCTFvYFNnjGOJSig5chqrzFn4XHLwX+w+TAyZqdlreCnP1zfssQSw== X-Received: by 2002:a17:906:32cc:b0:9ae:65d6:b882 with SMTP id k12-20020a17090632cc00b009ae65d6b882mr12485255ejk.40.1696758818317; Sun, 08 Oct 2023 02:53:38 -0700 (PDT) Original-Received: from toolbox.smtp.gmail.com (broadband-90-154-71-4.ip.moscow.rt.ru. [90.154.71.4]) by smtp.gmail.com with ESMTPSA id si5-20020a170906cec500b009b97d9ae329sm5339478ejb.198.2023.10.08.02.53.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 08 Oct 2023 02:53:37 -0700 (PDT) In-reply-to: <87edi6xpvn.fsf@pub.pink> 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:272067 Archived-At: john muhl writes: >> It seems the last patch broke the movement. > > The tests for those pass and are still working here. Maybe you found > another case that needs to be improved. What is the specific problem? It seems so, sorry for not including this, I thought I sent this before. Here's an example: =E2=96=88for i=3D1,10 do print(x) end Pressing Pressing C-M-f (forward-sexp) puts the point here: for i=3D1,10 do print(x)=E2=96=88 end I think it should go over the `for' loop right to the `end'. Pressing Pressing C-M-b (backward-sexp), however, puts the point here: for i=3D1,10 do =E2=96=88print(x) end Pressing C-M-b again doesn't move the point anymore. Same thing happens with for-each style loop: =E2=96=88for k,v in pairs({1,2,3}) do print(x) end C-M-f: for k,v in pairs({1,2,3})=E2=96=88do print(x) end C-M-f: for k,v in pairs({1,2,3}) do print(x)=E2=96=88 end Backward movement manages to take the point way back to the pairs: C-M-b, C-M-b: for k,v in pairs=E2=96=88({1,2,3}) do print(x) end I went to https://devhints.io/lua and copied a bunch of examples of other loops to the scratch buffer, and the movement is as follows: =E2=96=88while condition do end for i =3D 1,5 do end for i =3D start,finish,delta do end for k,v in pairs(tab) do end repeat until condition -- Breaking out: while x do if condition then break end end C-M-f: while condition do end for i =3D 1,5 do end for i =3D start,finish,delta do end for k,v in pairs(tab)=E2=96=88do end repeat until condition -- Breaking out: while x do if condition then break end end C-M-f: while condition do end for i =3D 1,5 do end for i =3D start,finish,delta do end for k,v in pairs(tab) do end repeat until condition -- Breaking out: while x do if condition then break end=E2=96=88 end -- Andrey Listopadov