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.bugs Subject: bug#68824: treesitter support for outline-minor-mode Date: Thu, 1 Feb 2024 23:27:50 -0800 Message-ID: <695857EA-4FC0-4D5E-9DA0-43C2C70DBA53@gmail.com> 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> <864jerz6pb.fsf@gnu.org> Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.700.6\)) 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="15122"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 68824@debbugs.gnu.org, Juri Linkov To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Feb 02 08:29:20 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 1rVnzD-0003mW-Tw for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 02 Feb 2024 08:29:19 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rVnyo-0001OW-Lv; Fri, 02 Feb 2024 02:28:54 -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 1rVnym-0001O6-W8 for bug-gnu-emacs@gnu.org; Fri, 02 Feb 2024 02:28:53 -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 1rVnym-0002nq-Ne for bug-gnu-emacs@gnu.org; Fri, 02 Feb 2024 02:28:52 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rVnyx-0001lu-8Y for bug-gnu-emacs@gnu.org; Fri, 02 Feb 2024 02:29:03 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Yuan Fu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 02 Feb 2024 07:29:03 +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.17068588996721 (code B ref 68824); Fri, 02 Feb 2024 07:29:03 +0000 Original-Received: (at 68824) by debbugs.gnu.org; 2 Feb 2024 07:28:19 +0000 Original-Received: from localhost ([127.0.0.1]:43530 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rVnyF-0001kL-CA for submit@debbugs.gnu.org; Fri, 02 Feb 2024 02:28:19 -0500 Original-Received: from mail-pf1-x42f.google.com ([2607:f8b0:4864:20::42f]:61626) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rVnyE-0001k5-Bw for 68824@debbugs.gnu.org; Fri, 02 Feb 2024 02:28:19 -0500 Original-Received: by mail-pf1-x42f.google.com with SMTP id d2e1a72fcca58-6de24201aa6so1121378b3a.2 for <68824@debbugs.gnu.org>; Thu, 01 Feb 2024 23:28:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706858882; x=1707463682; darn=debbugs.gnu.org; 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=HDnj7TC4+SoZOAz/5UFfL+tWQqjqOoxlLjq1FjM3inU=; b=nIE3+Gk85oSceG/dTf0S+H/ccHwEx9Yc0ahWLy69LG/v/1I5wdOPUhV5jE3dM7Xrb9 d4bZQPlzZYT7Wqszpj1Pwldn26jA5aw5kA/wdB7f70h2K20/TIL3pdGa9SOe4R0QPMen SNMCqV9/YNJv2NJBoawPhdwH9CePJOqgu5rDIJH3dxLcihlT/GnfVpvqrwyoNglsp91W LpXIq92QlH1DhypX3S/jBCk993Ezq7F1LvbNUF1AiZUB5c3+Ab+Iq0lrPLf2cwUGcjoz Sz7/HaJCXvw89g8B+tlnl9YN3H/FCc4oatE77FtWowuTOHDau4xnRUed3EB3Lkng4fbi Xk2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706858882; x=1707463682; 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=HDnj7TC4+SoZOAz/5UFfL+tWQqjqOoxlLjq1FjM3inU=; b=faZ5Sr0unquwg4QDeBQoBIw1RVlMsr6B9hLzwQs5ZPgJKf9toKFMQjUXP2mBqua/+S oqtEBJx2CFkByazGRsvquxPEKzg91RV5xlwgFgTQ2hGd4bpYChYMtiK8EmDmAufMuAQB bwjgETIxISA6v8l4DSmas2Av0yXRjy40xwzhncR0g3MJvfyvVYwmFRfc578h07bO8DKj 2TrGq1JLDQtDVdz2rsbEn2TytgvIHUwBVPGExRraOg2d+c/snMysP9xym8WHejzuzLDo UHbGXVmtBsAlLuiE9M2BGNSh5peCxfE7mFE49V4IwWfxrbqI9QXeM53bSLTTfmFt5sFZ dJfg== X-Gm-Message-State: AOJu0YwUwUJeu3IFZxBt8vtHThCgPmcHMwH3br1UufaOA8av3VfK5iFu m7fbyZZTZOMAESju7Bci3VF8R0WUCH/s2IyBjwSUdfVKPts3dgiw X-Google-Smtp-Source: AGHT+IEm+t4kb1AkPjicsrdsFbeNb3cFSwbms1ku2wS1vG+YkPiVhQtl8GwvMbFPPLgqnCtdfhzb0A== X-Received: by 2002:a05:6a00:179a:b0:6df:df6b:392 with SMTP id s26-20020a056a00179a00b006dfdf6b0392mr7951470pfg.20.1706858881768; Thu, 01 Feb 2024 23:28:01 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCW/t4GcEfS0G/q5TJTwMyxwIAIsMY+9FYGtiW1FZrl6xYEy6PgNL3rZZ8ef1wB0940QrYXcstB+lIJdKfOmiCatZI31vPE= Original-Received: from smtpclient.apple (172-117-161-177.res.spectrum.com. [172.117.161.177]) by smtp.gmail.com with ESMTPSA id u6-20020a62ed06000000b006dfb8105235sm909357pfh.112.2024.02.01.23.28.01 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 01 Feb 2024 23:28:01 -0800 (PST) In-Reply-To: <864jerz6pb.fsf@gnu.org> X-Mailer: Apple Mail (2.3731.700.6) 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:279322 Archived-At: > On Feb 1, 2024, at 11:05 PM, Eli Zaretskii wrote: >=20 >> Cc: 68824@debbugs.gnu.org >> From: Yuan Fu >> Date: Thu, 1 Feb 2024 16:34:47 -0800 >>=20 >> Instead of using treesit-search-forward, can you use = treesit-beginning-of-thing or treesit--navigate-thing to do what you = want? They handle the =E2=80=9Cchild before parent=E2=80=9D problem for = you, and handles some other edge cases. >=20 > If the above helps Juri accomplish his goal, I think we should reflect > that somehow in the ELisp manual, at least. I see that > treesit-beginning-of-thing is not even documented in the ELisp manual, > and treesit--navigate-thing is an internal function that is not > supposed to be called from outside of treesit.el. >=20 > Thanks. The whole =E2=80=9Cthings=E2=80=9D feature [1] is not documented right = now, since I was experimenting with them. If we think it=E2=80=99s time = we can make the functions public and document them. Personally I think = we can wait for a bit longer. [1] Includes - treesit-thing-settings - treesit-thing-definition - treesit-beginning/end-of-thing - treesit--things-around - treesit--thing-sibling/prev/next - treesit--thing-at - treesit--navigate-thing Plus you can pass thing definitions to search functions like = treesit-search-forward. Yuan=