unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Yuan Fu <casouri@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 68824@debbugs.gnu.org, Juri Linkov <juri@linkov.net>
Subject: bug#68824: treesitter support for outline-minor-mode
Date: Thu, 1 Feb 2024 23:27:50 -0800	[thread overview]
Message-ID: <695857EA-4FC0-4D5E-9DA0-43C2C70DBA53@gmail.com> (raw)
In-Reply-To: <864jerz6pb.fsf@gnu.org>



> On Feb 1, 2024, at 11:05 PM, Eli Zaretskii <eliz@gnu.org> wrote:
> 
>> Cc: 68824@debbugs.gnu.org
>> From: Yuan Fu <casouri@gmail.com>
>> Date: Thu, 1 Feb 2024 16:34:47 -0800
>> 
>> 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 “child before parent” problem for you, and handles some other edge cases.
> 
> 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.
> 
> Thanks.

The whole “things” feature [1] is not documented right now, since I was experimenting with them. If we think it’s 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




  reply	other threads:[~2024-02-02  7:27 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-30 17:37 bug#68824: treesitter support for outline-minor-mode Juri Linkov
2024-01-30 18:46 ` john muhl via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-01-31  7:20   ` Juri Linkov
2024-01-30 19:21 ` Eli Zaretskii
2024-01-31  7:32   ` Juri Linkov
2024-02-01 17:12     ` Juri Linkov
2024-02-02  0:34       ` Yuan Fu
2024-02-02  7:05         ` Eli Zaretskii
2024-02-02  7:27           ` Yuan Fu [this message]
2024-02-02  7:34             ` Eli Zaretskii
2024-02-02  7:53         ` Juri Linkov
2024-02-04 17:15         ` Juri Linkov
2024-02-05  4:34           ` Yuan Fu
2024-02-05  7:22             ` Juri Linkov
2024-02-06  7:21               ` Yuan Fu
2024-02-08  7:40     ` Juri Linkov
2024-02-08  8:30       ` Eli Zaretskii
2024-02-08 17:20         ` Juri Linkov
2024-02-08 18:56           ` Eli Zaretskii
2024-02-09  7:07             ` Juri Linkov
2024-02-09 19:25               ` Eli Zaretskii
2024-02-10 17:29                 ` Juri Linkov
2024-02-10 17:57                   ` Eli Zaretskii
2024-02-11 17:34                     ` Juri Linkov
2024-02-11 19:22                       ` Eli Zaretskii
2024-02-12  1:07                         ` Yuan Fu
2024-02-12 12:59                           ` Eli Zaretskii
2024-02-12 18:16                             ` Juri Linkov
2024-02-13 17:02                               ` Juri Linkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=695857EA-4FC0-4D5E-9DA0-43C2C70DBA53@gmail.com \
    --to=casouri@gmail.com \
    --cc=68824@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=juri@linkov.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).