Subject: bug#65695: 29.1; fill-paragraph not working in python-ts-mode

From: Eli Zaretskii <[email-masked]>
Date: Sun, 10 Sep 2023 10:46:52 +0300

Ping!

Yuan, I would like to try to fix this on the emacs-29 branch, if
feasible.

> Cc: [email-masked]
> Date: Sat, 02 Sep 2023 12:06:41 +0300
> From: Eli Zaretskii <[email-masked]>
> 
> > Date: Fri, 1 Sep 2023 19:52:37 +0100
> > From: George Kettleborough <[email-masked]>
> > 
> > 
> > Use python-ts-mode (with an installed language grammar). Type a very
> > long function docstring and use `fill-paragraph' (M-q).
> > 
> > Expected: This should reformat the docstring to fit in the fill width
> > (by calling `python-fill-paragraph' by default).
> > 
> > Actual: Nothing happens.
> > 
> > Note: Normal fill behaviour still works in python-mode.
> 
> Yuan, could you please look into fixing this?  It looks like the
> fill-paragraph-function used by python-ts-mode is still
> python-fill-paragraph, but the latter depends on syntax tables being
> set, which I guess isn't done in python-ts-mode?  So we probably need
> a different function that uses tree-sitter information?
> 
> Thanks.
> 
> 
> 
>