From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Theodor Thornhill Newsgroups: gmane.emacs.devel Subject: Re: Plug treesit.el into other emacs constructs Date: Tue, 13 Dec 2022 19:17:13 +0100 Message-ID: <87tu1zgod2.fsf@thornhill.no> References: <87wn6whete.fsf@thornhill.no> <83359ksmsy.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35154"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org, casouri@gmail.com To: Eli Zaretskii , Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Dec 13 19:18:33 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 1p59rM-0008qz-80 for ged-emacs-devel@m.gmane-mx.org; Tue, 13 Dec 2022 19:18:32 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p59qq-0006km-DE; Tue, 13 Dec 2022 13:18:00 -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 1p59qG-0006kL-Un for emacs-devel@gnu.org; Tue, 13 Dec 2022 13:17:25 -0500 Original-Received: from out-213.mta0.migadu.com ([2001:41d0:1004:224b::d5]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p59qA-0005fE-DX for emacs-devel@gnu.org; Tue, 13 Dec 2022 13:17:23 -0500 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=thornhill.no; s=key1; t=1670955435; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=+3qdvgo/FkRPppF6e9H2qMdmc4BYDTKlDJq3MmbJbhk=; b=j1dOuI/hm8/TH5vsSxJ/4X2PkHu653/9CbzChs/+8xIJQmvoSytlrg34tUst/po6YK6CIZ XscqZ1bGmpCqkEeBm081wvWvbJr+4n3Ebiml7tK28L8F0KbaWytAN6WfqNialGM3BrIxwi jDmd6mPl+JFtAFeyslN8jv6dHxnMlaTmvkeWDBGg0uSvqVUw/d0/VQROW0WGOjWa6ejVGu 4A6PMKhM5/4IW29+5n6OD/khRVL0jNMFsggkMpzzvGs8fTdb79lXRrojbTQaNcVf/g5nL/ iFfG4c9E2yJfADLRGlbkisxVPUsrguXOcqgKT/YwA9MGJBTFhiKoQaMq2nIFOw== In-Reply-To: <83359ksmsy.fsf@gnu.org> X-Migadu-Flow: FLOW_OUT Received-SPF: pass client-ip=2001:41d0:1004:224b::d5; envelope-from=theo@thornhill.no; helo=out-213.mta0.migadu.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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable 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:301339 Archived-At: Eli Zaretskii writes: >> From: Theodor Thornhill >> Cc: eliz@gnu.org, casouri@gmail.com >> Date: Mon, 12 Dec 2022 15:33:33 +0100 >> >> The patch only adds a few things: >> >> - (defvar-local forward-sentence-function nil), the analog to >> forward-sexp-function and beginning-of-defun-function >> - treesit-sexp-type-regexp and treesit-sentence-type-regexp, both to be >> added to treesit-major-mode-setup, and added to each *-ts-mode. >> >> Is the general idea ok? > > Yes, because you can see that CC Mode supports these key bindings as > well, with its own commands. > >> Could we add these or similar changes to >> paragraphs.el and just piggyback on it inside of treesit? > > I'm not sure we want to go this far in the release branch, but it > would be nice to have these in C mode, for example (or any other > tree-sitter supported mode whose "regular" sibling has similar > commands). The generalizations should IMO be left for master. > >> If we want this I can start working on preparing a patch for this on the >> master branch. > > I think so, but let's hear from others, like Stefan (CC'ed). Great, thanks :)