From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: JD Smith Newsgroups: gmane.emacs.devel Subject: Re: accept-process-output throws Date: Wed, 24 Nov 2021 00:14:06 -0500 Message-ID: References: <29A79E00-3117-4F18-BB4F-3ADD2DBB0806@gmail.com> <838rxe9quw.fsf@gnu.org> Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.80.0.2.43\)) 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="3119"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Nov 24 06:22:16 2021 Return-path: Envelope-to: ged-emacs-devel@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 1mpkjX-0000ZV-9U for ged-emacs-devel@m.gmane-mx.org; Wed, 24 Nov 2021 06:22:15 +0100 Original-Received: from localhost ([::1]:36206 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mpkjV-0007tU-Jp for ged-emacs-devel@m.gmane-mx.org; Wed, 24 Nov 2021 00:22:13 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:47400) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mpkiE-00079m-OZ for emacs-devel@gnu.org; Wed, 24 Nov 2021 00:20:54 -0500 Original-Received: from [2607:f8b0:4864:20::72f] (port=37497 helo=mail-qk1-x72f.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mpkiD-0006Xi-3Q; Wed, 24 Nov 2021 00:20:54 -0500 Original-Received: by mail-qk1-x72f.google.com with SMTP id m186so1625567qkb.4; Tue, 23 Nov 2021 21:20:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=0k7CZ8RmCYTLiwTNWBug0uz+78Z1Bk81eEtwJhm3LcU=; b=ZzcGpEJRzfBPxQYXG93x/Huf8n+p5ipO6QsOPYHT9p0Vz1NaaIvcm0dzxAy2qXM3Y4 uIRUJl8e7WdQuoIr6sT9GMNLBHkC+aLadH0qt6hu++IwMqpo2Zb+DsWrSfgGJ+rhovuA Izz12Wugi/hefK66/4OamiHVIpKfLcwyfD0KUXuYTqxxkl6o3+ftKdYasJLdhLSKSy1H 61qLGOE2EKF/2yBqvjIpZMktpysukJOcxCdP+igRDJcmo37ZWeNuy/QDCOFSzJ1Db/LH MJhzE5yg0ZC4qSWMLlGvCXB0sCHAFpmJ32RVCSqC7bl2c+kq+8JHysa1L6+P9f3UQNtT CzrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=0k7CZ8RmCYTLiwTNWBug0uz+78Z1Bk81eEtwJhm3LcU=; b=yoP65QEN5XIx5uw1IZrVCDV5e1qsEUZq3CC/QPrWFSmEE0yGGB8im3a7QF8Tv9WJ80 v4l+dfblXd852rhytLY+20yjvTLESreIf4Fb+TjtQcBkecnbcUvmeJPuhzvAW12vjAhd FNdaoSe9NcF85frwF5I7AlCa6C9wIq5kLVtFi8x9bA8SLfib5HsIP7NtKjtba+nNYD42 Rs7MCZEjKZMhaaty+bH6hDVenyBsaSB/1WSUHibM/c/qitmjcl+ucPct2+P+rOnSDAm1 rMrYAXb8ONs7yDC97W/jZlDZcDHvwlXlGVlLmP4S99xWrA0TBOAYSLr3SBQ1hyQkueV+ 7URQ== X-Gm-Message-State: AOAM532N63PRv7V+LRLN0EE3GD9b7HAIiJ+lS9DGQEyK8rvFK+rZVaX6 6dmdwWk3R42axi7Gm48N+OOVedawDsI= X-Google-Smtp-Source: ABdhPJzcAW05Vs+XEN+w/+CKWQyb/QJmCL83hgRaLoMSsvxYGj4W1bcjvuAzmUE/mrGvIYOoZ3Vvxg== X-Received: by 2002:a05:620a:1a0b:: with SMTP id bk11mr2921631qkb.513.1637730852232; Tue, 23 Nov 2021 21:14:12 -0800 (PST) Original-Received: from smtpclient.apple (cm-134-228-57-173.buckeyecom.net. [134.228.57.173]) by smtp.gmail.com with ESMTPSA id s11sm7808699qki.95.2021.11.23.21.14.10 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 23 Nov 2021 21:14:11 -0800 (PST) In-Reply-To: <838rxe9quw.fsf@gnu.org> X-Mailer: Apple Mail (2.3654.80.0.2.43) X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::72f (failed) Received-SPF: pass client-ip=2607:f8b0:4864:20::72f; envelope-from=jdtsmith@gmail.com; helo=mail-qk1-x72f.google.com X-Spam_score_int: -12 X-Spam_score: -1.3 X-Spam_bar: - X-Spam_report: (-1.3 / 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, PDS_HP_HELO_NORDNS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:279980 Archived-At: > On Nov 23, 2021, at 10:25 PM, Eli Zaretskii wrote: >=20 > Is this in "emacs -Q"? If so, how did you start the process, and what > do you have in the process-filter and process-sentinel functions for > this process? This is in a customized inferior python mode (a comint-derived mode), = running iPython as the process. I discovered the issue with = `python-shell-send-string-no-output', which adds its own = pre-output-filter to accumulate and discard process output. The = no-output commands are being sent to the process from a post-command = hook which kicks off a timer (to gather completion and syntax data). = The command results arrive promptly, but when the non-local exit occurs, = they =E2=80=9Cescape" the pre-output filtering and show up in the = buffer. When this occurs, it is always as a result of the non-local = exit of `accept-process-output=E2=80=99. I=E2=80=99ve found the problem = gets more severe when the PCH-launched timer's delay is very small = (<0.1s), i.e. when commands are sent in quick succession while typing. I do not have an emacs -Q demo of this but can look at creating one with = the stock python-shell-mode. In the meantime I=E2=80=99ve found that if = I bind (inhibit-quit t), remove `with-local-quit' and specify a timeout = in `accept-process-output' (to silence the warning about the blocking = call), this entirely prevents the non-local exit. But this I feel is = more of a workaround than a solution, and I still do not understand the = original problem. Thanks.=