From unknown Wed Sep 10 09:37:44 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#41959 <41959@debbugs.gnu.org> To: bug#41959 <41959@debbugs.gnu.org> Subject: Status: Subject: 27.0.91; comint-prompt-regexp in Python mode is incorrect and causes completion failures Reply-To: bug#41959 <41959@debbugs.gnu.org> Date: Wed, 10 Sep 2025 16:37:44 +0000 retitle 41959 Subject: 27.0.91; comint-prompt-regexp in Python mode is inco= rrect and causes completion failures reassign 41959 emacs submitter 41959 Leo Alekseyev severity 41959 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 19 21:00:42 2020 Received: (at submit) by debbugs.gnu.org; 20 Jun 2020 01:00:42 +0000 Received: from localhost ([127.0.0.1]:57058 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jmRs8-0004Mz-UP for submit@debbugs.gnu.org; Fri, 19 Jun 2020 21:00:42 -0400 Received: from lists.gnu.org ([209.51.188.17]:50908) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jmRST-0003lC-Ms for submit@debbugs.gnu.org; Fri, 19 Jun 2020 20:34:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37192) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jmRST-0000mb-FP for bug-gnu-emacs@gnu.org; Fri, 19 Jun 2020 20:34:09 -0400 Received: from mail-io1-xd2b.google.com ([2607:f8b0:4864:20::d2b]:33349) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jmRSR-0001PE-Lp for bug-gnu-emacs@gnu.org; Fri, 19 Jun 2020 20:34:09 -0400 Received: by mail-io1-xd2b.google.com with SMTP id i25so13448752iog.0 for ; Fri, 19 Jun 2020 17:34:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to :content-transfer-encoding; bh=Stz3d+xAxBxpddG7upKPqf4t+sVh6xg32jY09cckuW0=; b=uZcpUpr0qMHFPSep1BRw7H0VGUVt1erkrenoG6Ig/riCu4qN9LODiUk7+ldpt/XfWI ePyKDwBJ2jziRAJFbev8X2H1jlx4cLoBrEq/0G6YegN0AkAlKFqc2rQoFS0pjGdQphTL 8bszP4gSzqeRpV6QXChTy2C+PGu9qGzg+z3NgenuiXgh4yNdKaQjwqJWecu6H7Ick5cD mW9m/asE+NEehSPybEmv4QWBn07vYlqt/bCTO4hn/FrVKo042EckzAfI7V0UmPIvl8iR m10OQAzcMkU+2SVxb01W2A8Cs/Uw/gLR7QtA5efCTNtqbvnkkbmcKaemOMM5xDgzo3Ol cwdQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to :content-transfer-encoding; bh=Stz3d+xAxBxpddG7upKPqf4t+sVh6xg32jY09cckuW0=; b=RznPePzm+/jry+Rcxs9isurNL0fAIq3YymyuZcsYnL78BGyqiPjH2WMTPqUc5uX1ZT 69+dCQ/0beYYrsNY5yZqHgVaAMQTsTb+7W4lmAKjOubIWI+gis/Nu04Ez0HtGhi3KLdV JrCGN6Mhh986yL+gLspWG8u7ZbVhZJEke93dKsGLn9XDGN4tLGAZF2+hVEGOrzqOCLNp Z1rLq/5LZXDXNQQKmLlbzHYSmqbhtafHnlG1/OTaVegTt/upJ5cm6XOJKAu/RMKmG8zw bh05SNZL1ZlffSX5nKiMdoeDlzReQndBeYOUVP2/lLmtRCS3nw0jf0Y6bOp6feeB/sLh wTvA== X-Gm-Message-State: AOAM533m9C6iWkapZj5J8Bl3XXIc2qHBM1o7D6uJ7a0d5fFagM4YmJk2 LcEa7MbsVTTVOcFbNVG3lJcGzUJzMj4i2NhYeNRMJGT2 X-Google-Smtp-Source: ABdhPJydpoaQsi2HllOoQ4C+jNo4e0G5pHRheDmv2LpZe5Z5GUe1naVK37CnE9v1Ha/+jlXNJRl3b87IcySdmHd41Io= X-Received: by 2002:a5d:80d2:: with SMTP id h18mr5413274ior.73.1592613245835; Fri, 19 Jun 2020 17:34:05 -0700 (PDT) MIME-Version: 1.0 From: Leo Alekseyev Date: Fri, 19 Jun 2020 17:33:54 -0700 Message-ID: Subject: Subject: 27.0.91; comint-prompt-regexp in Python mode is incorrect and causes completion failures To: bug-gnu-emacs@gnu.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2607:f8b0:4864:20::d2b; envelope-from=dnquark@gmail.com; helo=mail-io1-xd2b.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Fri, 19 Jun 2020 21:00:39 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) M-x run-python brings up a warning buffer with the following message: Warning (python): Your =E2=80=98python-shell-interpreter=E2=80=99 doesn=E2= =80=99t seem to support readline, yet =E2=80=98python-shell-completion-native-enable=E2=80= =99 was t and "python" is not part of the =E2=80=98python-shell-completion-native-disabled-interpreters=E2=80=99 list= . Native completions have been disabled locally. This warning is unwarranted, because the python-shell-interpreter being invoked in fact supports readline (as can be readily checked via "import readline, rlcompleter"). Tracing through the code it appears that python-shell-completion-native-setup erroneously returns nil, because (python-shell-accept-process-output process python-shell-completion-native-try-output-timeout) returns nil. This, however, appears to be caused by the fact that the comint prompt in Python mode is expected to look like ">>> ", which is a bad assumption. When readline is run with "set show-mode-in-prompt on" option, the comint prompt will be prefixed with the readline mode indicator, so it will look like "@>>> ", or "(ins)>>> ", or "+>>> ", depending on user's configuration (typically in ~/.inputrc). In short, comint-prompt-regexp assumes a very specific environment, and when comint prompt fails to match these expectations it causes unrelated failures in e.g. completion functions. In GNU Emacs 27.0.91 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.22.30) of 2020-06-08 built on meitner Repository revision: 0260d2d2dbb2607e7310bdb518b7b6c0f58f5f98 Repository branch: emacs-27 Windowing system distributor 'The X.Org Foundation', version 11.0.12008000 System Description: Ubuntu 20.04 LTS Recent messages: For information about GNU Emacs and the GNU system, type C-h C-a. Waiting for git... [2 times] Shell native completion is disabled, using fallback V is undefined Mark set [2 times] Mark activated Configured using: 'configure --with-sound=3Dalsa --without-gconf --with-mailutils --with-json --with-modules --prefix=3D/usr/local' Configured features: XPM JPEG TIFF GIF PNG RSVG SOUND DBUS GSETTINGS GLIB NOTIFY INOTIFY ACL GNUTLS LIBXML2 FREETYPE HARFBUZZ M17N_FLT LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM MODULES THREADS LIBSYSTEMD JSON PDUMPER LCMS2 GMP Important settings: value of $LANG: en_US.UTF-8 value of $XMODIFIERS: @im=3Dibus locale-coding-system: utf-8-unix Major mode: Special Minor modes in effect: shell-dirtrack-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 blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t buffer-read-only: t line-number-mode: t transient-mark-mode: t Load-path shadows: /home/leo/.emacs.d.doom.27/.local/straight/build/let-alist/let-alist hides /usr/local/share/emacs/27.0.91/lisp/emacs-lisp/let-alist Features: (shadow sort mail-extr emacsbug message rmc puny dired dired-loaddefs rfc822 mml mml-sec epa derived epg epg-config gnus-util rmail rmail-loaddefs text-property-search mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils warnings compile cl-extra help-mode python tramp-sh tramp tramp-loaddefs trampver tramp-integration files-x tramp-compat shell pcomplete parse-time iso8601 time-date ls-lisp format-spec comint ring ansi-color finder-inf package easymenu browse-url url-handlers url-parse auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs password-cache json subr-x map url-vars seq byte-opt gv bytecomp byte-compile cconv cl-loaddefs cl-lib tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core term/tty-colors frame minibuffer 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 composite charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray 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 threads dbusbind inotify lcms2 dynamic-setting system-font-setting font-render-setting move-toolbar gtk x-toolkit x multi-tty make-network-process emacs) Memory information: ((conses 16 80485 7435) (symbols 48 9871 1) (strings 32 29404 1906) (string-bytes 1 1053067) (vectors 16 15547) (vector-slots 8 194915 7402) (floats 8 58 12) (intervals 56 216 0) (buffers 1000 14)) From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 06 10:19:28 2022 Received: (at 41959) by debbugs.gnu.org; 6 Jun 2022 14:19:28 +0000 Received: from localhost ([127.0.0.1]:36415 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nyDZo-0005qR-Gi for submit@debbugs.gnu.org; Mon, 06 Jun 2022 10:19:28 -0400 Received: from quimby.gnus.org ([95.216.78.240]:40702) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nyDZn-0005pw-AS for 41959@debbugs.gnu.org; Mon, 06 Jun 2022 10:19:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=ZY/HvKgjfluJst5BOmK2begrauqe1YoN8ty4YGj/XFE=; b=kmXvf8n+mDBIa8SXgkt7xEqUJk mKZ+lVOa3PggRhoM+gz4E3voV/KHHSQ8odVTAvRTrCd01yosZV0aCl+Fp4mS8CUnzL68QoXlXCjy9 8yJVZOCdRLMshicq82br0b3uUCJZb7qn88AYVFzGHD+USasSuE0iDTlwH+nFaeTVu1M8=; Received: from [84.212.220.105] (helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nyDZe-0003rk-1f; Mon, 06 Jun 2022 16:19:20 +0200 From: Lars Ingebrigtsen To: Leo Alekseyev Subject: Re: bug#41959: Subject: 27.0.91; comint-prompt-regexp in Python mode is incorrect and causes completion failures References: X-Now-Playing: Gosane - Everything You Want's _Tuxedomooning: A Tribute_: "The Stranger" Date: Mon, 06 Jun 2022 16:19:17 +0200 In-Reply-To: (Leo Alekseyev's message of "Fri, 19 Jun 2020 17:33:54 -0700") Message-ID: <875yldub6i.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Leo Alekseyev writes: > This, however, appears to be caused by the fact that the comint prompt > in Python mode is expected to look like ">>> ", which is a bad > assumption. To reproduce the problem: Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 41959 Cc: 41959@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Leo Alekseyev writes: > This, however, appears to be caused by the fact that the comint prompt > in Python mode is expected to look like ">>> ", which is a bad > assumption. To reproduce the problem: echo set show-mode-in-prompt on >> ~/.inputrc emacs -Q M-x run-python I can reproduce this issue in Emacs 27.1, but not in Emacs 29, so it looks like this has been fixed now, and I'm closing this bug report. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 06 10:19:34 2022 Received: (at control) by debbugs.gnu.org; 6 Jun 2022 14:19:34 +0000 Received: from localhost ([127.0.0.1]:36418 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nyDZt-0005qj-OG for submit@debbugs.gnu.org; Mon, 06 Jun 2022 10:19:34 -0400 Received: from quimby.gnus.org ([95.216.78.240]:40716) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nyDZr-0005qI-QZ for control@debbugs.gnu.org; Mon, 06 Jun 2022 10:19:32 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=HnNrHNOwsQLRhjHw021PhuK+UtBQKa2TTwKXF78hVjU=; b=VPVnfAbeA23I5YllnECyHy5YGC 0478av67sHUUD7PngR1QBrJLKNX5eSdrH73d+IFkKC/oodNqP/b65PX/398gQY9bfGiabTQThZdNj h22lf1Tap6N2iT4PockAI6h/ozs5zt3n0OgXC70qOfQQYORwveahioDXX9/2lR1WVPN0=; Received: from [84.212.220.105] (helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nyDZk-0003rt-2c for control@debbugs.gnu.org; Mon, 06 Jun 2022 16:19:26 +0200 Date: Mon, 06 Jun 2022 16:19:23 +0200 Message-Id: <874k0xub6c.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #41959 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: close 41959 29.1 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) close 41959 29.1 quit From unknown Wed Sep 10 09:37:44 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 05 Jul 2022 11:24:10 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator