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.devel Subject: Re: Plug treesit.el into other emacs constructs Date: Sat, 24 Dec 2022 00:44:12 -0800 Message-ID: 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> <83zgbd5lrn.fsf@gnu.org> Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.1\)) 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="17665"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Theodor Thornhill , monnier@iro.umontreal.ca, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Dec 24 09:44:47 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 1p9098-0004OC-Qx for ged-emacs-devel@m.gmane-mx.org; Sat, 24 Dec 2022 09:44:46 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p908h-00022H-Fv; Sat, 24 Dec 2022 03:44:19 -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 1p908f-00021u-S0 for emacs-devel@gnu.org; Sat, 24 Dec 2022 03:44:17 -0500 Original-Received: from mail-pl1-x633.google.com ([2607:f8b0:4864:20::633]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p908e-0006Cl-8a; Sat, 24 Dec 2022 03:44:17 -0500 Original-Received: by mail-pl1-x633.google.com with SMTP id d15so6848966pls.6; Sat, 24 Dec 2022 00:44:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; 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=XlmaUB9ahILOtIPK8lSr4hP6X0QFmZjWFmmmEKy2la0=; b=VYe77WePnyYoDAxHlmqIYo4lH8ENBJ+bBVTeJ3pKFKYGsVlNiFQmLQUNTpeQrJ5Irv j9CEdHA6TLBD5DksxsLyGRZTdI9HaEke7w6H0cWPB0gisVoJJuNEoe9Jwol0VKPMIB66 kYNFNfRlQ5Oki+CWVtyunDjqiKN0RLs9U2GDZ/TlydAF4psNGnGUhL4PPqoISImN+FTP vfn4y7ArW5tU6Z2gYFDBJOZlwFGpLg3+ArVgeLbeOgEOhRLaQYUf/cNi0EFnZkq0JoYC rXmvZCk37lL1Cw4VajnAiAzg2HJO//yMal+rHKIPoyts4tLzejUrRudILskxbmEjq8zp i3OA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=XlmaUB9ahILOtIPK8lSr4hP6X0QFmZjWFmmmEKy2la0=; b=AZRntWWOICTSXvhlcQ+nkejRUOJo7vejzteYUFGZ+uvjdgvr1mfJBQOy2D0aWXBL9F hqDOGkD77JM8UH9W7LD6AGZQbIGxDfVmsvBldpblNse7Ig1p7UkazD17dmJu78qPs0We GFZ37BVwwncydCnOTD3y7pjkEIdhxiHiymtpSwBCUtzM3LVu5D/5vBTWF+MHK2401qgg TvEsiLzjVwqfQHB6p+QqiVMEAB+8w4mz5tfO8VCWPodGxDo6dErmWtzDW8PfcDoVCpLc 7QAc2US9771a2f103v6KVn/SW/d8TWSD2u0fRi6hIFhfkqH0k83h2Jzk0FNO3OnZ6qxC VDMg== X-Gm-Message-State: AFqh2kr0r3s+m7j7kBmvltqdskoAszI9FJZlDldWAvgrICmsXK+6TrI4 cWwUuApUDjSmpABtOOxXB8scH2Q+bEc= X-Google-Smtp-Source: AMrXdXtJRsVOfxZBCdzT/qdWhoUhyEoKNAlw2EALzdU5nSUwVSmb3BeHhH9V2SePydhi1lVRPJfM8A== X-Received: by 2002:a05:6a21:1507:b0:9d:efbe:529a with SMTP id nq7-20020a056a21150700b0009defbe529amr14888405pzb.10.1671871454221; Sat, 24 Dec 2022 00:44:14 -0800 (PST) Original-Received: from smtpclient.apple (cpe-172-117-161-177.socal.res.rr.com. [172.117.161.177]) by smtp.gmail.com with ESMTPSA id a15-20020a63e84f000000b0043b565cb57csm3327855pgk.73.2022.12.24.00.44.13 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 24 Dec 2022 00:44:13 -0800 (PST) In-Reply-To: <83zgbd5lrn.fsf@gnu.org> X-Mailer: Apple Mail (2.3696.120.41.1.1) Received-SPF: pass client-ip=2607:f8b0:4864:20::633; envelope-from=casouri@gmail.com; helo=mail-pl1-x633.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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:301830 Archived-At: > On Dec 23, 2022, at 11:00 PM, Eli Zaretskii wrote: >=20 >> From: Theodor Thornhill >> Cc: Yuan Fu , emacs-devel@gnu.org, eliz@gnu.org >> Date: Thu, 15 Dec 2022 21:57:31 +0100 >>=20 >> Theodor Thornhill writes: >>=20 >>> Theodor Thornhill writes: >>>=20 >>>> Stefan Monnier writes: >>>>=20 >>>>>> If this code is plugged into transpose-sexps we get this nice = behavior: >>>>>=20 >>>>> 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. >>>>>=20 >>>>=20 >>>> Great! >>>>=20 >>>>>> 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. >>>>>>=20 >>>>>> What do you think? >>>>>=20 >>>>> 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 :-) >>>>=20 >>>> Great. I'll prepare a patch for this behavior, and we can discuss = the >>>> forward-* commands after that. >>>>=20 >>>=20 >>> What do you think about this? Feel free to try it and let me know = if >>> something is completely wrong :-) >>=20 >> Now you can use 'arg' as well. >=20 > Stefan, Yuan: any comments or objections to installing this on master? This is the same as the patch in bug#60128, right? I don=E2=80=99t have = much to comment about it. It looks pretty nice to me :-) Yuan