From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#58713: 29.0.50; Completion/ElDoc/FFAP interferes with a running Python program Date: Thu, 27 Oct 2022 19:06:05 +0300 Message-ID: <83sfj9l09e.fsf@gnu.org> References: Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10709"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 58713-done@debbugs.gnu.org To: kobarity Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Oct 27 18:09:23 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oo5Rb-0002bE-AW for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 27 Oct 2022 18:09:23 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oo5PO-0005Gr-4i; Thu, 27 Oct 2022 12:07:06 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oo5PL-00055I-5C for bug-gnu-emacs@gnu.org; Thu, 27 Oct 2022 12:07:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oo5PK-0004TH-4v for bug-gnu-emacs@gnu.org; Thu, 27 Oct 2022 12:07:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oo5PJ-0007XC-Q8 for bug-gnu-emacs@gnu.org; Thu, 27 Oct 2022 12:07:01 -0400 Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Thu, 27 Oct 2022 16:07:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 58713 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Mail-Followup-To: 58713@debbugs.gnu.org, eliz@gnu.org, kobarity@gmail.com Original-Received: via spool by 58713-done@debbugs.gnu.org id=D58713.166688679328906 (code D ref 58713); Thu, 27 Oct 2022 16:07:01 +0000 Original-Received: (at 58713-done) by debbugs.gnu.org; 27 Oct 2022 16:06:33 +0000 Original-Received: from localhost ([127.0.0.1]:59043 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oo5Oq-0007W8-Qb for submit@debbugs.gnu.org; Thu, 27 Oct 2022 12:06:33 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:33850) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oo5Oo-0007Vr-Vn for 58713-done@debbugs.gnu.org; Thu, 27 Oct 2022 12:06:31 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oo5Oi-0004Pb-W7; Thu, 27 Oct 2022 12:06:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=zcYuqCux4hSHLZIDTiDFB/0yZ3b0md2coxIq4UdC/oQ=; b=ZxW7syltX46Y H5sfi0uSPg4rFg+HGeGCEd+1FA5JZAqfGK6v7xnQ9EJ/BbCPU7aFzddoa/KRhJ37vQgkYk9RT7iCp Vskb9ai4Xn+jtmSmpwXbxoflckb8L+Sbopd7mORAasZl64BMiChnVaC0+0UL64BSxuiJmKwoxZac4 69WBOaN8+StosMimtwBg1g0fVdqqrbuOW2hn5Po2bVKLq4isj9Q32CZTUw2sxCpdK1k+1OeTkXypx sf/IVVtd6Z3WTCkYUJUM1aA8irmOzRwa2l7viRyb/quddbUU5Dsb0BvTTjvjwxgTENOQ/FgmFtr+r Icz0ASpM8lifLJPeDXBzjA==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oo5OX-0005jd-2U; Thu, 27 Oct 2022 12:06:24 -0400 In-Reply-To: (message from kobarity on Sat, 22 Oct 2022 21:45:09 +0900) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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: , Original-Sender: "bug-gnu-emacs" Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:246315 Archived-At: > Date: Sat, 22 Oct 2022 21:45:09 +0900 > From: kobarity > > When a Python program is sent to the Python Shell buffer using > `python-shell-send-buffer' or similar functions, it is run > asynchronously. So it is possible to invoke Completion/ElDoc/FFAP in > the Python buffer while the program is running. However, it leads to > several problems: > > 1. emacs -Q > 2. Open the following Python file. > > #+begin_src python > import time > > for i in range(10): > print(i) > time.sleep(1) > #+end_src > > 3. C-u -1 M-x eldoc-mode (Disable ElDoc mode.) > 4. C-c C-p (M-x run-python) > 5. C-x o (Back to the Python mode buffer) > 6. M-> (M-x end-of-buffer) > 7. C-c C-c (M-x python-shell-send-buffer) > 8. While the program is running, type "t". > 9. C-M-i (M-x completion-at-point) > > Output from the program will no longer be displayed and the Python > buffer cannot be manipulated until the program is completed or the > completion is canceled with C-g. > > Similar problems occur with ElDoc/FFAP. > > These problems are caused by the fact that > `python-shell-send-string-no-output' used by these features replaces > the process-filter. So I think it is appropriate to disable > Completion/ElDoc/FFAP while a program is running. > > Attached is a patch to disable Completion/ElDoc/FFAP when a proper > prompt is not received in the Python Shell buffer. Thanks, installed.