GNU bug report logs - #23609
25.0.92; Python eldoc freeze

Previous Next

Package: emacs;

Reported by: Jules Tamagnan <jtamagnan <at> gmail.com>

Date: Tue, 24 May 2016 15:36:01 UTC

Severity: normal

Found in version 25.0.92

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


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

From: Jules Tamagnan <jtamagnan <at> gmail.com>
To: Dmitry Gutov <dgutov <at> yandex.ru>
Cc: 23609 <at> debbugs.gnu.org
Subject: Re: bug#23609: 25.0.92; Python eldoc freeze
Date: Fri, 27 May 2016 14:57:33 -0400
Dmitry Gutov <dgutov <at> yandex.ru> writes:

> On 05/27/2016 09:39 PM, Jules Tamagnan wrote:
>
>> What do you mean by private?
>
> It's when a variable or a function has "--" in its name. This
> functions purely as a documentation that external code should not rely
> on it (or refer to it, really).
>
> E.g. python-eldoc--get-doc.

Oh yes, well here it is with the different naming convention:

diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
index 5aeefe4..2da72fd 100644
--- a/lisp/progmodes/python.el
+++ b/lisp/progmodes/python.el
@@ -4293,12 +4293,18 @@ python-eldoc--get-doc-at-point
         (unless (zerop (length docstring))
           docstring)))))
 
+(defvar-local python-eldoc--get-doc t
+  "If eldoc should be used to get the documentation automatically")
+
 (defun python-eldoc-function ()
   "`eldoc-documentation-function' for Python.
 For this to work as best as possible you should call
 `python-shell-send-buffer' from time to time so context in
 inferior Python process is updated properly."
-  (python-eldoc--get-doc-at-point))
+  (when python-eldoc--get-doc
+    (with-timeout (1
+                   (setq python-eldoc--get-doc nil))
+      (python-eldoc--get-doc-at-point))))
 
 (defun python-eldoc-at-point (symbol)
   "Get help on SYMBOL using `help'.




This bug report was last modified 8 years and 351 days ago.

Previous Next


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