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: Wed, 15 Sep 2021 08:28:07 +0200 Message-ID: <875yv2fj48.fsf@gmail.com> References: <24B9F777-2B69-45FD-ADBB-11E7A18F7A9A@disney.com> <87wnnnjlav.fsf@gmail.com> <871r5u1e3m.fsf@gmail.com> <61CB9513-0EEC-4F46-90D6-1D208BBADFA1@disney.com> <87pmteb1ef.fsf@gmail.com> <21C76818-63E5-4DC9-A60D-2BEF33813A18@disney.com> <73383502-159B-4BD9-8836-6C8A534A7063@disney.com> <87r1dry7x0.fsf@gmail.com> <32AF1DCB-F81A-4FB7-8EB2-31B483E5E468@disney.com> <87sfy7qadr.fsf@gmail.com> <073CC0D1-9900-4613-87E8-D69EA1C11623@disney.com> <87o88vq7ia.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="12616"; 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 Wed Sep 15 08:29:13 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 1mQOPx-00034U-6v for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 15 Sep 2021 08:29:13 +0200 Original-Received: from localhost ([::1]:57820 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mQOPv-0003PP-S9 for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 15 Sep 2021 02:29:11 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44792) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mQOPn-0003Ne-M4 for bug-gnu-emacs@gnu.org; Wed, 15 Sep 2021 02:29:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:39059) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mQOPn-0007OI-Eu for bug-gnu-emacs@gnu.org; Wed, 15 Sep 2021 02:29:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mQOPn-0001fk-59 for bug-gnu-emacs@gnu.org; Wed, 15 Sep 2021 02:29:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Augusto Stoffel Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 15 Sep 2021 06:29:03 +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.16316872976363 (code B ref 50514); Wed, 15 Sep 2021 06:29:03 +0000 Original-Received: (at 50514) by debbugs.gnu.org; 15 Sep 2021 06:28:17 +0000 Original-Received: from localhost ([127.0.0.1]:50603 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mQOP3-0001eZ-3J for submit@debbugs.gnu.org; Wed, 15 Sep 2021 02:28:17 -0400 Original-Received: from mail-wr1-f43.google.com ([209.85.221.43]:38885) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mQOP1-0001e6-0H for 50514@debbugs.gnu.org; Wed, 15 Sep 2021 02:28:15 -0400 Original-Received: by mail-wr1-f43.google.com with SMTP id u18so291520wrg.5 for <50514@debbugs.gnu.org>; Tue, 14 Sep 2021 23:28:14 -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=kvV3xMRWe5zmI7x/SzRm1Wq7I3KPiLnbQj6HKjdPufs=; b=ULQgCJDQOXkBsA/PoFEpZTcjYDwEFarRSU1Ksrb1Njjr5MTR6mukk7m1aq+vnbzvvd b8zMwl/kRM5hCYY9k27kNiTMrL8VQTsbfzkUGsF8veqk6f5uw8KbmmUqOamKZcrxD36W hlfv3OnliicYBm1hL0y3Gd258kdTAQX82xT94tLmDh45lUp33TX3gB54dLnbjPrbQWkn ZnThalPgFmY27ej/iMASSVGJz5LYZdbgSSixElim8b6UDLhpHUUa7IGXaXInUY2JFlSB kJ2UdYs3B5pH4Y1wAchCNdqG6PPSLrtr4Edib2kSYs4qM8eLccubHZ1e4sgkDW9GMSNM zWzA== 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=kvV3xMRWe5zmI7x/SzRm1Wq7I3KPiLnbQj6HKjdPufs=; b=TZ0Mi+Q2cawbDQt4Illi3Q6BOcCXBOX2qlugexYQOkrsLFl1MkdVe0Wttl3Cim+ncN D2Lp359uJR/Q9KU5iBZ8U42v1hHmJG19zDR4BJ1vmpsZ9m5BT/4nin2o+fj0JVM4z2e6 5VykOS2yyi0izuRCJMh439oSYB9ozu45liBRbs1QJQkRCWDgrSnbjFdzA1LeTza62oJY A45ih584q0n81r5CfVo9iUSWApedRhlE3uDPtdj4nnvxb1wfAOXj2TTgJ4gMW0XYIdXi 4cCrRnFwXDiSk82fhLcGTcpDGlEVtd6/4vam1Vguo/KNgQsRtCEzQ2g4g700lF1abVek ZqrA== X-Gm-Message-State: AOAM5304z2otDGLOH8EdRM5avM7EjxoL/bHkjWxqC3xW4Bv3ZL/Fvf2K uIZYWAmwwYOmNsG0SYXpTbv1t+qXvf4= X-Google-Smtp-Source: ABdhPJxx+cd2p5Kv+q1+lxB8ThPAusIfD+Y7a7npkGimO9olcawvTyBAW4gKBlUd+2X3t86M2J2qOg== X-Received: by 2002:a5d:6a81:: with SMTP id s1mr3062469wru.274.1631687288910; Tue, 14 Sep 2021 23:28:08 -0700 (PDT) Original-Received: from ars3 ([2a02:8109:8ac0:56d0::3c3e]) by smtp.gmail.com with ESMTPSA id k17sm4052721wmj.0.2021.09.14.23.28.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Sep 2021 23:28:08 -0700 (PDT) In-Reply-To: (Mark Barton's message of "Tue, 14 Sep 2021 22:20:48 +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:214357 Archived-At: On Tue, 14 Sep 2021 at 22:20, "Barton, Mark" wrote: > On Sep 14, 2021, at 12:31 PM, Augusto Stoffel wrot= e: > > Great. Then we'll fix the spurious line break problem, which is indeed > on the Emacs side. But the other is due to ob-python, which may send > code to the interpreter before the first prompt is printed (this can be > checked through the variable 'python-shell--first-prompt-received'). > > Since I don't use org-babel, I'm afraid I can't help with that part=E2= =80=A6 > > So I found if I extend the sleep-for in ob-python from 10 ms to 90 ms, my= initialization problem is > =E2=80=9Cfixed=E2=80=9D. I=E2=80=99m not sure why it would take longer th= an it did before the changes. Possibly an > interaction with the antivirus software??? This was probably a problem all along, but went unnoticed until now because 'python-shell-send-string' used to be simpler. > I have not tried other values, but may be there is a better > method for ob-python to determine it is safe than using a sleep-for. One thing that might work is to block until the shell is ready with somethi= ng like (run-python) (with-current-buffer *the-shell-buffer* (while (not python-shell--first-prompt-received) (accept-process-output (get-buffer-process (current-buffer)))))