GNU bug report logs - #71314
[PATCH] info-lookup-symbol does not work in python-mode

Previous Next

Package: emacs;

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

Date: Sun, 2 Jun 2024 00:47: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 71314 in the body.
You can then email your comments to 71314 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 larsi <at> gnus.org, bug-gnu-emacs <at> gnu.org:
bug#71314; Package emacs. (Sun, 02 Jun 2024 00:47: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 larsi <at> gnus.org, bug-gnu-emacs <at> gnu.org. (Sun, 02 Jun 2024 00:47: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] info-lookup-symbol does not work in python-mode
Date: Sun, 02 Jun 2024 06:15:48 +0530
[Message part 1 (text/plain, inline)]
- Make sure python info docs are installed (in Debian-derivatives, 'sudo
  apt install python3-doc')
- emacs -Q
- Open a buffer test.py and type: print
- C-h S fails, even after typing RET, but...

- Then do info-lookup-reset, and the previous step works.

Here's a possible patch, which hasn't been tested as much as needed:

[0001-Check-for-doc-spec-function-early--in-interactive.patch (text/x-patch, attachment)]
[Message part 3 (text/plain, inline)]
--

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

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: James Thomas <jimjoe <at> gmx.net>
Cc: larsi <at> gnus.org, 71314 <at> debbugs.gnu.org
Subject: Re: bug#71314: [PATCH] info-lookup-symbol does not work in python-mode
Date: Sun, 02 Jun 2024 07:41:06 +0300
> Cc: larsi <at> gnus.org
> Date: Sun, 02 Jun 2024 06:15:48 +0530
> From:  James Thomas via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
> 
> - Make sure python info docs are installed (in Debian-derivatives, 'sudo
>   apt install python3-doc')
> - emacs -Q
> - Open a buffer test.py and type: print
> - C-h S fails, even after typing RET, but...
> 
> - Then do info-lookup-reset, and the previous step works.
> 
> Here's a possible patch, which hasn't been tested as much as needed:

Thanks, but can you also explain why the original recipe fails, and
the main idea of the fix?




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

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

From: James Thomas <jimjoe <at> gmx.net>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: larsi <at> gnus.org, 71314 <at> debbugs.gnu.org
Subject: Re: bug#71314: [PATCH] info-lookup-symbol does not work in python-mode
Date: Sun, 02 Jun 2024 16:40:15 +0530
Eli Zaretskii wrote:

>> Cc: larsi <at> gnus.org
>> Date: Sun, 02 Jun 2024 06:15:48 +0530
>> From:  James Thomas via "Bug reports for GNU Emacs,
>>  the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
>>
>> - Make sure python info docs are installed (in Debian-derivatives, 'sudo
>>   apt install python3-doc')
>> - emacs -Q
>> - Open a buffer test.py and type: print
>> - C-h S fails, even after typing RET, but...
>>
>> - Then do info-lookup-reset, and the previous step works.
>>
>> Here's a possible patch, which hasn't been tested as much as needed:
>
> Thanks, but can you also explain why the original recipe fails, and
> the main idea of the fix?

The problem seems to be that info-lookup-interactive-arguments sets the
cache as 'initialized' for the mode (python-mode, in this case) without
accounting for the new case of :doc-spec-function (which needs
info-lookup--expand-info to be run), so that subsequent calls don't
bother running info-lookup-setup-mode again. It could later work, for
e.g., when the initialization was marked 'undone' by calling
info-lookup-reset as I'd said above, because by that time the --expand
had been already run.

(I didn't include this explanation earlier as I'd considered the fix a
kind of POC)

--




Reply sent to Eli Zaretskii <eliz <at> gnu.org>:
You have taken responsibility. (Sat, 08 Jun 2024 12:26:02 GMT) Full text and rfc822 format available.

Notification sent to James Thomas <jimjoe <at> gmx.net>:
bug acknowledged by developer. (Sat, 08 Jun 2024 12:26:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: James Thomas <jimjoe <at> gmx.net>
Cc: 71314-done <at> debbugs.gnu.org, larsi <at> gnus.org
Subject: Re: bug#71314: [PATCH] info-lookup-symbol does not work in python-mode
Date: Sat, 08 Jun 2024 15:24:43 +0300
> Cc: larsi <at> gnus.org
> Date: Sun, 02 Jun 2024 06:15:48 +0530
> From:  James Thomas via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
> 
> - Make sure python info docs are installed (in Debian-derivatives, 'sudo
>   apt install python3-doc')
> - emacs -Q
> - Open a buffer test.py and type: print
> - C-h S fails, even after typing RET, but...
> 
> - Then do info-lookup-reset, and the previous step works.
> 
> Here's a possible patch, which hasn't been tested as much as needed:

Thanks, installed on master, and closing the bug.




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

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

Previous Next


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