GNU bug report logs - #75486
[PATCH] Python: disable some unconditional messaging

Previous Next

Package: emacs;

Reported by: Vitaliy Chepelev <vitalij <at> gmx.com>

Date: Sat, 11 Jan 2025 06:38:01 UTC

Severity: minor

Tags: notabug, patch

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


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

From: kobarity <kobarity <at> gmail.com>
To: Vitaliy Chepelev <vitalij <at> gmx.com>, Eli Zaretskii <eliz <at> gnu.org>
Cc: 75486 <at> debbugs.gnu.org
Subject: Re: bug#75486: [PATCH] Python: disable some unconditional messaging
Date: Sun, 26 Jan 2025 23:31:22 +0900
Vitaliy Chepelev wrote:
> 
> This messaging should be disabled by default or at least with flag to
>  disable this. Everyone use own eyes to see where they indent. looking
>  to bottom everytime is excessive work.
> 
> kobarity <kobarity <at> gmail.com> writes:
> 
> > Eli Zaretskii wrote:
> >>
> >> > Date: Sat, 11 Jan 2025 06:36:15 -0000
> >> > From:  Vitaliy Chepelev via "Bug reports for GNU Emacs,
> >> >  the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
> >> >
> >> > Severity: minor
> >> >
> >> > This code disable function that used in one place and just do
> >> >  unconditional messaging about a indented block, I don't know for what.
> >> >  I guess, it was used for debuging
> >> >  python-info-dedenter-opening-block-position. This functions just call
> >> >  one function and message a result. Messaging happen when TAB key pressed
> >> >  as a part of python-indent-line-function.  I use master head to create
> >> >  this patch.
> >>
> >> Thanks.  kobarity, any comments about the usefulness of this function?
> >> The code looks like it's there on purpose, not for debugging, but I
> >> don't use python.el.
> >
> > Yes, I think it's working as expected.  Try the following example.
> >
> > #+begin_src python
> > if a == 1:
> >     if b == 2:
> >         if c == 3:
> >             pass
> >         else:
> > #+end_src
> >
> > If you enter the last "else:", Emacs displays "Closes if c == 3:".
> > This means that this "else:" corresponds to the "if c == 3:".
> >
> > You can change the indentation by hitting the TAB key several times on
> > the else line.  Each time you do this, Emacs will display the
> > corresponding if statement.
> >
> > For example, Emacs displays "Closes if b == 2:" when the "else:" is
> > indented as follows:
> >
> > #+begin_src python
> > if a == 1:
> >     if b == 2:
> >         if c == 3:
> >             pass
> >     else:
> > #+end_src
> >
> > Of course, in this case it is easy to find the corresponding if
> > statement.  However, in practice, many lines can go in between the if
> > statements and disappear from the screen.  This feature would be
> > useful in such cases.

I think it's good to CC to debbugs.

If it is so hard to see the bottom and you don't need that
information, then it would be easy to ignore it.

If it still bothers you, how about disabling it by putting the
following code to init.el?

(advice-add 'python-info-dedenter-opening-block-message :override (lambda ()))




This bug report was last modified 116 days ago.

Previous Next


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