From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Augusto Stoffel Newsgroups: gmane.emacs.bugs Subject: bug#50514: 28.0.50; org inline call to python src block req C-g to break Date: Sun, 12 Sep 2021 08:51:09 +0200 Message-ID: <871r5u1e3m.fsf@gmail.com> References: <24B9F777-2B69-45FD-ADBB-11E7A18F7A9A@disney.com> <87wnnnjlav.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32129"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: "50514@debbugs.gnu.org" <50514@debbugs.gnu.org>, Lars Ingebrigtsen To: "Barton, Mark" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Sep 12 08:52:10 2021 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 1mPJLW-000898-FN for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 12 Sep 2021 08:52:10 +0200 Original-Received: from localhost ([::1]:44774 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mPJLU-0000Bm-UQ for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 12 Sep 2021 02:52:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54272) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mPJLO-0000Be-NO for bug-gnu-emacs@gnu.org; Sun, 12 Sep 2021 02:52:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:58579) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mPJLO-0003uU-Fb for bug-gnu-emacs@gnu.org; Sun, 12 Sep 2021 02:52:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mPJLO-00034F-A7 for bug-gnu-emacs@gnu.org; Sun, 12 Sep 2021 02:52:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Augusto Stoffel Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 12 Sep 2021 06:52:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50514 X-GNU-PR-Package: emacs Original-Received: via spool by 50514-submit@debbugs.gnu.org id=B50514.163142947911715 (code B ref 50514); Sun, 12 Sep 2021 06:52:02 +0000 Original-Received: (at 50514) by debbugs.gnu.org; 12 Sep 2021 06:51:19 +0000 Original-Received: from localhost ([127.0.0.1]:41892 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mPJKh-00032r-F8 for submit@debbugs.gnu.org; Sun, 12 Sep 2021 02:51:19 -0400 Original-Received: from mail-wm1-f52.google.com ([209.85.128.52]:54170) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mPJKf-00032e-En for 50514@debbugs.gnu.org; Sun, 12 Sep 2021 02:51:18 -0400 Original-Received: by mail-wm1-f52.google.com with SMTP id i3so4233381wmq.3 for <50514@debbugs.gnu.org>; Sat, 11 Sep 2021 23:51:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=OFpAiPkWAOyo8VE6kiaOtar+jwlyTF8qJuD8xZXEACE=; b=bQ92hi6zIrPe/sdAeH9de/qKspKG+V3udgJ9urRG85aQJFXP6fY9o8YV3wrCcaimQe LzD22K1elc04ct/sIoME8ORZYkXJA85VsUGBHnDrDNz71GeeTVd2nL39EtHaW37huLIl QgfwaSTt2izB+KgmFks/4W+70cMcP2d4/ojKLKaLlOMG8d2ZRCO72Qxd1IxgbD/vTIuD /wQOTtmjRXI/tn7UOBM7oPQmm307UlH6yZeX9OTPxpihDxIUWCtXgYpPS5wL4HrRr+Sv ksA6roir9+2Jv4Kf9wZpf3Zeljm+4uCTCn2KLWxTtbCuN6B8BFsnwipoDMhCjaDDvDH3 2b/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=OFpAiPkWAOyo8VE6kiaOtar+jwlyTF8qJuD8xZXEACE=; b=RvwjjoYpUCq/bBqLfROu0oHcI/nQZrKQIHOOFQkXEjM2wvDzHS5Yq+zdlYr9LytjJs CDQghd0mWtT2jGA/cixxEhxJZNYnmLchV8OHo6mhkqmJcnm5AAsMDuMXxmEWoZ4cDxdU ViDyJo/T8UQr2My6lqHovNwre+T8lIGugS1xajRMZKOJmRSS8wrWyMNFUPNyuFM/NNiy wK7FGD1HtzQR1SeC5AzjfyXMVx/NVqKWXvm7GGA4kSh9vXFeG+BQYhdGhbPET76ruxvG dbc3JBU1t55l0GGolLYWeFODfFew8r+fuWFDm9ezTWsMln3mVcv+vnEfbxZiWDljxAwV W+bw== X-Gm-Message-State: AOAM5324D4E+61+F+dUAhsAtDbaxKUMg6WwQUC4ZyvHWH7fslJjDRhrn ecNhUx+7X1xfPPvSZp6XZ9a6MEoz8W90yA== X-Google-Smtp-Source: ABdhPJx8tiJgTBAQiZ23w8WPB/qShvjZgxtNDM2MrbcNH658h8qXx5Qb58mE9104kU0vxhAayhgxRg== X-Received: by 2002:a05:600c:4ecd:: with SMTP id g13mr5390970wmq.78.1631429470996; Sat, 11 Sep 2021 23:51:10 -0700 (PDT) Original-Received: from ars3 ([2a02:8109:8ac0:56d0::b1d]) by smtp.gmail.com with ESMTPSA id r2sm3787069wrg.31.2021.09.11.23.51.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 11 Sep 2021 23:51:10 -0700 (PDT) In-Reply-To: (Mark Barton's message of "Sun, 12 Sep 2021 06:22:27 +0000") 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: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:214116 Archived-At: Okay, I opened a bug in Org mode linking to this ticket and suggesting the solution https://orgmode.org/list/875yv61ej9.fsf@gmail.com/T/#u As to the problem still you have when starting up the shell, I can't observe it (but I am not able to test on macos). Does it happen when you just call `M-x run-python' from emacs -Q? And does it persist if you do (setq python-shell-completion-native-enable nil) ? On Sun, 12 Sep 2021 at 06:22, "Barton, Mark" wrote: >> On Sep 11, 2021, at 6:26 AM, Augusto Stoffel wrote: >>=20 >> On Fri, 10 Sep 2021 at 23:06, "Barton, Mark" wr= ote: >>=20 >>> With the Test.org file below, if I C-c C-c on the call_file_date it >>> will echo =E2=80=9CShell native completion is >>> enabled=E2=80=9D and Emacs will not respond until I hit C-g. If I >>> immediately C-c C-c again, it will echo >>> =E2=80=9CInline error: multiline result cannot be used=E2=80=9D and Ema= cs responds >>> normally to commands >>> without C-g to break out. The problem is only when I use session in >>> the property line. If I comment >>> out the property line then it works. My original file uses dozens >>> of python src blocks that require >>> the session >>=20 >> Hi Mark, >>=20 >> does the patch below solve the problem for you? >>=20 >> If it does, then I know why it happens and I can suggest the Org people >> a slightly more robust solution. >>=20 >> > > Augusto, > > I applied the patch to both lisp/org/ob-python.el and later > ~/.emacs.d/elpa/org-plus-contrib-20210906 when I realized that is > where my instance of org is loading from. I saw more python.el > patches, so I pulled commit 108dbed4c0 from master to recompile. > > I now get =E2=80=9CShell native completion is disabled, using fallback=E2= =80=9D in the > echo area and need to press C-g to break. But now with the patch to > ob-python.el it will work the following times when I press C-c on the > call_file_date. > > In my original document, I can export to pdf after I hit C-g to break > out of the first session, try to export again and then hit C-g to > break out of my second named python session, and then with both those > python session buffers opened, the third attempt to export succeeds. > > I suspect that in my case the initial setup code you send only once > per python session is stuck which requires me to send a C-g, but since > the session buffer is established, the setup code is not send again > and it proceeds as expected. > > Thanks, > > Mark