From: James Thomas via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: 71314@debbugs.gnu.org
Cc: larsi@gnus.org
Subject: bug#71314: [PATCH] info-lookup-symbol does not work in python-mode
Date: Sun, 02 Jun 2024 06:15:48 +0530 [thread overview]
Message-ID: <86h6ecjhoj.fsf@outlook.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 327 bytes --]
- 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:
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: [PATCH] Check for doc-spec-function early, in interactive --]
[-- Type: text/x-patch, Size: 1782 bytes --]
From 81b3a7b0c2be3c974729d1a4ffc44351d5393a45 Mon Sep 17 00:00:00 2001
From: James Thomas <jimjoe@gmx.net>
Date: Sun, 2 Jun 2024 05:59:35 +0530
Subject: [PATCH] Check for doc-spec-function early, in interactive
* lisp/info-look.el (info-lookup-interactive-arguments):
Move here.
(info-lookup): From here.
---
lisp/info-look.el | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/lisp/info-look.el b/lisp/info-look.el
index cd59fdf17d7..2baf133c7d3 100644
--- a/lisp/info-look.el
+++ b/lisp/info-look.el
@@ -327,8 +327,11 @@ info-lookup-interactive-arguments
If optional argument QUERY is non-nil, query for the help mode."
(let* ((mode (cond (query
(info-lookup-change-mode topic))
- ((info-lookup->mode-value topic (info-lookup-select-mode))
- info-lookup-mode)
+ ((when-let
+ ((info (info-lookup->mode-value
+ topic (info-lookup-select-mode))))
+ (info-lookup--expand-info info))
+ info-lookup-mode)
((info-lookup-change-mode topic))))
(completions (info-lookup->completions topic mode))
(default (info-lookup-guess-default topic mode))
@@ -404,9 +407,6 @@ info-lookup
different window."
(or mode (setq mode (info-lookup-select-mode)))
(setq mode (info-lookup--item-to-mode item mode))
- (if-let ((info (info-lookup->mode-value topic mode)))
- (info-lookup--expand-info info)
- (error "No %s help available for `%s'" topic mode))
(let* ((completions (info-lookup->completions topic mode))
(ignore-case (info-lookup->ignore-case topic mode))
(entry (or (assoc (if ignore-case (downcase item) item) completions)
--
2.40.1
[-- Attachment #3: Type: text/plain, Size: 4 bytes --]
--
next reply other threads:[~2024-06-02 0:45 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-02 0:45 James Thomas via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2024-06-02 4:41 ` bug#71314: [PATCH] info-lookup-symbol does not work in python-mode Eli Zaretskii
2024-06-02 11:10 ` James Thomas via Bug reports for GNU Emacs, the Swiss army knife of text editors
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=86h6ecjhoj.fsf@outlook.com \
--to=bug-gnu-emacs@gnu.org \
--cc=71314@debbugs.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).