From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: James Thomas via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#71314: [PATCH] info-lookup-symbol does not work in python-mode Date: Sun, 02 Jun 2024 16:40:15 +0530 Message-ID: <861q5f38iw.fsf@gmx.net> References: <86h6ecjhoj.fsf@outlook.com> <868qzonehp.fsf@gnu.org> Reply-To: James Thomas Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="28722"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: larsi@gnus.org, 71314@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jun 02 13:11:05 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1sDj7A-0007Ek-SI for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 02 Jun 2024 13:11:04 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sDj6x-0005hr-Se; Sun, 02 Jun 2024 07:10:51 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sDj6w-0005hf-1h for bug-gnu-emacs@gnu.org; Sun, 02 Jun 2024 07:10:50 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sDj6v-0004BB-II for bug-gnu-emacs@gnu.org; Sun, 02 Jun 2024 07:10:49 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sDj77-0003Oj-Na for bug-gnu-emacs@gnu.org; Sun, 02 Jun 2024 07:11:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: James Thomas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 02 Jun 2024 11:11:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 71314 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 71314-submit@debbugs.gnu.org id=B71314.171732664413031 (code B ref 71314); Sun, 02 Jun 2024 11:11:01 +0000 Original-Received: (at 71314) by debbugs.gnu.org; 2 Jun 2024 11:10:44 +0000 Original-Received: from localhost ([127.0.0.1]:57970 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sDj6q-0003O6-AL for submit@debbugs.gnu.org; Sun, 02 Jun 2024 07:10:44 -0400 Original-Received: from mout.gmx.net ([212.227.17.20]:42123) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sDj6n-0003Nt-H2 for 71314@debbugs.gnu.org; Sun, 02 Jun 2024 07:10:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.net; s=s31663417; t=1717326623; x=1717931423; i=jimjoe@gmx.net; bh=9RGmVJe+aNOuidmOm71vUt2rCbN5H/0Dm9gN5g/w4bM=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date: Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding:cc: content-transfer-encoding:content-type:date:from:message-id: mime-version:reply-to:subject:to; b=PxeIgwqbI/yMwmq5gdpmsG4N7/t8eViTkwzja/p2Jdr52w1LORr3A5eAUkqHjETI sWoNaNhhkousvIXIoYjflSpP01M3BZlRGTay+32O432e0u0TgfWRc2YBR/xP+2M15 K/NSZFgxQ2QO0QWgXx7M2r2Dvlr1PdiV0n6g2IsXUk16AmdkD3eC84R/GjMxNZfRK 1di+KGik+ARXiIrzBjaRFFq9SAL4eHbg7nQtYVba9Lm9X2iACuDfCZI34k/5F50Xn iI5AcpEbSI/KJtVV3SnGRFeJlOzHrZUg6w36d/PktCaHftyI/FnFRQqqpxSeBzIwP d88JX+EE5NV3WZohLQ== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Original-Received: from user-Inspiron-3493 ([59.92.166.156]) by mail.gmx.net (mrgmx104 [212.227.17.174]) with ESMTPSA (Nemesis) id 1Mnpnm-1sppsS03Ra-00oTfe; Sun, 02 Jun 2024 13:10:22 +0200 In-Reply-To: <868qzonehp.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 02 Jun 2024 07:41:06 +0300") X-Provags-ID: V03:K1:nPk6FMeqeyvdZoG8BLZPK4VESnw0TN6EMO6H/lRnaau+KXcHSdv KIEXZjTFs3GgOnC2G5mFt1UElfjOePHNZggLEKMYS1guvlp+Hk1CAneUWFieG7JCYTQB9bl xk73h+XHWmuiAdrxHsYIzb63dD54qR/DB4yQNvSGT7/sqbpOlXhLe4XVunPizanmIs2M8f3 Jgeg4asRbtMsl9RLOvnJA== UI-OutboundReport: notjunk:1;M01:P0:XZFW06y1JmQ=;FcOs6RT0aC6reDpxCo2GyUtM5Z6 7bOpyKEBh9PO/T66+XIPiHkL0+gEr0RGDUz30M719Om26Ym5AFYFwInOcDlJPmdjAMuWBy5bJ 7HmVKhcm7/CWDns2im3aIAiMVBBC8+urWDwSNNMCeDISwdpKjTnW5ttdiYUzuX32MYu7Rle2b invGeyjy0zQs1iU6ojyyTHD0kf2BHA8Y8oGanP0njptKmSP1PC5+LIqxoJrZW0J1KAfzSyYlT g17EkUhPFNbcRcnaThKeFAzaqFiJDLqiHodIH0o1ISCLZK70idHUrfNHbMorydzmOYsuWEMJc WzFQ8wemQZPAZIBVI67ZVMKbG7iJXTB9y/PUe3r/1NjGoR21dHW0othkV4YOFPXlT19cYp6yT b+ku6eThpuxqyNFmE1nyLibLLb1A9gQl0clTO+AeLdrZxDXEtGNsNlM2paUUpL8qZkTF9Vwd2 3h6WEv4dxB/xaWVb7AgjB/e1mMatLUhSAiky/9aE78F7rlUUbr6QrDjsTt1g27ovxHi0rh/es sBr3KNeJ9Ohjs3CKcg+UGp92LDliyc3XWxgOdInWski6rzDaY9d6c1GteA0jm86GnPciIRGF2 XJ7W6sJDHcOJZ9r77ksqcv6H6EsSDkFttOhcgGaj1uHv5edNAveBdMGie8FMPL5czVr1lbM64 LIS6YYv/BMn5mfMep10s9NqTxLrmwpJst+I7dqt5HGsiyw9TifToY0HTTVuqjDnneL2I26nT1 B7sL6dfc4bnYaXKvm9dPaptkLB0LHcSw3TrX85NKEVAz/BNFXCi5uPFdwy5fsx5f2xv2iyzZ X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:286383 Archived-At: 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" >> >> - Make sure python info docs are installed (in Debian-derivatives, 'sud= o >> 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) =2D-