bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#31405: 25.3; Python.el doesn't provide infos to info-lookup-symbol


From: Basil L. Contovounesios
Subject: bug#31405: 25.3; Python.el doesn't provide infos to info-lookup-symbol
Date: Thu, 12 Aug 2021 16:13:34 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Lars Ingebrigtsen <larsi@gnus.org> writes:

> Stefan Kangas <stefan@marxist.se> writes:
>
>> Sphinx is used to generate Python docs AFAIK, and it supports info
>> format output.  There is also the MELPA package python-info which is
>> "a simple Emacs package to provide an info manual for Python":
>>
>> https://github.com/wilfred/python-info
>>
>> Perhaps we should support that use case in vanilla Emacs?  One can
>> always hope that more GNU/Linux distributions takes the hint and
>> starts generating and shipping the info files for Python.  (And that
>> interested users files bugs with their respective GNU/Linux
>> distribution, Homebrew for OSX, etc. if they don't already do that.)
>
> The Melpa package doesn't seem to exist any more?  So I'm guessing there
> isn't much demand for an Info manual for Python, so adding support for
> it in info-look would just be frustrating the users, I think.
>
> On the other hand, you have a point that if Emacs did provide hooks into
> Info, then perhaps it'd entice people to start distributing .info
> files...

FWIW, Debian packages the latest Python Info manual as python3-doc.

> Hm...
>
> Oh!  I was looking in melpa-stable -- python-info is indeed in melpa.

Yes, but at first glance it seems to be specific to Python 2 and hasn't
been updated in 6 years.

> OK, I've now added support for python-mode in info-lookup-symbol, and
> seems to work in my one test, which was looking up "date", which took me
> to:
>
>  -- Class: datetime.date (year, month, day)
>
>      All arguments are required.  Arguments may be ints or longs, in the
>      following ranges:
>
> Which seems correct.  People who actually use Python should probably
> change 
>
> (info-lookup-maybe-add-help
>  :mode 'python-mode
>  :doc-spec '(("(python)Index")))
>
> to something that filters/matches more accurately, perhaps.

In my case I have to override it as

  (with-eval-after-load 'info-look
    (info-lookup-add-help
     :mode 'python-mode
     :doc-spec '(("(python3.9)Index"))))

to match the name and version of the manual installed by Debian.

Thanks,

-- 
Basil





reply via email to

[Prev in Thread] Current Thread [Next in Thread]