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.devel Subject: Re: Plug treesit.el into other emacs constructs Date: Sat, 24 Dec 2022 09:00:28 +0200 Message-ID: <83zgbd5lrn.fsf@gnu.org> References: <87wn6whete.fsf@thornhill.no> <87r0x3gnv5.fsf@thornhill.no> <04BB786A-3ED1-4918-8583-17AA01A1E453@gmail.com> <4E3940CA-67A6-45B7-8785-4E60FDECCDFB@gmail.com> <4315EFC6-7AA8-4A48-845C-9CA8B88034D9@thornhill.no> <87bko521n0.fsf@thornhill.no> <87359h1ybt.fsf@thornhill.no> <871qp01msi.fsf@thornhill.no> <87v8mczb6b.fsf@thornhill.no> <87sfhgz9s8.fsf@thornhill.no> <87pmckz8p0.fsf@thornhill.no> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25174"; mail-complaints-to="usenet@ciao.gmane.io" Cc: monnier@iro.umontreal.ca, casouri@gmail.com, emacs-devel@gnu.org To: Theodor Thornhill Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Dec 24 08:01:12 2022 Return-path: Envelope-to: ged-emacs-devel@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 1p8yWu-0006NG-E5 for ged-emacs-devel@m.gmane-mx.org; Sat, 24 Dec 2022 08:01:12 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p8yWO-0005xi-Lb; Sat, 24 Dec 2022 02:00:40 -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 1p8yWL-0005xE-DU for emacs-devel@gnu.org; Sat, 24 Dec 2022 02:00:37 -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 1p8yWK-00046Q-5q; Sat, 24 Dec 2022 02:00:36 -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=P8mFgc+fqudPUKcPh8rTS+BtrH46LHCuUM1EzFyCcnc=; b=f6Vmui1PZEQ+ MtS4/NxEbhFRgYANoEtC0Z/Qvb4PbtQJ2EkLjIQoz8rAKkT8/G6NPjzg4rB5qtzumYh688uwglkOA EgS9Sro881El/1Be8rfPczqo/QoCfKS48ZkF7r1M36d8/0sfzgYMX9gViNq1rg91cp9Nv7GdA0k0V 8Uqjlsd601qXdR0Z3G+TjT8baTFfBmAWx2IVOmhyrky6GvnjmSvtrZsw6xT1GUUgWBO347gcQjm41 IhM0uV1tfmsVnxX6s0+/lHS9kyQ0kjrHO5EQxQqTcaQqAao/Xqp3/Wyq4+fb7C3J0JkyArbs+3bMA /OLJcoRL90BxXOIB7t787w==; 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 1p8yWD-0006bc-Pn; Sat, 24 Dec 2022 02:00:32 -0500 In-Reply-To: <87pmckz8p0.fsf@thornhill.no> (message from Theodor Thornhill on Thu, 15 Dec 2022 21:57:31 +0100) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:301826 Archived-At: > From: Theodor Thornhill > Cc: Yuan Fu , emacs-devel@gnu.org, eliz@gnu.org > Date: Thu, 15 Dec 2022 21:57:31 +0100 > > Theodor Thornhill writes: > > > Theodor Thornhill writes: > > > >> Stefan Monnier writes: > >> > >>>> If this code is plugged into transpose-sexps we get this nice behavior: > >>> > >>> It's a bit different from what SMIE would do, but there's a lot of > >>> overlap and when it's different it's arguably better, so sounds good > >>> to me. > >>> > >> > >> Great! > >> > >>>> Now forward/backward-sexp can actually work a little differently, as you > >>>> suggest, or we can let it use the same "move over siblings"-semantic. > >>>> In that case we don't even need the treesit-sexp-type-regexp variables to > >>>> control this, I think. > >>>> > >>>> What do you think? > >>> > >>> I'm not sufficiently familiar with the tree-sitter tree to foresee > >>> precisely how it would affect `forward/backward-sexp`, but I think you > >>> have a good enough understanding to make a good judgment at this > >>> point :-) > >> > >> Great. I'll prepare a patch for this behavior, and we can discuss the > >> forward-* commands after that. > >> > > > > What do you think about this? Feel free to try it and let me know if > > something is completely wrong :-) > > Now you can use 'arg' as well. Stefan, Yuan: any comments or objections to installing this on master?