From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#60894: 30.0.50; [PATCH] Add treesit-forward-sexp Date: Thu, 19 Jan 2023 08:24:01 +0200 Message-ID: <834jsn11q6.fsf@gnu.org> References: <875yd428ng.fsf@thornhill.no> <87o7qws1r1.fsf@masteringemacs.org> <86bkmw6m92.fsf@mail.linkov.net> <57e35fbf-ef77-e12c-56c6-8d84cb92a516@yandex.ru> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="5663"; mail-complaints-to="usenet@ciao.gmane.io" Cc: mickey@masteringemacs.org, 60894@debbugs.gnu.org, theo@thornhill.no, monnier@iro.umontreal.ca, juri@linkov.net To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jan 19 07:24:14 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 1pIOLO-0001Fx-2U for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 19 Jan 2023 07:24:14 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pIOLE-0008Gs-Vb; Thu, 19 Jan 2023 01:24: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 1pIOLC-0008Gi-UC for bug-gnu-emacs@gnu.org; Thu, 19 Jan 2023 01:24: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 1pIOLC-00035o-NF for bug-gnu-emacs@gnu.org; Thu, 19 Jan 2023 01:24:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pIOLC-00058d-87 for bug-gnu-emacs@gnu.org; Thu, 19 Jan 2023 01:24:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 19 Jan 2023 06:24:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60894 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 60894-submit@debbugs.gnu.org id=B60894.167410943819741 (code B ref 60894); Thu, 19 Jan 2023 06:24:02 +0000 Original-Received: (at 60894) by debbugs.gnu.org; 19 Jan 2023 06:23:58 +0000 Original-Received: from localhost ([127.0.0.1]:42362 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pIOL7-00058K-L1 for submit@debbugs.gnu.org; Thu, 19 Jan 2023 01:23:57 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:55058) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pIOL5-000584-FV for 60894@debbugs.gnu.org; Thu, 19 Jan 2023 01:23:55 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pIOKx-00034o-Em; Thu, 19 Jan 2023 01:23:47 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=H4/z7X3NW3PNPcEKmPo2FuPOL4NGKlWRWGIiUkvxZgw=; b=g3sjjzfRVbqC KZgTAfrblOcp1riIEeNXq1iqqXpvkTAz8u5d2pdLLhKy8V9IAJ2bt7+2V/8CymQE8+VHwS5aj+9ts Og4xHmf9LbzbJnTHiERq67jtd+3x6Oe1WH9N+JyjSbDWAzVzBnlkv6WKPcW12YMLuI9bOeVy+UjhI WWBZ+/s2/mDPqz7IuQwegOTJ19OxEumo5i6LVvoEb5Rtab2aCiubmrScE/j4WaenThmn7TA0030/O Sjd2YZ8W9GbtG5X9Z09UlM084pdtGLBYtjErZp40BMFCU43nGY4AtMzbOI8wJzWJcs5FejW4+2bay vK+/PBR5/QwQVkoedrBQqA==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pIOKw-0000cD-DM; Thu, 19 Jan 2023 01:23:47 -0500 In-Reply-To: <57e35fbf-ef77-e12c-56c6-8d84cb92a516@yandex.ru> (message from Dmitry Gutov on Thu, 19 Jan 2023 00:06:22 +0200) 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:253676 Archived-At: > Cc: 60894@debbugs.gnu.org, Stefan Monnier > Date: Thu, 19 Jan 2023 00:06:22 +0200 > From: Dmitry Gutov > > In my intuition, sexps are expressions which can be nested (a lot). > > Sentences are "flat" expressions. I would probably say that in > tree-sitter modes sentences should be equivalent to "statements". > > So, sexps could be small, and they could be large. For them various list > navigation operations make sense (like the previously mentioned ones). > > Sentences stand somewhere in the middle, and they're more like > sequential. A operation like backward-up-statement wouldn't make a lot > of sense, however. Intuitively, the above SGTM wrt programming languages. > Note quite sure what would correspond to statement in html-mode, but I > would put separate tag elements in the category of word, or symbols, or, > okay, statements, rather than sexps. A sexp is the tag opener, plus tag > contents, plus its closer. If we could find HTML equivalents of the above notions, that would be very good for consistent UX. But if that turns out to be hard or far-fetched or impossible, we could alternatively come up with HTML-specific interpretation of these abstract notions. As long as the result makes sense to users who edit or view HTML files, it would still be okay, I think, even if the relation to programming language construct is more remote.