From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id AsnpJag5QGG5VwAAgWs5BA (envelope-from ) for ; Tue, 14 Sep 2021 07:56:56 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id CGfyIKg5QGGlNAAAB5/wlQ (envelope-from ) for ; Tue, 14 Sep 2021 05:56:56 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id F1993E111 for ; Tue, 14 Sep 2021 07:56:55 +0200 (CEST) Received: from localhost ([::1]:48594 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mQ1R7-00069b-4g for larch@yhetil.org; Tue, 14 Sep 2021 01:56:53 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47602) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mQ1QZ-00067z-2P for emacs-orgmode@gnu.org; Tue, 14 Sep 2021 01:56:19 -0400 Received: from mail-pg1-x52d.google.com ([2607:f8b0:4864:20::52d]:46073) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mQ1QX-0008Jg-AB for emacs-orgmode@gnu.org; Tue, 14 Sep 2021 01:56:18 -0400 Received: by mail-pg1-x52d.google.com with SMTP id n18so11690370pgm.12 for ; Mon, 13 Sep 2021 22:56:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:subject:in-reply-to:references:date:message-id:mime-version; bh=vJrxNN4Qf0JGTlbbxw4eL6EdHo1JdanFq/j5ShxHpUI=; b=iwPOEEehHTzGsecutS5cvp5hJHB4vX1fFgkKN/7k+/RjXytPRffmP8u9Nkh336aQ4E Uf4ypqPhkYrSPn3pwp4LvW+m77rrXQFFTPisgXHaNBdgf7Sh5rPCqk1pmXminsuddLCr 0gFPt5hMJsjd1r75WMkhRixFL6QqQBCrymRccdxX2S7Pj0qpBaHFzCW1Gs9D0CHy4EwD WfW2W0sPrTeGBFMhyi77CQV7Tl40ulU4o7WL4EWi81ucpAPhrk0Vk/f6TAx/yHybiERB KOQZALYr1F94RTeQOX8ZuIu6M1RRsW1bucC3HPwi+3edBWi4RBoI5RyXwGsRuAJvvPR/ yLtQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:in-reply-to:references:date :message-id:mime-version; bh=vJrxNN4Qf0JGTlbbxw4eL6EdHo1JdanFq/j5ShxHpUI=; b=qnOT23G0Cjw/0YcMUiyrhBtLkw03AfpqNsziOMdDNVM0XGAFtEIS3c5mnc7fBND0Ar PoVAQUa7QDEYaiy73U4b9Sou25OxgpTy9V31GCKnPQXI67EO3D698N0N8SSFJux9aM09 RTwagoP/QGWkQUy+W0ilQvQRS3jUmgZWZIDxLpfJPvdHMctoBO5fb/e4DFEWfH8BGMsn GIvUekxmkp0L2SfSU7GScF7GcU/p5dmnxda1/eC2FwxwsrnE0QHGcUSDwnyx7GIfmA3L iQnCfvVn8/Fu5u3mBIArQng+B4e+B6A53ZcY8o9DQ8Kovx9GrEatDExwMdCiG4oRoDdU jWjA== X-Gm-Message-State: AOAM531jgQ/kTI1wtxfRrYUCPhuiyi0DGD0FNQHTLMmDayFpzFytuzx1 ivN4EefuGUYnUBZqVYeef2IX77Do3/Y= X-Google-Smtp-Source: ABdhPJzG/8WsEevYJa3rSkUUXCqz/ftIYTTw8+7oZPKySiPJ8pCtjXWUJ5ctFwn8lPZn2JiocAf1AQ== X-Received: by 2002:a63:338b:: with SMTP id z133mr13822975pgz.318.1631598975130; Mon, 13 Sep 2021 22:56:15 -0700 (PDT) Received: from localhost ([198.27.180.62]) by smtp.gmail.com with ESMTPSA id 138sm8773044pfz.187.2021.09.13.22.56.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Sep 2021 22:56:14 -0700 (PDT) From: Jack Kamm To: Augusto Stoffel , emacs-orgmode@gnu.org Subject: Re: Bug: ob-python issue in Emacs 28 [9.4.4] In-Reply-To: <875yv61ej9.fsf@gmail.com> References: <875yv61ej9.fsf@gmail.com> Date: Mon, 13 Sep 2021 22:56:13 -0700 Message-ID: <87v933bszm.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::52d; envelope-from=jackkamm@gmail.com; helo=mail-pg1-x52d.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1631599016; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=vJrxNN4Qf0JGTlbbxw4eL6EdHo1JdanFq/j5ShxHpUI=; b=rzg7OzmpPlvh3hVBBV4sRCT7JcxFNA6QkppZRSbNrRkXUso5Yttntv+BJF83ILkEaE2rJS pz6zB/mFnjKVaojoU5xEuIbPgN45oLbkMxIAZ7vAftbT7aC/Tx5xWb2iHxqj3dCmDrRJ4z 3LEzv3vtzUqZyKKqeC5uXolKodM0gT/6GmeSzFGnzfgcGZrnyPPK4+zqE18xEeqsQD3IAk kp9V5vtCLC239GyWkKWFLQJFJCDX2K/1Qj7N+2GpERQmInGrFMiDm7jCv9eMj4mXcGhm/E LbNeOL006fJ26RmQOUfKeRxYuaEHWqzPcIOwe1+GDW3UYqGpaqgdKfVLpoXYaw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1631599016; a=rsa-sha256; cv=none; b=Dz850kelDUZ5+tpaqWG+C46FmTBFsuZZc5z1SjkXqmTe77QJlzGMNwV1obgVgjvfqoqcYT aENpojsGIm8oHZFlk1SN6ni/qB9y3x80Fds9d/SkCXt+abiPV1lLYPq5ELzDX6d04hXpmT DnJjAXLfSxXxPF4liTPK4p/np5ZB43t/6zwXuwBOG6GyQJmH0bSZOxQ73B8Db7RipBgIsv JAEewAo1fp3qU24jrcPxdF1C7Jr1pBMqObbqwXqRFYQqIm56H23dt6LHNq3Mwbu185Ak9i kRUC5zaEWzyNB/BG6SLnmVHdJu5wHFQTKWW2VtEWtqkt2CTEYUSDwTkVyapv0g== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=iwPOEEeh; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Spam-Score: -1.60 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=iwPOEEeh; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Queue-Id: F1993E111 X-Spam-Score: -1.60 X-Migadu-Scanner: scn0.migadu.com X-TUID: rTg/GzY5Wf0S Hi Augusto, > In Emacs 28, `python-shell-send-string' prints an additional newline > between the prompt and output (among other things, so you can tell > whether or not the inferior process is busy at any given time). > > However, this interferes with ob-python, see e.g. > https://debbugs.gnu.org/cgi/bugreport.cgi?bug=50514 Thanks for reporting this, and also for your recent improvements to python.el. Would you be willing to update your patch to use (if (version< emacs-version "28") 0 1) And add a commit message and changelog, so we can push it to master? > As a permanent solution, I would suggest to replace org-babel-chomp > and actually strip whitespace from both ends of the string outputted > from the Python interpreter. (IPython even has a configuration option > to add extra whitespace before or after the output.) I think this would be problematic, because then it would be impossible to print output with leading or trailing whitespace, which it should be possible to do. Best, Jack