GNU bug report logs - #46739
Python mode vs. whitespace

Previous Next

Package: emacs;

Reported by: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>

Date: Wed, 24 Feb 2021 02:04:02 UTC

Severity: wishlist

Done: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 46739 in the body.
You can then email your comments to 46739 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#46739; Package emacs. (Wed, 24 Feb 2021 02:04:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 24 Feb 2021 02:04:02 GMT) Full text and rfc822 format available.

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

From: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
To: bug-gnu-emacs <at> gnu.org
Subject: Python mode vs. whitespace
Date: Wed, 24 Feb 2021 10:03:07 +0800
$ emacs file.py

    p=1
    p= 2
    p = 3
    p =4

I sure wish TAB (indent-for-tab-command) would make up its mind about
which one of these is best, and not throw up its hands and not deal with
it at all. "Even if they are all valid."
Of course 1 and 3 are better, and 3 is best.
But there could be a variable to set, for users who like 1.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#46739; Package emacs. (Wed, 24 Feb 2021 02:18:01 GMT) Full text and rfc822 format available.

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

From: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
To: bug-gnu-emacs <at> gnu.org
Subject: Re: Python mode vs. whitespace
Date: Wed, 24 Feb 2021 10:16:44 +0800
OK, maybe I should just run my programs through
https://github.com/psf/black .




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#46739; Package emacs. (Wed, 24 Feb 2021 13:17:02 GMT) Full text and rfc822 format available.

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

From: Andrii Kolomoiets <andreyk.mad <at> gmail.com>
To: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
Cc: 46739 <at> debbugs.gnu.org
Subject: Re: bug#46739: Python mode vs. whitespace
Date: Wed, 24 Feb 2021 15:16:03 +0200
積丹尼 Dan Jacobson <jidanni <at> jidanni.org> writes:

> OK, maybe I should just run my programs through
> https://github.com/psf/black .

Also take a look at https://github.com/davidshepherd7/electric-operator




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#46739; Package emacs. (Wed, 24 Feb 2021 21:06:01 GMT) Full text and rfc822 format available.

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

From: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
To: Andrii Kolomoiets <andreyk.mad <at> gmail.com>
Cc: 46739 <at> debbugs.gnu.org
Subject: Re: bug#46739: Python mode vs. whitespace
Date: Thu, 25 Feb 2021 05:05:32 +0800
AK> Also take a look at https://github.com/davidshepherd7/electric-operator

Seems like a better approach. Maybe this bug I opened should be closed then.





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#46739; Package emacs. (Fri, 26 Feb 2021 01:01:02 GMT) Full text and rfc822 format available.

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

From: Stefan Kangas <stefan <at> marxist.se>
To: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
Cc: 46739 <at> debbugs.gnu.org
Subject: Re: bug#46739: Python mode vs. whitespace
Date: Thu, 25 Feb 2021 19:00:24 -0600
積丹尼 Dan Jacobson <jidanni <at> jidanni.org> writes:

> $ emacs file.py
>
>     p=1
>     p= 2
>     p = 3
>     p =4
>
> I sure wish TAB (indent-for-tab-command) would make up its mind about
> which one of these is best, and not throw up its hands and not deal with
> it at all. "Even if they are all valid."
> Of course 1 and 3 are better, and 3 is best.
> But there could be a variable to set, for users who like 1.

I don't think I understand.  What is the recipe for reproducing this
bug?  What do you see, and what do you expect to see?  Which version of
Emacs are you using?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#46739; Package emacs. (Fri, 26 Feb 2021 01:17:01 GMT) Full text and rfc822 format available.

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

From: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
To: Stefan Kangas <stefan <at> marxist.se>
Cc: 46739 <at> debbugs.gnu.org
Subject: Re: bug#46739: Python mode vs. whitespace
Date: Fri, 26 Feb 2021 09:15:57 +0800
I am just saying I edit a python file, do C-x h TAB, some things get
rearranged, but spaces if any around operators, is unaffected.
emacs-version "27.1"

SK> I don't think I understand.  What is the recipe for reproducing this
SK> bug?  What do you see, and what do you expect to see?  Which version of
SK> Emacs are you using?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#46739; Package emacs. (Fri, 26 Feb 2021 03:06:02 GMT) Full text and rfc822 format available.

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

From: Stefan Kangas <stefan <at> marxist.se>
To: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
Cc: 46739 <at> debbugs.gnu.org
Subject: Re: bug#46739: Python mode vs. whitespace
Date: Thu, 25 Feb 2021 19:04:52 -0800
積丹尼 Dan Jacobson <jidanni <at> jidanni.org> writes:

> I am just saying I edit a python file, do C-x h TAB, some things get
> rearranged, but spaces if any around operators, is unaffected.
> emacs-version "27.1"

So you are saying that `indent-for-tab-command' should also format
assignments?  I think that would be a bit unexpected, as the command is
specifically about indentation, and not intended for general code
formatting.




Reply sent to 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>:
You have taken responsibility. (Fri, 26 Feb 2021 03:20:01 GMT) Full text and rfc822 format available.

Notification sent to 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>:
bug acknowledged by developer. (Fri, 26 Feb 2021 03:20:02 GMT) Full text and rfc822 format available.

Message #28 received at 46739-done <at> debbugs.gnu.org (full text, mbox):

From: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
To: Stefan Kangas <stefan <at> marxist.se>
Cc: 46739-done <at> debbugs.gnu.org
Subject: Re: bug#46739: Python mode vs. whitespace
Date: Fri, 26 Feb 2021 11:19:31 +0800
>>>>> "SK" == Stefan Kangas <stefan <at> marxist.se> writes:
SK> So you are saying that `indent-for-tab-command' should also format
SK> assignments?  I think that would be a bit unexpected, as the command is
SK> specifically about indentation, and not intended for general code
SK> formatting.
OK. Sorry. Closing.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 26 Mar 2021 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 87 days ago.

Previous Next


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