From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jules Tamagnan Newsgroups: gmane.emacs.bugs Subject: bug#23609: 25.0.92; Python eldoc freeze Date: Tue, 24 May 2016 11:34:21 -0400 Message-ID: <867fejo4g2.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1464104445 23898 80.91.229.3 (24 May 2016 15:40:45 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 24 May 2016 15:40:45 +0000 (UTC) To: 23609@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue May 24 17:40:33 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1b5ERd-0007Xe-5Y for geb-bug-gnu-emacs@m.gmane.org; Tue, 24 May 2016 17:40:33 +0200 Original-Received: from localhost ([::1]:54036 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b5ERc-0005wh-F3 for geb-bug-gnu-emacs@m.gmane.org; Tue, 24 May 2016 11:40:32 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43125) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b5ENK-0002AY-Nc for bug-gnu-emacs@gnu.org; Tue, 24 May 2016 11:36:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b5ENG-0007X3-DP for bug-gnu-emacs@gnu.org; Tue, 24 May 2016 11:36:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:52464) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b5ENG-0007Wy-8i for bug-gnu-emacs@gnu.org; Tue, 24 May 2016 11:36:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1b5ENG-0005aQ-4Z for bug-gnu-emacs@gnu.org; Tue, 24 May 2016 11:36:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Jules Tamagnan Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 24 May 2016 15:36:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 23609 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.146410412621410 (code B ref -1); Tue, 24 May 2016 15:36:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 24 May 2016 15:35:26 +0000 Original-Received: from localhost ([127.0.0.1]:36565 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b5EMg-0005ZG-Ey for submit@debbugs.gnu.org; Tue, 24 May 2016 11:35:26 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:51450) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b5ELs-0005XU-GY for submit@debbugs.gnu.org; Tue, 24 May 2016 11:34:36 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b5ELm-000760-4P for submit@debbugs.gnu.org; Tue, 24 May 2016 11:34:31 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:35588) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b5ELm-00075s-20 for submit@debbugs.gnu.org; Tue, 24 May 2016 11:34:30 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42411) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b5ELj-0000UK-Cu for bug-gnu-emacs@gnu.org; Tue, 24 May 2016 11:34:28 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b5ELg-00074i-5I for bug-gnu-emacs@gnu.org; Tue, 24 May 2016 11:34:27 -0400 Original-Received: from mail-qk0-x236.google.com ([2607:f8b0:400d:c09::236]:36461) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b5ELf-000743-WF for bug-gnu-emacs@gnu.org; Tue, 24 May 2016 11:34:24 -0400 Original-Received: by mail-qk0-x236.google.com with SMTP id x7so13883586qkd.3 for ; Tue, 24 May 2016 08:34:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id:user-agent:mime-version; bh=ccBKEbkukMhfqxdceD9T7UuzJLoBf1tJyfLbVCDnLmA=; b=jPsKL1ZKLxW3JFe4isErqmi7Aq/vCJarIvlZHucfiT4453fQfRFpOO2iJO+OaQws2U VK4sIKAnw3TTPqJ0W7X8V/gOGSxb+71r2FAq98U3NdfoytmeFDsS9TwhdpOukOLqezVJ V+lrk1z1HNbzygghc9WgQ8BvYt1Ax1Vppc8UvAc518AWB5OiKT74D7PTCja1XOyp8DuS E5M2F9xlyjdzfASHVxH1hp11mqwa74uQ76dWqQb0iDDAFUQsoS6wZcAp2Md2KXP3E21k GJw+CQlZHoorllhtsI/Mvl8OSJuKIKXpg6XspuMHwpwBgovPVTYsgRvQPeADT12+Cce2 XOCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id:user-agent :mime-version; bh=ccBKEbkukMhfqxdceD9T7UuzJLoBf1tJyfLbVCDnLmA=; b=WV8qUD4ZtpetjbmbdRXFg74kMKNLoxlEYwMZad7cWXN6P6mf9sNZbGLsr3v/yDhAKh r1yi55fR8qSOo9hJToIzBSsPGhQNK3qnujguzdU/FgHJ7uNhWtw3hI+10DYju2QpayUn PmpVq1EgwdWMYjYiGm0SBJ+UDsJdbErpT6c8B6Fug07PU9i1fxNOT9rER898AsLxIZpV d2gSi8EXshiOHdY/09yRZUZvsUmK4Nu2L/MhHrNBj6/abilEDJ8bu6gfswtXsIzf3D6E Sgb5vPZI4COrCtfr6vJsmpZUsQHSBODcpfMgxcdm5F62V+nVL6Rf2Qs72NzslSfsPrdB Bllg== X-Gm-Message-State: ALyK8tJ9e/wy57ZvJcj1xcnbKxDCiua8DOgfNs1GAMO8snVz7ZYbXq/rawCZrpYgPvSFzQ== X-Received: by 10.55.192.209 with SMTP id v78mr4043544qkv.122.1464104063197; Tue, 24 May 2016 08:34:23 -0700 (PDT) Original-Received: from bandersnatch ([130.132.236.142]) by smtp.gmail.com with ESMTPSA id u78sm970033qku.31.2016.05.24.08.34.22 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 May 2016 08:34:22 -0700 (PDT) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.92 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Mailman-Approved-At: Tue, 24 May 2016 11:35:25 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:118623 Archived-At: This is an issue in relation to python and the interpetter shell. If the python shell is running something and it is not done then when the user goes back the the document that was being editted emacs will freeze. If the user hits C-g then a keyboard interupt is sent to the interpeter and the action that was being run is canceled. If the user has the misfortune of using the mouse to click into another window then emacs will not be able to be recovered (haven't tested that last part entirely but the easiest way is to get back to working is to 'sudo killall emacs') The issue seems to be with eldoc mode. If eldoc mode (or global-eldoc-mode) is on then python.el tries to send something to the interepter to get the definition of the symbol at the point and then since something is running in the interpetter emacs will hang while waiting for the interpetter to repond. This issue is most obvious in emacs 25 because global-eldoc-mode is on by default. This causes loss of data. This bug is easily reproducable from emacs -Q. - run emacs -Q - Open a file /tmp/test.py (or any other python file) - C-c C-p to start the interpetter (it does not matter if the interpetter is dedicated or not) - in the interpetter write an expression that will not terminate e.g. while True: 2+2 e.g. (anything that plots in matplotlib) - go back to /tmp/test.py and type anything. - you will now be frozen - type C-g to send a keyboard interupt to the interpetter repeating these steps without global-eldoc-mode does not cause any issues The most obvious fix that I have found and use is to set global-eldoc-mode to -1 on init. In GNU Emacs 25.0.92.1 (x86_64-pc-linux-gnu, GTK+ Version 3.18.9) of 2016-04-07 built on bandersnatch Repository revision: 6287381da495ac5cc2a2a4acb7f49825677a44c8 System Description: Debian GNU/Linux testing (stretch) Configured using: 'configure --with-x-toolkit=gtk3 --with-xwidgets CC=gcc' Configured features: XPM JPEG TIFF GIF PNG SOUND DBUS GSETTINGS NOTIFY LIBXML2 FREETYPE LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 XWIDGETS Important settings: value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix Major mode: Python Minor modes in effect: shell-dirtrack-mode: t gpm-mouse-mode: t tooltip-mode: t global-eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Recent messages: Shell native completion is disabled, using fallback p is undefined y is undefined t is undefined Type "q" in help window to restore its previous buffer, C-M-v to scroll help. user-error: No cross-reference here Quit eldoc error: (wrong-type-argument arrayp nil) Quit Making completion list... [4 times] Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message dired rfc822 mml mml-sec epg epg-config mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mail-utils thingatpt warnings compile tramp-cache python tramp-sh tramp tramp-compat auth-source cl-seq eieio eieio-core cl-macs gnus-util mm-util help-fns mail-prsvr password-cache tramp-loaddefs trampver ucs-normalize shell pcomplete format-spec advice json map seq byte-opt gv bytecomp byte-compile cconv cl-extra help-mode easymenu comint ring cl-loaddefs pcase cl-lib ansi-color t-mouse time-date mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment elisp-mode lisp-mode prog-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese charscript case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer cl-preloaded nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote dbusbind inotify dynamic-setting system-font-setting font-render-setting xwidget-internal move-toolbar gtk x-toolkit x multi-tty make-network-process emacs) Memory information: conses 16 237883 7352) (symbols 48 23012 0) (miscs 40 116 165) (strings 32 25679 7181) (string-bytes 1 1156766) (vectors 16 35555) (vector-slots 8 664891 2342) (floats 8 238 254) (intervals 56 1567 1139) (buffers 976 19) (heap 1024 23963 1702))