GNU bug report logs - #45922
27.1; Better auto-fill for strings in python-mode

Previous Next

Package: emacs;

Reported by: Акимжанчег <zelenaruta <at> gmail.com>

Date: Sat, 16 Jan 2021 22:49:02 UTC

Severity: normal

Tags: moreinfo, wontfix

Found in version 27.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Акимжанчег <zelenaruta <at> gmail.com>
Cc: 45922 <at> debbugs.gnu.org, Stefan Monnier <monnier <at> iro.umontreal.ca>
Subject: bug#45922: 27.1; Better auto-fill for strings in python-mode
Date: Sat, 07 May 2022 17:51:14 +0200
Акимжанчег <zelenaruta <at> gmail.com> writes:

> Today I was making a program in Python for myself. One of the functions
> required me to pass a long string to it, so I did that. Auto-fill-mode
> got triggered when I pressed the space bar and the string was split from
> this:
> ```
> matrix = self.getprop("Coordinate Transformation Matrix").split(", ")
> ```
> To this:
> ```
> matrix = self.getprop("Coordinate Transformation
>                                   Matrix").split(", ")
> ```
> After that, I saw `SyntaxError: EOL while scanning string literal'.

I can reproduce this in Emacs 29, too.

The Python auto fill basically just calls `do-auto-fill', so I wondered
whether there was something simple to tell that function to not consider
any points where ppss-string-terminator is non-nil as a break point, but
apparently not?  (It seems like such an obvious thing to have, so
perhaps there's a good reason we don't have that.)

I've added Stefan to the CCs; perhaps he has some comments.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




This bug report was last modified 3 years and 16 days ago.

Previous Next


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