From: Tomas Nordin <tomasn@posteo.net>
To: Акимжанчег <zelenaruta@gmail.com>, 45922@debbugs.gnu.org
Subject: bug#45922: 27.1; Better auto-fill for strings in python-mode
Date: Sun, 17 Jan 2021 12:58:38 +0100 [thread overview]
Message-ID: <87bldnzsep.fsf@posteo.net> (raw)
In-Reply-To: <CAJBTzOmTHje52-R5Q4J4=qy2mYNEgD+n1QdvyyQeMYEapQ2RwQ@mail.gmail.com>
Hello Акимжанчег
Акимжанчег <zelenaruta@gmail.com> writes:
> Date: Sun, 17 Jan 2021 03:45:31 +0600
> Message-ID: <875z3wd090.fsf@gmail.com>
> --text follows this line--
>
> 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'.
> This can be fixed with two different methods:
> 1. Adding a `+' between the strings, so that it looks like
> ```
> matrix = self.getprop("Coordinate Transformation"
> +"Matrix").split(", ")
> ```
> 2. Dividing the string to 2 separate strings:
> ```
> matrix = self.getprop("Coordinate Transformation"
> "Matrix").split(", ")
From the recepie it would seem like fill-column is set to something low.
But probably you have some indentation there prior to 'matrix = ...'?
I don't think there is something in python mode that do what you are
suggesting as of now. For curiosity, do you see this kind of support in
other editors?
nit: the 2 suggestions would loose a space in the string
next prev parent reply other threads:[~2021-01-17 11:58 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-16 21:49 bug#45922: 27.1; Better auto-fill for strings in python-mode Акимжанчег
2021-01-17 11:58 ` Tomas Nordin [this message]
[not found] ` <CAJBTzO=rE4n4iZdBNv2HE=zi+_O1r=bqwFdsCku1-3VZOgqOWg@mail.gmail.com>
2021-01-17 20:18 ` Tomas Nordin
2022-05-07 15:51 ` Lars Ingebrigtsen
2022-05-07 16:25 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-05-07 16:56 ` Lars Ingebrigtsen
2022-05-07 17:28 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87bldnzsep.fsf@posteo.net \
--to=tomasn@posteo.net \
--cc=45922@debbugs.gnu.org \
--cc=zelenaruta@gmail.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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).