unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: kobarity <kobarity@gmail.com>
Cc: 62696@debbugs.gnu.org, npostavs@users.sourceforge.net,
	gustaf.waldemarson@gmail.com, gastove@gmail.com,
	dgutov@yandex.ru
Subject: bug#62696: python.el: Extra indentation for conditionals
Date: Thu, 20 Apr 2023 11:22:35 +0300	[thread overview]
Message-ID: <83zg7355f8.fsf@gnu.org> (raw)
In-Reply-To: <eke7edohjml4.wl-kobarity@gmail.com> (message from kobarity on Tue, 18 Apr 2023 23:23:35 +0900)

> Cc: 62696@debbugs.gnu.org, Dmitry Gutov <dgutov@yandex.ru>,
>  Ross Donaldson <gastove@gmail.com>,
>  Noam Postavsky <npostavs@users.sourceforge.net>
> Date: Tue, 18 Apr 2023 23:23:35 +0900
> From: kobarity <kobarity@gmail.com>
> 
> Gustaf Waldemarson wrote:
> > I think that's a really good idea actually. It might also be a good idea to add a
> > negative example (i.e., the black-indentation style you mentioned earlier), or
> > a reference to one (maybe to the tests?)
> 
> I think the best way is to update the docstring of
> `python-indent-def-block-scale'.  So, I am also CC'ing this mail to
> the members of Bug#28475, where `python-indent-def-block-scale' was
> introduced.
> 
> I made a separate patch to update the docstring of
> `python-indent-def-block-scale'.  I think the name
> `python-indent-def-block-scale' itself is a bit misleading, but I have
> left it as is for compatibility.  The following is my proposal of the
> docstring.  What do you think?
> 
> "Multiplier applied to indentation inside multi-line blocks.
> The indentation in parens in the block header will be the current
> indentation plus `python-indent-offset' multiplied by this
> variable.  For example, the arguments are indented as follows if
> this variable is 1:
> 
>     def do_something(
>         arg1,
>         arg2
>     ):
>         print('hello')
> 
> if this variable is 2 (default):
> 
>     def do_something(
>             arg1,
>             arg2):
>         print('hello')
> 
> This variable has an effect on all blocks, not just def block.
> This variable only works if the opening paren is not followed by
> non-whitespace characters on the same line.  Modify
> `python-indent-block-paren-deeper' to customize the case where
> non-whitespace characters follow the opening paren on the same
> line."

Do these two patches replace every other patch posted in this
discussion?

Are these two patches ready to be installed, or are you still
discussing the issue?

Thanks.





  reply	other threads:[~2023-04-20  8:22 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-06 12:47 bug#62696: python.el: Extra indentation for conditionals Gustaf Waldemarson
2023-04-09 12:11 ` kobarity
2023-04-10 11:11   ` Gustaf Waldemarson
2023-04-10 15:21     ` kobarity
2023-04-11 11:11       ` Gustaf Waldemarson
2023-04-12 15:26         ` kobarity
2023-04-16 13:24           ` kobarity
2023-04-16 15:49             ` Gustaf Waldemarson
2023-04-18 14:23               ` kobarity
2023-04-20  8:22                 ` Eli Zaretskii [this message]
2023-04-20 13:40                   ` Gustaf Waldemarson
2023-04-20 14:19                     ` kobarity
2023-04-20 17:44                       ` Gustaf Waldemarson
2023-04-22  9:33                       ` Eli Zaretskii

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=83zg7355f8.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=62696@debbugs.gnu.org \
    --cc=dgutov@yandex.ru \
    --cc=gastove@gmail.com \
    --cc=gustaf.waldemarson@gmail.com \
    --cc=kobarity@gmail.com \
    --cc=npostavs@users.sourceforge.net \
    /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).