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, 6 Jan 2025 10:04:24 -0800 Message-ID: <41B5B189-0A51-49A5-B0B3-A745F7668BDC@gmail.com> References: <87plox4mtp.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> <875xmumpzv.fsf@mail.linkov.net> <86ikqubdsd.fsf@gnu.org> <87wmf9912l.fsf@mail.linkov.net> <87a5c5v5z8.fsf@thornhill.no> <877c79qhcs.fsf@mail.linkov.net> <87sepxt4yl.fsf@thornhill.no> <87o70k9y2e.fsf@mail.linkov.net> <87plkzyh60.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="9460"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Mickey Petersen , Eli Zaretskii , Theodor Thornhill , Stefan Monnier , 73404@debbugs.gnu.org To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jan 06 19:05:17 2025 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 1tUrTZ-0002Ja-7n for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 06 Jan 2025 19:05:17 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tUrTM-0007VB-Df; Mon, 06 Jan 2025 13:05:04 -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 1tUrTK-0007Tt-SC for bug-gnu-emacs@gnu.org; Mon, 06 Jan 2025 13:05:02 -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 1tUrTK-0007l0-Is for bug-gnu-emacs@gnu.org; Mon, 06 Jan 2025 13:05:02 -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=efZLgDElrVvXzbpRd1K6AyqkHRYp8qoiDlTUyZFOHvk=; b=Y72y2mYN7cKQcHOrdYSfhXiP+ErTQDjZYkPYTtPgyG+ZdbvCotnmE+AzMeeF12/zYu3A8rq9KBJDDLzplAMWJk10NuRaDofYYi0HtiUmEIeRPcty+WkUQzxHK4bsYwOceh/hF6Zw04G3rvRELGDFcPGTQBAX9WvoZTtTznOI7eRl5toXr+socMKy7XOaT3Mk23Yqc4OeNx5KNlxaDceF7lrExwt/ttGr0f81RxBqGXRJHMT13UZPYerMySPpqEPhiaxrLYF/HDsISi6dmABoBt/Yz9/lYYampzB+SdhizfxlWM5xIF6+QVoFkWmodRBMUc2O7FWDuHsR05nK0O3cfA==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tUrTK-0001wu-9P for bug-gnu-emacs@gnu.org; Mon, 06 Jan 2025 13:05: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, 06 Jan 2025 18:05: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.17361866867454 (code B ref 73404); Mon, 06 Jan 2025 18:05:02 +0000 Original-Received: (at 73404) by debbugs.gnu.org; 6 Jan 2025 18:04:46 +0000 Original-Received: from localhost ([127.0.0.1]:39983 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tUrT4-0001wA-Dn for submit@debbugs.gnu.org; Mon, 06 Jan 2025 13:04:46 -0500 Original-Received: from mail-pl1-x62d.google.com ([2607:f8b0:4864:20::62d]:60721) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1tUrT1-0001vp-D3 for 73404@debbugs.gnu.org; Mon, 06 Jan 2025 13:04:44 -0500 Original-Received: by mail-pl1-x62d.google.com with SMTP id d9443c01a7336-21654fdd5daso197066125ad.1 for <73404@debbugs.gnu.org>; Mon, 06 Jan 2025 10:04:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1736186677; x=1736791477; 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=efZLgDElrVvXzbpRd1K6AyqkHRYp8qoiDlTUyZFOHvk=; b=YGx7pCU+wZB8sQpUD3jEEja996F9GK00imGFjFGES+scfNkJiL95z5DHlfPqwaCvsA JAp2dWmlE9yjEl8NAhe5S0glpbfTygHHahUkA1GCFheIwEsayb21+qYwKY2JMbREePCo QiigAoiSBbffVQ7x+MHV9wEk10MCw7l6+xFVCI/UVW8S5pfiFMn9CfRu/NQ50x38dqNQ 5VU5Mj+bK7SMraShsA9LMnu6p2ZFJ36j/O9D1LSrjabABfb8q0v4g3u77INUWmp7UacN LmX1MlckJZwDdz5+fkwDVZQzrzbJ+W+HOhzVhOV4YnVnhfGKOy9LTxRIED6YE2zPj+Fn Th7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736186677; x=1736791477; 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=efZLgDElrVvXzbpRd1K6AyqkHRYp8qoiDlTUyZFOHvk=; b=OH2GcL/Y7SARhd96NVwImtpI7Tx/6VCn86vQEXSTU3zy2fbBaEaO8SOzE1AF+9S//I 2QN4DayWYHBbyZeto6S5ft7v8o53X1p9rBYvGEhZioP2TaGyoZ2/v4YGq0CwDLwr7WOT QfQJQ53C3T9+SPRFNHp27PVYACJDQzMFfsEuY5YUBzhmtTsveehDaunU4mb/yqaiu9l+ ELJK2pglUM0EDZ9GCQ+779069q8EB9FVIb3QykZGtKPI6kNH+WFlFWOvy/wu6AZdbH2Z QS57Z2Heqfjckp2jw8qza+T9RKYkfotruBy4uYu0cmG/6RTcwiwrF2eSDE38ts6bvbww v+gg== X-Forwarded-Encrypted: i=1; AJvYcCVWyw9jN7xbekDMp/9yDg0CmZ+gFxT+db14hhhTBAuAWz6cTl7rwPNHFWebwCid7txCK75qAg==@debbugs.gnu.org X-Gm-Message-State: AOJu0YyymeHF2itFtb6j8Vsz94OTZ2fpWPBCkTmriVMA/4q+kDNPHOLo RlBsJDEOVkyI/WFPtuDRVAat8YnUomzkocSsALCKvsZUCmNXNBol X-Gm-Gg: ASbGncuhUTE1vC8BlKKOIg18mOr4FsRdsg1crXxnIbBdbbzDGoWx9pngn/bnMhHYY9T gvCvrSv7vlkILgJFyunb0K/NYIZhy8rkK53H4UGHmcrmrgWgIzgFjkx/dMmv9HAfAfiHUZ57KR+ 38ScE/qBuuYYUb92g6T8Nh4XCnoRnvNMe26ggBldX9cIqoGeKgD+doF7t1TwyvN0eODE8nnNV+E IB90/6BltlbmnucEgoxmzJAXzLMUsrEuISKqcRfsfygh0pQqogKzbHWjpp8rvOlVjtL5Y3PzZZ/ mIpr X-Google-Smtp-Source: AGHT+IHKlR4J6K4kkPUfA4f6J6aaw5tZjxw69bTIP6lDNVAlZySo20MWiCM+OkQMgNWDQNNZkz79kQ== X-Received: by 2002:a05:6a21:6da4:b0:1e1:c03c:b420 with SMTP id adf61e73a8af0-1e5e07f9731mr107184547637.31.1736186676941; Mon, 06 Jan 2025 10:04:36 -0800 (PST) Original-Received: from smtpclient.apple ([2601:646:8f81:6120:c496:8cdf:4c5d:3617]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-72aad830349sm31504571b3a.47.2025.01.06.10.04.35 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 06 Jan 2025 10:04:36 -0800 (PST) In-Reply-To: <87plkzyh60.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:298680 Archived-At: >>=20 >> I think these should be oblivious to the syntax (i.e. line = `forward-line` >> and `forward-char`). >>=20 >> Your list missed the "defun" unit of navigation. >=20 > Because there is no `forward-defun` ;-) >=20 > But strange that "defun" still is defined by = `treesit-defun-type-regexp` > instead of a "defun" thing in `treesit-thing-settings`. treesit-defun-type-regexp is shipped in Emacs 29, so we can=E2=80=99t = just remove it. Defun navigation functions in treesit.el does support = the defun thing, but I made treesit-defun-type-regexp an override of the = defun thing. OTOH treesit-sexp/sentence-type-regexp wasn=E2=80=99t = shipped in Emacs 29 so I removed them, preferring the thing definition. Yuan=