From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#68824: treesitter support for outline-minor-mode Date: Mon, 05 Feb 2024 09:22:08 +0200 Organization: LINKOV.NET Message-ID: <86eddrl6jj.fsf@mail.linkov.net> References: <86le8667u7.fsf@mail.linkov.net> <865xza39vp.fsf@gnu.org> <86y1c6q7oh.fsf@mail.linkov.net> <868r44ryzb.fsf@mail.linkov.net> <3D859057-3DE9-470A-80A4-E0F734A0A622@gmail.com> <86r0hsxiaf.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4766"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) Cc: 68824@debbugs.gnu.org To: Yuan Fu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Feb 05 08:29:30 2024 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 1rWtQ1-00016u-VA for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 05 Feb 2024 08:29:29 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rWtPQ-0008I5-2r; Mon, 05 Feb 2024 02:28:52 -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 1rWtPO-0008Hh-AJ for bug-gnu-emacs@gnu.org; Mon, 05 Feb 2024 02:28:50 -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 1rWtPO-0001fj-22 for bug-gnu-emacs@gnu.org; Mon, 05 Feb 2024 02:28:50 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rWtPa-00064q-7B for bug-gnu-emacs@gnu.org; Mon, 05 Feb 2024 02:29:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 05 Feb 2024 07:29:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 68824 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 68824-submit@debbugs.gnu.org id=B68824.170711809623298 (code B ref 68824); Mon, 05 Feb 2024 07:29:02 +0000 Original-Received: (at 68824) by debbugs.gnu.org; 5 Feb 2024 07:28:16 +0000 Original-Received: from localhost ([127.0.0.1]:50460 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rWtOp-00063d-RB for submit@debbugs.gnu.org; Mon, 05 Feb 2024 02:28:16 -0500 Original-Received: from relay6-d.mail.gandi.net ([217.70.183.198]:47553) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rWtOj-00063E-SI for 68824@debbugs.gnu.org; Mon, 05 Feb 2024 02:28:13 -0500 Original-Received: by mail.gandi.net (Postfix) with ESMTPSA id B1629C0003; Mon, 5 Feb 2024 07:27:50 +0000 (UTC) In-Reply-To: (Yuan Fu's message of "Sun, 4 Feb 2024 20:34:24 -0800") X-GND-Sasl: juri@linkov.net 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:279439 Archived-At: >> Also a remaining question: why treesit-parent-until simply calls >> ‘(funcall pred node)’ instead of supporting the standard format >> that includes a regexp by using treesit-node-match-p? >> >> This causes such an inconvenience that for treesit-outline-level >> that uses treesit-parent-until there is a need to wrap a regexp >> in a lambda such as for html-ts-mode below. > > Nothing other than my oversight :-) > I pushed a change to master that fixes this. Thanks. It seems you forgot to replace 'funcall' in 'treesit-parent-while' as well? ;-) > As for the patch, I think treesit-outline-predicate could be set to > a named function rather than a lambda generated on the fly, but > I don’t have strong opinions about it (and maybe you have some reason > to use a lambda?) Otherwise LGTM. I completely agree, so will move lambdas to the named functions.