GNU bug report logs - #60856
29.0.60; C-M-f in python-ts-mode does not work properly with docstrings

Previous Next

Package: emacs;

Reported by: Apostolis Bessas <apostolis <at> bessas.me>

Date: Mon, 16 Jan 2023 10:55:01 UTC

Severity: normal

Tags: patch

Found in version 29.0.60

Fixed in version 31.1

Done: Stefan Kangas <stefankangas <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Theodor Thornhill <theo <at> thornhill.no>
To: Apostolis Bessas <apostolis <at> bessas.me>
Cc: 60856 <at> debbugs.gnu.org
Subject: bug#60856: 29.0.60; C-M-f in python-ts-mode does not work properly with docstrings
Date: Sun, 22 Jan 2023 11:30:17 +0100
[Message part 1 (text/plain, inline)]
Apostolis Bessas <apostolis <at> bessas.me> writes:

> In python-ts-mode executing C-M-f (forward-sexp) when at the beginning
> of a docstring does not go to the end of the docstring (as happens in
> python-mode), but at the end of the file.
>
> However, if I switch to python-mode and then back to python-ts-mode,
> C-M-f works correctly. See the following example:
>
> - Start emacs -Q
> - Execute:
>
> (add-to-list 'auto-mode-alist '("\\.py\\'" . python-ts-mode))
>
> - Create the file test.py with the contents:
>
> """Some docstring.
>
> The docstring has multiple lines.
> """
>
> x = 1
>

Can you test this patch?  More nodes are needed, but this is a start, I
think.  Must be applied to the master branch :)

Theo

[0001-Add-sentence-and-sexp-movement-to-python-ts-mode.patch (text/x-patch, attachment)]

This bug report was last modified 225 days ago.

Previous Next


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