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#73404: 30.0.50; [forward/kill/etc]-sexp commands do not behave as expected in tree-sitter modes Date: Mon, 30 Dec 2024 00:00:51 -0800 Message-ID: References: <87plox4mtp.fsf@masteringemacs.org> <87frpm20t7.fsf@masteringemacs.org> <8634lmbs8t.fsf@gnu.org> <87bk0a1u0o.fsf@masteringemacs.org> <86tte2a5o3.fsf@gnu.org> <877cay1lqt.fsf@masteringemacs.org> <86frpma06f.fsf@gnu.org> <86ikueiekp.fsf@mail.linkov.net> <86ed4zg1cc.fsf@mail.linkov.net> <87zflac68t.fsf@mail.linkov.net> <87jzcdlxdp.fsf@mail.linkov.net> <87o71jocgs.fsf@mail.linkov.net> <87wmfwqg7e.fsf@mail.linkov.net> <8734i5fyv1.fsf@mail.linkov.net> Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3776.700.51\)) 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="1879"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Mickey Petersen , Eli Zaretskii , Theodor Thornhill , 73404@debbugs.gnu.org, Stefan Monnier To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Dec 30 09:03:18 2024 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 1tSAk8-0000Jr-VL for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 30 Dec 2024 09:03:17 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tSAjy-00005M-Gb; Mon, 30 Dec 2024 03:03: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 1tSAjw-0008WP-F3 for bug-gnu-emacs@gnu.org; Mon, 30 Dec 2024 03:03:04 -0500 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 1tSAju-0000WH-HC for bug-gnu-emacs@gnu.org; Mon, 30 Dec 2024 03:03:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=References:Date:In-Reply-To:From:Mime-Version:To:Subject; bh=deZrfdjuG/JSq679l39a0tAcRsZnxiTHz05Pjzu9Xtw=; b=gicEFvSpezHA37OMWGH8fQSuS5mZSzmoj+bYLSNPXJRR6k1MXcIOpLQLcybiHw0pkSFpZR0qaUyy8VTzyDS2idW00fJuB2KK7hCMlrBtGwAOH9wyQN/0eXbZc7YyjaTnhSnJqZqdC9ZZyv6IlBxxaX+obEV+10jy6Ib6YsFIx6tf/Hu3ZEFfsrlKHKGNMdM7PYqtw4x+eDD8KhLoGX+fun3Ets1KCbMqBGSP9e5oVwZXu3lpfxeiXefzWRzJn94LXB7V8kNH6b88pH6G3C9/IpAz56AG4TsIAv14QAw66gyvGWKNsrAZLyUYfLgTOZkreH0Da5aNDIDN2gvPOTJSaQ==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tSAju-0001yE-CE for bug-gnu-emacs@gnu.org; Mon, 30 Dec 2024 03:03:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Yuan Fu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 30 Dec 2024 08:03:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73404 X-GNU-PR-Package: emacs Original-Received: via spool by 73404-submit@debbugs.gnu.org id=B73404.17355457347496 (code B ref 73404); Mon, 30 Dec 2024 08:03:02 +0000 Original-Received: (at 73404) by debbugs.gnu.org; 30 Dec 2024 08:02:14 +0000 Original-Received: from localhost ([127.0.0.1]:57213 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tSAj7-0001wq-Pp for submit@debbugs.gnu.org; Mon, 30 Dec 2024 03:02:14 -0500 Original-Received: from mail-pl1-f178.google.com ([209.85.214.178]:44217) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tSAj3-0001wV-Sw for 73404@debbugs.gnu.org; Mon, 30 Dec 2024 03:02:12 -0500 Original-Received: by mail-pl1-f178.google.com with SMTP id d9443c01a7336-2163dc5155fso112342685ad.0 for <73404@debbugs.gnu.org>; Mon, 30 Dec 2024 00:02:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1735545664; x=1736150464; darn=debbugs.gnu.org; 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=deZrfdjuG/JSq679l39a0tAcRsZnxiTHz05Pjzu9Xtw=; b=ifNMIwlOtB7hA8NnLCjbOe9G5vDuQsxpYDrkLm1FZ/igIOfQ1SkmGB7XDd/1X733ei 43xO4jvzZcVKTalL+3csWaCUobLyTlfy2aVPKv975e2pVrPTRDVebD1/wUF0sWO2AavW qqon18NiSW9kZS7N3pjsA3QuLmYIFmM+0fTwiHD6cPs2tSG8MbUF/aP26m8ek5z73euA 2Ho03CL1AZEr7/hJhD6Q53fRbOCJh6w2P6B8xyYNy/sEDynR4DvaQUJImXCalJFhgnom 6iLoxW+OlJSw5GoQFWWE+quCHSxzrnKFagztY9EtrM1BR9KTRfjMJUYw9frYZaGuHbZy qz1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735545664; x=1736150464; 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=deZrfdjuG/JSq679l39a0tAcRsZnxiTHz05Pjzu9Xtw=; b=pod/EHPYihWZScITiqFEoJrtJXsa5bBGLijg/RKsjDwt36JbjMI2JujOVUux4FBHC6 o20QLVDPui50eTRUnMTKMBUqiUllvde3duB6rSsY+8i4gQJAAcJybZRpf+xTWzl+UzSc LTYit8tZk7bZxMVIJq8LmlDamSx4Mhnyf6jj92N9rXoWnRR2W58ufBHGKio9sdZkCDU8 WK0xPwe/xxWg8eyBDiLEZEs/i28Jo+qnlIA2JYhrnnMMzF8bviBB3bbaCnyjPWk12QsZ xlCKuYcca6Cq7/G2/d02dhSFjt1T9FKVWN1EJ0vDjknjv121KxVgDHyZdki8XMtXELmB rhPg== X-Forwarded-Encrypted: i=1; AJvYcCWblv4Mh9+GuJNrBIaI0T22puhaYUbxl6zrwt/NTVh5Es97m5FZMXIZzu264f+jksCtc+9Uiw==@debbugs.gnu.org X-Gm-Message-State: AOJu0YxX35lwINn+uwG4t49hrO2OgC+VrpoC9gLc176A2LPp29XnhFx7 lc4ydRLrUNhTNIIUTeCAvFoNYqe5DkMg/2UgJUq/CMbQ4KF9r5CN X-Gm-Gg: ASbGncsaoKFxNUb9k88MhMC1pTD6IMVT/KtVMNtvhHjb3+NG5zC4A40pE+jxbfw24Ey yJ2KsZROow6MW8pXtbUxg6z9ECamVQik3ZJQEjdepHjx9OKnC+bCibjjDXc7jHjp+S7J36T26wh mtMkutaOs6Qj0KtmhOng1HMUrEWbR6crBKeoJBz1tNUzUohdohPYWjzbwqhtfkR1/a6w/t/OEkZ Sizie74B5tDG0f8PVKiigGn044/holEhneA14s1G1O1cVSRCfMhJ6GjzUYankHRXmK67EYfRxNH yLI= X-Google-Smtp-Source: AGHT+IH1I/ub7m9CwUFSHzcV2oWc1ei6i7JA5GuT6VAaoKyRuvwWP1OWIyi2+JWo/Hx8lozSKRknRg== X-Received: by 2002:a05:6a00:35c3:b0:726:64a5:5f67 with SMTP id d2e1a72fcca58-72abde09893mr50185210b3a.12.1735545664009; Mon, 30 Dec 2024 00:01:04 -0800 (PST) Original-Received: from smtpclient.apple ([2601:646:8f81:6120:57e:6e82:c5e4:f5c6]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-72aad8163fdsm18651115b3a.6.2024.12.30.00.01.02 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 30 Dec 2024 00:01:03 -0800 (PST) In-Reply-To: <8734i5fyv1.fsf@mail.linkov.net> X-Mailer: Apple Mail (2.3776.700.51) 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:297986 Archived-At: > On Dec 29, 2024, at 11:15=E2=80=AFPM, Juri Linkov = wrote: >=20 >> Also added 'sexp-list' to c-ts-mode, js-ts-mode, ruby-ts-mode and >> html-ts-mode. Addition of 'sexp-list' to other ts-modes is underway. >=20 > BTW, my initial intention was to add the thing 'list'. > But then I discovered that (treesit-thing-next (point) 'list) > uses the function 'list' instead of the thing 'list'. >=20 > However, the current 'sexp-list' as a two-word composite is too ugly. > Now I found a better replacement: 'group'. This word is already used > in lisp.el such as in the docstring of 'forward-list': >=20 > "Move forward across one balanced group of parentheses." >=20 > And the error messages: "No next group". >=20 > So exactly the same message will be used by >=20 > (format-message "No next %S" pred) >=20 > where 'pred' will be 'group'. IMHO, this looks better: >=20 > (setq-local treesit-thing-settings > `((html > (sexp ,(regexp-opt '("element" "text" "attribute" = "value"))) > (group ,(regexp-opt '("element""))) > (sentence "tag") > (text ,(regexp-opt '("comment" "text")))))) I don=E2=80=99t have an opinion on this. Groups sounds a bit abstract, = but so does sexp-list. So as long as we do a good job explaining the = concept, it should be fine. Yuan=