unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#46739: Python mode vs. whitespace
@ 2021-02-24  2:03 積丹尼 Dan Jacobson
  2021-02-24  2:16 ` 積丹尼 Dan Jacobson
  2021-02-26  1:00 ` Stefan Kangas
  0 siblings, 2 replies; 8+ messages in thread
From: 積丹尼 Dan Jacobson @ 2021-02-24  2:03 UTC (permalink / raw)
  To: 46739

$ 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.





^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#46739: Python mode vs. whitespace
  2021-02-24  2:03 bug#46739: Python mode vs. whitespace 積丹尼 Dan Jacobson
@ 2021-02-24  2:16 ` 積丹尼 Dan Jacobson
  2021-02-24 13:16   ` Andrii Kolomoiets
  2021-02-26  1:00 ` Stefan Kangas
  1 sibling, 1 reply; 8+ messages in thread
From: 積丹尼 Dan Jacobson @ 2021-02-24  2:16 UTC (permalink / raw)
  To: 46739

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





^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#46739: Python mode vs. whitespace
  2021-02-24  2:16 ` 積丹尼 Dan Jacobson
@ 2021-02-24 13:16   ` Andrii Kolomoiets
  2021-02-24 21:05     ` 積丹尼 Dan Jacobson
  0 siblings, 1 reply; 8+ messages in thread
From: Andrii Kolomoiets @ 2021-02-24 13:16 UTC (permalink / raw)
  To: 積丹尼 Dan Jacobson; +Cc: 46739

積丹尼 Dan Jacobson <jidanni@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





^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#46739: Python mode vs. whitespace
  2021-02-24 13:16   ` Andrii Kolomoiets
@ 2021-02-24 21:05     ` 積丹尼 Dan Jacobson
  0 siblings, 0 replies; 8+ messages in thread
From: 積丹尼 Dan Jacobson @ 2021-02-24 21:05 UTC (permalink / raw)
  To: Andrii Kolomoiets; +Cc: 46739

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.






^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#46739: Python mode vs. whitespace
  2021-02-24  2:03 bug#46739: Python mode vs. whitespace 積丹尼 Dan Jacobson
  2021-02-24  2:16 ` 積丹尼 Dan Jacobson
@ 2021-02-26  1:00 ` Stefan Kangas
  2021-02-26  1:15   ` 積丹尼 Dan Jacobson
  1 sibling, 1 reply; 8+ messages in thread
From: Stefan Kangas @ 2021-02-26  1:00 UTC (permalink / raw)
  To: 積丹尼 Dan Jacobson; +Cc: 46739

積丹尼 Dan Jacobson <jidanni@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?





^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#46739: Python mode vs. whitespace
  2021-02-26  1:00 ` Stefan Kangas
@ 2021-02-26  1:15   ` 積丹尼 Dan Jacobson
  2021-02-26  3:04     ` Stefan Kangas
  0 siblings, 1 reply; 8+ messages in thread
From: 積丹尼 Dan Jacobson @ 2021-02-26  1:15 UTC (permalink / raw)
  To: Stefan Kangas; +Cc: 46739

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?





^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#46739: Python mode vs. whitespace
  2021-02-26  1:15   ` 積丹尼 Dan Jacobson
@ 2021-02-26  3:04     ` Stefan Kangas
  2021-02-26  3:19       ` 積丹尼 Dan Jacobson
  0 siblings, 1 reply; 8+ messages in thread
From: Stefan Kangas @ 2021-02-26  3:04 UTC (permalink / raw)
  To: 積丹尼 Dan Jacobson; +Cc: 46739

積丹尼 Dan Jacobson <jidanni@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.





^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#46739: Python mode vs. whitespace
  2021-02-26  3:04     ` Stefan Kangas
@ 2021-02-26  3:19       ` 積丹尼 Dan Jacobson
  0 siblings, 0 replies; 8+ messages in thread
From: 積丹尼 Dan Jacobson @ 2021-02-26  3:19 UTC (permalink / raw)
  To: Stefan Kangas; +Cc: 46739-done

>>>>> "SK" == Stefan Kangas <stefan@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.





^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2021-02-26  3:19 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-24  2:03 bug#46739: Python mode vs. whitespace 積丹尼 Dan Jacobson
2021-02-24  2:16 ` 積丹尼 Dan Jacobson
2021-02-24 13:16   ` Andrii Kolomoiets
2021-02-24 21:05     ` 積丹尼 Dan Jacobson
2021-02-26  1:00 ` Stefan Kangas
2021-02-26  1:15   ` 積丹尼 Dan Jacobson
2021-02-26  3:04     ` Stefan Kangas
2021-02-26  3:19       ` 積丹尼 Dan Jacobson

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).