From: Gustaf Waldemarson <gustaf.waldemarson@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 62696@debbugs.gnu.org, kobarity <kobarity@gmail.com>,
npostavs@users.sourceforge.net, gastove@gmail.com,
dgutov@yandex.ru
Subject: bug#62696: python.el: Extra indentation for conditionals
Date: Thu, 20 Apr 2023 15:40:04 +0200 [thread overview]
Message-ID: <CABehr5fVqRiwPycAsXbyh3+zLdD7aCXmGru9A56oWy=ENO72Lw@mail.gmail.com> (raw)
In-Reply-To: <83zg7355f8.fsf@gnu.org>
[-- Attachment #1: Type: text/plain, Size: 3084 bytes --]
Apologies, I think Kobarity was waiting for a response from me and
thus held these up:
> 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?
It mostly looks good to me, but perhaps it would make sense to still output
the closing paren on the same line as the first example? I suppose it might
not make sense from a style-perspective, but I guess someone reading through
this mostly care about comparing indentation depths
> 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?
I believe that's the case, but I would wait for a response from Kobarity
following this.
Best regards,
Gustaf
Den tors 20 apr. 2023 kl 10:22 skrev Eli Zaretskii <eliz@gnu.org>:
> > 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.
>
[-- Attachment #2: Type: text/html, Size: 4431 bytes --]
next prev parent reply other threads:[~2023-04-20 13:40 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
2023-04-20 13:40 ` Gustaf Waldemarson [this message]
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='CABehr5fVqRiwPycAsXbyh3+zLdD7aCXmGru9A56oWy=ENO72Lw@mail.gmail.com' \
--to=gustaf.waldemarson@gmail.com \
--cc=62696@debbugs.gnu.org \
--cc=dgutov@yandex.ru \
--cc=eliz@gnu.org \
--cc=gastove@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).