emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] emacs-26 b33808c: Give more helpful messages for python co


From: Noam Postavsky
Subject: [Emacs-diffs] emacs-26 b33808c: Give more helpful messages for python completion setup failures
Date: Mon, 2 Oct 2017 23:27:10 -0400 (EDT)

branch: emacs-26
commit b33808ce77ef15c1f233790a2c93d9db4cc588ab
Author: Noam Postavsky <address@hidden>
Commit: Noam Postavsky <address@hidden>

    Give more helpful messages for python completion setup failures
    
    * lisp/progmodes/python.el (python-shell-completion-native-setup): In
    case the completion setup failed with some exception, print out the
    exception type and message.  If libedit is detected, raise an
    exception, since this is known to fail.
---
 lisp/progmodes/python.el | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
index 365191c..9aa5134 100644
--- a/lisp/progmodes/python.el
+++ b/lisp/progmodes/python.el
@@ -3442,6 +3442,8 @@ def __PYTHON_EL_native_completion_setup():
                 instance.rlcomplete = new_completer
 
         if readline.__doc__ and 'libedit' in readline.__doc__:
+            raise Exception('''libedit based readline is known not to work,
+      see etc/PROBLEMS under \"In Inferior Python mode, input is echoed\".''')
             readline.parse_and_bind('bind ^I rl_complete')
         else:
             readline.parse_and_bind('tab: complete')
@@ -3450,7 +3452,9 @@ def __PYTHON_EL_native_completion_setup():
 
         print ('python.el: native completion setup loaded')
     except:
-        print ('python.el: native completion setup failed')
+        import sys
+        print ('python.el: native completion setup failed, %s: %s'
+               % sys.exc_info()[:2])
 
 __PYTHON_EL_native_completion_setup()" process)
       (when (and



reply via email to

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