From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: [Emacs-diffs] trunk r117592: Grab all Python process output before inferior-python-mode hooks. Date: Mon, 28 Jul 2014 19:21:12 -0400 Message-ID: References: <87d2cp2nn5.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1406589705 24238 80.91.229.3 (28 Jul 2014 23:21:45 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 28 Jul 2014 23:21:45 +0000 (UTC) Cc: emacs-devel@gnu.org To: fgallina@gnu.org (=?windows-1252?Q?Fabi=E1n?= Ezequiel Gallina) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jul 29 01:21:38 2014 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XBuEa-0006U2-0y for ged-emacs-devel@m.gmane.org; Tue, 29 Jul 2014 01:21:36 +0200 Original-Received: from localhost ([::1]:42839 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XBuEZ-0003ZL-H9 for ged-emacs-devel@m.gmane.org; Mon, 28 Jul 2014 19:21:35 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42430) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XBuEP-0003Ys-EC for emacs-devel@gnu.org; Mon, 28 Jul 2014 19:21:32 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XBuEF-0007eR-Nu for emacs-devel@gnu.org; Mon, 28 Jul 2014 19:21:25 -0400 Original-Received: from smtp-pri-03.vtxnet.net ([212.147.62.137]:55752) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XBuEF-0007eJ-HX; Mon, 28 Jul 2014 19:21:15 -0400 Original-Received: from localhost (unknown [127.0.0.1]) by smtp-pri-03.vtxnet.net (VTX Services SA) with ESMTP id 327EC68B822; Mon, 28 Jul 2014 23:21:14 +0000 (UTC) Original-Received: from smtp-pri-03.vtxnet.net ([127.0.0.1]) by localhost (smtp-pri-03.vtxnet.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 3FPdxOYnHbam; Tue, 29 Jul 2014 01:21:13 +0200 (CEST) Original-Received: from fmsmemgm.homelinux.net (dyn.83-228-141-040.dsl.vtx.ch [83.228.141.40]) by smtp-pri-03.vtxnet.net (VTX Services SA) with ESMTP id 5F81468B810; Tue, 29 Jul 2014 01:21:13 +0200 (CEST) Original-Received: by fmsmemgm.homelinux.net (Postfix, from userid 20848) id 02191AE14E; Mon, 28 Jul 2014 19:21:12 -0400 (EDT) In-Reply-To: <87d2cp2nn5.fsf@gnu.org> (=?windows-1252?Q?=22Fabi=E1n?= Ezequiel Gallina"'s message of "Mon, 28 Jul 2014 18:12:46 -0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 212.147.62.137 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:173232 Archived-At: >>> + ;; Ensure all the output is accepted before running any hooks. >>> + (accept-process-output (get-buffer-process (current-buffer))) >>> + (sit-for 0.1 t)) >> Why do you need sit-for here? > I just added a comment about it in revno 117605. > ;; At this point, all process output should have been received, but > ;; on GNU/Linux, calling `python-shell-internal-send-string' without > ;; a running internal shell fails to grab output properly unless > ;; this `sit-for' is in place. > Sorry about that, I should have placed that comment before! Sounds like a workaround for a problem somewhere in Emacs. Could you make a bug-report for it, ideally providing a simple test case? Stefan