unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: James Thomas via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: larsi@gnus.org, 71314@debbugs.gnu.org
Subject: bug#71314: [PATCH] info-lookup-symbol does not work in python-mode
Date: Sun, 02 Jun 2024 16:40:15 +0530	[thread overview]
Message-ID: <861q5f38iw.fsf@gmx.net> (raw)
In-Reply-To: <868qzonehp.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 02 Jun 2024 07:41:06 +0300")

Eli Zaretskii wrote:

>> Cc: larsi@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@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	other threads:[~2024-06-02 11:10 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-02  0:45 bug#71314: [PATCH] info-lookup-symbol does not work in python-mode James Thomas via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-06-02  4:41 ` Eli Zaretskii
2024-06-02 11:10   ` James Thomas via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2024-06-08 12:24 ` 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=861q5f38iw.fsf@gmx.net \
    --to=bug-gnu-emacs@gnu.org \
    --cc=71314@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=jimjoe@gmx.net \
    --cc=larsi@gnus.org \
    /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).