From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] python.el: Returning inferior Python output without inhibiting it Date: Sun, 01 Oct 2023 20:00:09 +0300 Message-ID: <83fs2u8ehy.fsf@gnu.org> References: <87msx2ib0c.fsf@gmail.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35210"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Jack Kamm Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Oct 01 19:01:25 2023 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 1qmzoq-0008nU-QX for ged-emacs-devel@m.gmane-mx.org; Sun, 01 Oct 2023 19:01:24 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qmznz-0000sc-Tm; Sun, 01 Oct 2023 13:00:31 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qmznt-0000qj-SF for emacs-devel@gnu.org; Sun, 01 Oct 2023 13:00:30 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qmznt-0005EA-De; Sun, 01 Oct 2023 13:00:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=pq+IKc6QH67cYR7/o3wGEQDuemu9WIsmxkKvmZ7i2vs=; b=cfsniByXswD0 RQr2iv674a84xgLejqZIsm7JKDZu/cLWZXYa6jEM9UG0Z60ier24yHaO8i1gxNSW1rTGAcub+h2Lz YVYQo/yARhrnXoNTQnHX9D7IincYZfH65PZ3yneGvn6zjqeTBHCtCzMofLjpm5CggJjv1goPL1Z0m swsw56nOAjf4RJu6nzzLZftnIhYfLHZbvFpburqkmVgBsWxW0xSjLCF8LVf58qSFKcPPRQhlxIrcb R2+oQ6Uggl2nxrt41Ry44LXjl/lVLw6kuvjh+wZJLOv7sOglQDcEm39DDd1i9pAphiB+B9Snaeq99 Ea1Ij97BQ1p3YNVQCcmtaA==; In-Reply-To: <87msx2ib0c.fsf@gmail.com> (message from Jack Kamm on Sun, 01 Oct 2023 09:05:23 -0700) 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-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:311224 Archived-At: > From: Jack Kamm > Date: Sun, 01 Oct 2023 09:05:23 -0700 > > It would be very useful to ob-python, if python.el had a function that > evaluated Python code and returned output, without inhibiting the > output. > > So, this patch modifies `python-shell-send-string-no-output', adding > an argument to show the output. I also rename it to > `python-shell-send-string-return-output' since that is a more accurate > name for the new behavior. I think instead of renaming (which then requires us to add an obsolete alias), it would be better to leave python-shell-send-string-no-output available, but just make it a thin wrapper around python-shell-send-string-return-output (which I would suggest to name python-shell-send-string-maybe-output instead). This way, we don't annoy Lisp programs that use python-shell-send-string-no-output with obsolescence warnings. Thanks.