GNU bug report logs - #71720
[PATCH] Do not prematurely truncate python eldoc string

Previous Next

Package: emacs;

Reported by: James Thomas <jimjoe <at> gmx.net>

Date: Sat, 22 Jun 2024 12:45:02 UTC

Severity: normal

Tags: patch

Done: Eli Zaretskii <eliz <at> gnu.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 71720 in the body.
You can then email your comments to 71720 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#71720; Package emacs. (Sat, 22 Jun 2024 12:45:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to James Thomas <jimjoe <at> gmx.net>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sat, 22 Jun 2024 12:45:02 GMT) Full text and rfc822 format available.

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

From: James Thomas <jimjoe <at> gmx.net>
To: bug-gnu-emacs <at> gnu.org
Subject: [PATCH] Do not prematurely truncate python eldoc string
Date: Sat, 22 Jun 2024 18:14:21 +0530
[Message part 1 (text/plain, inline)]
- emacs -Q
- C-x C-f test.py
- M-x run-python
- C-x o
- Type: print(

Only one line is shown, even with:

- M-x eldoc-doc-buffer.

[0001-Do-not-prematurely-truncate-python-eldoc-string.patch (text/x-patch, attachment)]
[Message part 3 (text/plain, inline)]
--

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#71720; Package emacs. (Sat, 22 Jun 2024 13:04:01 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: James Thomas <jimjoe <at> gmx.net>, kobarity <kobarity <at> gmail.com>
Cc: 71720 <at> debbugs.gnu.org
Subject: Re: bug#71720: [PATCH] Do not prematurely truncate python eldoc string
Date: Sat, 22 Jun 2024 16:03:06 +0300
> Date: Sat, 22 Jun 2024 18:14:21 +0530
> From:  James Thomas via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
> 
> - emacs -Q
> - C-x C-f test.py
> - M-x run-python
> - C-x o
> - Type: print(
> 
> Only one line is shown, even with:
> 
> - M-x eldoc-doc-buffer.
> 
> 
> From 9fb4b45ef2c408ff76d5e145ea3c38eac60b4d16 Mon Sep 17 00:00:00 2001
> From: James Thomas <jimjoe <at> gmx.net>
> Date: Sat, 22 Jun 2024 17:57:00 +0530
> Subject: [PATCH] Do not prematurely truncate python eldoc string
> 
> 'eldoc-echo-area-use-multiline-p' is there for that.
> * lisp/progmodes/python.el (python-eldoc-setup-code):
> Make the change.
> ---
>  lisp/progmodes/python.el | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
> index bb2bf1731b4..a52e21f625e 100644
> --- a/lisp/progmodes/python.el
> +++ b/lisp/progmodes/python.el
> @@ -5607,8 +5607,6 @@ python-eldoc-setup-code
>                  doc = '{objtype} {name}{args}'.format(
>                      objtype=objtype, name=name, args=args
>                  )
> -        else:
> -            doc = doc.splitlines()[0]
>      except:
>          doc = ''
>      return doc"
> --
> 2.43.0

kobarity, any comments?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#71720; Package emacs. (Sat, 22 Jun 2024 14:19:02 GMT) Full text and rfc822 format available.

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

From: kobarity <kobarity <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>, James Thomas <jimjoe <at> gmx.net>
Cc: 71720 <at> debbugs.gnu.org
Subject: Re: bug#71720: [PATCH] Do not prematurely truncate python eldoc string
Date: Sat, 22 Jun 2024 23:16:51 +0900
Eli Zaretskii wrote:
> 
> > Date: Sat, 22 Jun 2024 18:14:21 +0530
> > From:  James Thomas via "Bug reports for GNU Emacs,
> >  the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
> > 
> > - emacs -Q
> > - C-x C-f test.py
> > - M-x run-python
> > - C-x o
> > - Type: print(
> > 
> > Only one line is shown, even with:
> > 
> > - M-x eldoc-doc-buffer.
> > 
> > 
> > From 9fb4b45ef2c408ff76d5e145ea3c38eac60b4d16 Mon Sep 17 00:00:00 2001
> > From: James Thomas <jimjoe <at> gmx.net>
> > Date: Sat, 22 Jun 2024 17:57:00 +0530
> > Subject: [PATCH] Do not prematurely truncate python eldoc string
> > 
> > 'eldoc-echo-area-use-multiline-p' is there for that.
> > * lisp/progmodes/python.el (python-eldoc-setup-code):
> > Make the change.
> > ---
> >  lisp/progmodes/python.el | 2 --
> >  1 file changed, 2 deletions(-)
> > 
> > diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
> > index bb2bf1731b4..a52e21f625e 100644
> > --- a/lisp/progmodes/python.el
> > +++ b/lisp/progmodes/python.el
> > @@ -5607,8 +5607,6 @@ python-eldoc-setup-code
> >                  doc = '{objtype} {name}{args}'.format(
> >                      objtype=objtype, name=name, args=args
> >                  )
> > -        else:
> > -            doc = doc.splitlines()[0]
> >      except:
> >          doc = ''
> >      return doc"
> > --
> > 2.43.0
> 
> kobarity, any comments?

I agree with this fix.  For those who want the same behavior as
before, setting eldoc-echo-area-use-multiline-p to nil should be
sufficient.  It might be better to make this change known in etc/NEWS,
though.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#71720; Package emacs. (Sat, 22 Jun 2024 15:51:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: kobarity <kobarity <at> gmail.com>
Cc: 71720 <at> debbugs.gnu.org, jimjoe <at> gmx.net
Subject: Re: bug#71720: [PATCH] Do not prematurely truncate python eldoc string
Date: Sat, 22 Jun 2024 18:50:48 +0300
> Date: Sat, 22 Jun 2024 23:16:51 +0900
> From: kobarity <kobarity <at> gmail.com>
> Cc: 71720 <at> debbugs.gnu.org
> 
> Eli Zaretskii wrote:
> > 
> > kobarity, any comments?
> 
> I agree with this fix.  For those who want the same behavior as
> before, setting eldoc-echo-area-use-multiline-p to nil should be
> sufficient.  It might be better to make this change known in etc/NEWS,
> though.

Thanks.

James, can you add a NEWS entry and resubmit?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#71720; Package emacs. (Sat, 22 Jun 2024 21:13:02 GMT) Full text and rfc822 format available.

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

From: James Thomas <jimjoe <at> gmx.net>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: kobarity <kobarity <at> gmail.com>, 71720 <at> debbugs.gnu.org
Subject: Re: bug#71720: [PATCH] Do not prematurely truncate python eldoc string
Date: Sun, 23 Jun 2024 02:42:04 +0530
[Message part 1 (text/plain, inline)]
Eli Zaretskii wrote:

>> Date: Sat, 22 Jun 2024 23:16:51 +0900
>> From: kobarity <kobarity <at> gmail.com>
>> Cc: 71720 <at> debbugs.gnu.org
>>
>> Eli Zaretskii wrote:
>> >
>> > kobarity, any comments?
>>
>> I agree with this fix.  For those who want the same behavior as
>> before, setting eldoc-echo-area-use-multiline-p to nil should be
>> sufficient.  It might be better to make this change known in etc/NEWS,
>> though.
>
> Thanks.
>
> James, can you add a NEWS entry and resubmit?

How about this?

[0001-Do-not-prematurely-truncate-python-eldoc-string.patch (text/x-patch, attachment)]
[Message part 3 (text/plain, inline)]
--

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#71720; Package emacs. (Sun, 23 Jun 2024 00:50:02 GMT) Full text and rfc822 format available.

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

From: kobarity <kobarity <at> gmail.com>
To: James Thomas <jimjoe <at> gmx.net>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 71720 <at> debbugs.gnu.org
Subject: Re: bug#71720: [PATCH] Do not prematurely truncate python eldoc string
Date: Sun, 23 Jun 2024 09:47:58 +0900
James Thomas wrote:
> Eli Zaretskii wrote:
> 
> >> Date: Sat, 22 Jun 2024 23:16:51 +0900
> >> From: kobarity <kobarity <at> gmail.com>
> >> Cc: 71720 <at> debbugs.gnu.org
> >>
> >> Eli Zaretskii wrote:
> >> >
> >> > kobarity, any comments?
> >>
> >> I agree with this fix.  For those who want the same behavior as
> >> before, setting eldoc-echo-area-use-multiline-p to nil should be
> >> sufficient.  It might be better to make this change known in etc/NEWS,
> >> though.
> >
> > Thanks.
> >
> > James, can you add a NEWS entry and resubmit?
> 
> How about this?

> +*** 'eldoc' no longer truncates to a single line by default.
> +Previously, the entire docstring was not available to eldoc, which made
> +'eldoc-echo-area-use-multiline-p' ineffective. The old behaviour may be
> +kept by setting that.
> +

Thanks, I think the content is perfect, but from other examples, it
might be better to have two spaces after the period.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#71720; Package emacs. (Sun, 23 Jun 2024 03:03:02 GMT) Full text and rfc822 format available.

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

From: James Thomas <jimjoe <at> gmx.net>
To: kobarity <kobarity <at> gmail.com>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 71720 <at> debbugs.gnu.org
Subject: Re: bug#71720: [PATCH] Do not prematurely truncate python eldoc string
Date: Sun, 23 Jun 2024 08:32:19 +0530
[Message part 1 (text/plain, inline)]
kobarity wrote:

> James Thomas wrote:
>> Eli Zaretskii wrote:
>>
>> >> Date: Sat, 22 Jun 2024 23:16:51 +0900
>> >> From: kobarity <kobarity <at> gmail.com>
>> >> Cc: 71720 <at> debbugs.gnu.org
>> >>
>> >> Eli Zaretskii wrote:
>> >> >
>> >> > kobarity, any comments?
>> >>
>> >> I agree with this fix.  For those who want the same behavior as
>> >> before, setting eldoc-echo-area-use-multiline-p to nil should be
>> >> sufficient.  It might be better to make this change known in etc/NEWS,
>> >> though.
>> >
>> > Thanks.
>> >
>> > James, can you add a NEWS entry and resubmit?
>>
>> How about this?
>
>> +*** 'eldoc' no longer truncates to a single line by default.
>> +Previously, the entire docstring was not available to eldoc, which made
>> +'eldoc-echo-area-use-multiline-p' ineffective. The old behaviour may be
>> +kept by setting that.
>> +
>
> Thanks, I think the content is perfect, but from other examples, it
> might be better to have two spaces after the period.

Fixed:

[0001-Do-not-prematurely-truncate-python-eldoc-string.patch (text/x-patch, attachment)]
[Message part 3 (text/plain, inline)]
--

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#71720; Package emacs. (Sun, 23 Jun 2024 03:55:02 GMT) Full text and rfc822 format available.

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

From: kobarity <kobarity <at> gmail.com>
To: James Thomas <jimjoe <at> gmx.net>, Eli Zaretskii <eliz <at> gnu.org>
Cc: 71720 <at> debbugs.gnu.org
Subject: Re: bug#71720: [PATCH] Do not prematurely truncate python eldoc string
Date: Sun, 23 Jun 2024 12:53:04 +0900
James Thomas wrote:
> kobarity wrote:
> 
> > James Thomas wrote:
> >> Eli Zaretskii wrote:
> >>
> >> >> Date: Sat, 22 Jun 2024 23:16:51 +0900
> >> >> From: kobarity <kobarity <at> gmail.com>
> >> >> Cc: 71720 <at> debbugs.gnu.org
> >> >>
> >> >> Eli Zaretskii wrote:
> >> >> >
> >> >> > kobarity, any comments?
> >> >>
> >> >> I agree with this fix.  For those who want the same behavior as
> >> >> before, setting eldoc-echo-area-use-multiline-p to nil should be
> >> >> sufficient.  It might be better to make this change known in etc/NEWS,
> >> >> though.
> >> >
> >> > Thanks.
> >> >
> >> > James, can you add a NEWS entry and resubmit?
> >>
> >> How about this?
> >
> >> +*** 'eldoc' no longer truncates to a single line by default.
> >> +Previously, the entire docstring was not available to eldoc, which made
> >> +'eldoc-echo-area-use-multiline-p' ineffective. The old behaviour may be
> >> +kept by setting that.
> >> +
> >
> > Thanks, I think the content is perfect, but from other examples, it
> > might be better to have two spaces after the period.
> 
> Fixed:

Thanks, it looks good to me.




Reply sent to Eli Zaretskii <eliz <at> gnu.org>:
You have taken responsibility. (Thu, 27 Jun 2024 08:57:01 GMT) Full text and rfc822 format available.

Notification sent to James Thomas <jimjoe <at> gmx.net>:
bug acknowledged by developer. (Thu, 27 Jun 2024 08:57:01 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: James Thomas <jimjoe <at> gmx.net>
Cc: kobarity <at> gmail.com, 71720-done <at> debbugs.gnu.org
Subject: Re: bug#71720: [PATCH] Do not prematurely truncate python eldoc string
Date: Thu, 27 Jun 2024 11:56:31 +0300
> From: James Thomas <jimjoe <at> gmx.net>
> Cc: Eli Zaretskii <eliz <at> gnu.org>,  71720 <at> debbugs.gnu.org
> Date: Sun, 23 Jun 2024 08:32:19 +0530
> 
> kobarity wrote:
> 
> > James Thomas wrote:
> >> Eli Zaretskii wrote:
> >>
> >> >> Date: Sat, 22 Jun 2024 23:16:51 +0900
> >> >> From: kobarity <kobarity <at> gmail.com>
> >> >> Cc: 71720 <at> debbugs.gnu.org
> >> >>
> >> >> Eli Zaretskii wrote:
> >> >> >
> >> >> > kobarity, any comments?
> >> >>
> >> >> I agree with this fix.  For those who want the same behavior as
> >> >> before, setting eldoc-echo-area-use-multiline-p to nil should be
> >> >> sufficient.  It might be better to make this change known in etc/NEWS,
> >> >> though.
> >> >
> >> > Thanks.
> >> >
> >> > James, can you add a NEWS entry and resubmit?
> >>
> >> How about this?
> >
> >> +*** 'eldoc' no longer truncates to a single line by default.
> >> +Previously, the entire docstring was not available to eldoc, which made
> >> +'eldoc-echo-area-use-multiline-p' ineffective. The old behaviour may be
> >> +kept by setting that.
> >> +
> >
> > Thanks, I think the content is perfect, but from other examples, it
> > might be better to have two spaces after the period.
> 
> Fixed:

Thanks, installed on the emacs-30 branch, and closing the bug.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 25 Jul 2024 11:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 57 days ago.

Previous Next


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