> 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. Thanks, I tried and it works. Probably treesit--navigate-thing is not internal anymore. Also the patch below uses treesit--thing-at that doesn't look internal either. So maybe two dashes could be removed from names. 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.