GNU bug report logs - #67394
29.1.90; python-ts-mode triple quoted string fill bug

Previous Next

Package: emacs;

Reported by: Michael Kleehammer <michael <at> kleehammer.com>

Date: Thu, 23 Nov 2023 05:25:02 UTC

Severity: normal

Merged with 67262

Found in version 29.1.90

Done: Yuan Fu <casouri <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 67394 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Michael Kleehammer <michael <at> kleehammer.com>
Cc: 67394 <at> debbugs.gnu.org
Subject: Re: bug#67394: 29.1.90; python-ts-mode triple quoted string fill bug
Date: Thu, 23 Nov 2023 09:00:17 +0200
> From: Michael Kleehammer <michael <at> kleehammer.com>
> Date: Wed, 22 Nov 2023 23:24:19 -0600
> 
> Filling a paragraph in a Python triple quoted string does not work in
> python-ts-mode.  It does work in python-mode.  To reproduce, enter the
> following into the scratch buffer and try to word wrap the triple quoted
> string using M-q in python-mode and python-ts-mode.  It word wraps in
> python-mode but not the tree-sitter version.
> 
> def test():
>     """l
>     abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc
>     """
>     pass
> 
> The core issue is in python-syntax-context in the 'triple-quoted-string
> branch of the pcase, python.el:534 in the emacs 29 branch.  The code is
> the same in master.
> 
>     ('triple-quoted-string (and (eq t (nth 3 ppss)) (nth 8 ppss)))
> 
> In python-mode (nth 3 ppss) is t, but in python-ts-mode it is 34, which
> is a quote character.  I'm pretty new to the tree-sitter code so I
> cannot suggest a fix.

Is this the same as bug#67262?  If so, does the change suggested there
fix this issue as well?

Thanks.




This bug report was last modified 1 year and 209 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.