all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Michael Kleehammer <michael@kleehammer.com>
Cc: 67394@debbugs.gnu.org
Subject: bug#67394: 29.1.90; python-ts-mode triple quoted string fill bug
Date: Thu, 23 Nov 2023 09:00:17 +0200	[thread overview]
Message-ID: <837cm9gdj2.fsf@gnu.org> (raw)
In-Reply-To: <87zfz53uv0.fsf@kleehammer.com> (message from Michael Kleehammer on Wed, 22 Nov 2023 23:24:19 -0600)

> From: Michael Kleehammer <michael@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.





  reply	other threads:[~2023-11-23  7:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-23  5:24 bug#67394: 29.1.90; python-ts-mode triple quoted string fill bug Michael Kleehammer
2023-11-23  7:00 ` Eli Zaretskii [this message]
2023-11-29 20:51   ` Michael Kleehammer
2023-11-30  6:26     ` Eli Zaretskii

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

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

  git send-email \
    --in-reply-to=837cm9gdj2.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=67394@debbugs.gnu.org \
    --cc=michael@kleehammer.com \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.