From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: dalanicolai Newsgroups: gmane.emacs.bugs Subject: bug#49073: 28.0.50; python-send-to-repl functions misbehave Date: Sat, 28 Aug 2021 14:56:35 +0200 Message-ID: References: <1aed416d4a4c84b688a893c1832a7ae076f10ffb.camel@gmail.com> <87o89hewgp.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0000000000000dbe3805ca9e22fa" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="40165"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 49073@debbugs.gnu.org To: Augusto Stoffel Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Aug 28 14:58:11 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 1mJxuU-000AFp-QA for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 28 Aug 2021 14:58:10 +0200 Original-Received: from localhost ([::1]:37420 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mJxuT-000605-8z for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 28 Aug 2021 08:58:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42722) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mJxuM-0005zl-Ky for bug-gnu-emacs@gnu.org; Sat, 28 Aug 2021 08:58:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:41992) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mJxuM-0000GJ-9W for bug-gnu-emacs@gnu.org; Sat, 28 Aug 2021 08:58:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mJxuM-0008Lc-3H for bug-gnu-emacs@gnu.org; Sat, 28 Aug 2021 08:58:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: dalanicolai Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 28 Aug 2021 12:58:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49073 X-GNU-PR-Package: emacs Original-Received: via spool by 49073-submit@debbugs.gnu.org id=B49073.163015542332021 (code B ref 49073); Sat, 28 Aug 2021 12:58:02 +0000 Original-Received: (at 49073) by debbugs.gnu.org; 28 Aug 2021 12:57:03 +0000 Original-Received: from localhost ([127.0.0.1]:53538 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mJxtL-0008K5-87 for submit@debbugs.gnu.org; Sat, 28 Aug 2021 08:57:03 -0400 Original-Received: from mail-vk1-f180.google.com ([209.85.221.180]:38503) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mJxtG-0008Jk-CL for 49073@debbugs.gnu.org; Sat, 28 Aug 2021 08:56:58 -0400 Original-Received: by mail-vk1-f180.google.com with SMTP id k124so2806767vke.5 for <49073@debbugs.gnu.org>; Sat, 28 Aug 2021 05:56:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=x7qlxfs15AOdwZ6UNebD8a8v4Psx+tc1UTuhI6N+2fI=; b=SXVAHt01vGzEnkn2VqmRSZSZFGgS8MQEtM441vzOa/Kl4ApZyhH+z0S0C4zvEXafm/ KDxnlEuJ8ijZA5dhj6in2BbD2vjronQeAK5tlH5wIo2lt7zwc/bmOnC2B3HX/kEgxVOO iDumJRmUl1WMcdSBiB/+ZB9zxFbtaAK4WRbbslM6C13Knx0d5N6uDqWY1393F7JbTqyO 0ksYH1NechvTCmpvnOiovH0FlPZC5I1eJQlx4/DMYosAf/GWQABWq+rJ7V2rMeUGLqFa i21yLwKcLFnSIDl2r788ZNQhiqnf4wyobQlOYQO7Fyqnr3aAOlvxLdUrNVF7pyz3sg0k AJ2Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=x7qlxfs15AOdwZ6UNebD8a8v4Psx+tc1UTuhI6N+2fI=; b=clz5MjMV74KZ6OLifsk2OsjcmKKiilb+6OP1pder0dJ3U4i9w3WxTfiTo//ZKMuC2Z NPSv8DUz8etu5QsAQ65NqJ+hUH5aDMfTyrT1XW/puJTuUIjn7y8VpmijpCHydRKY1AKa oormYUu/Xc+DJctTPfF6uTADFma3CQeSkCABfqgmjblLLbRnaKeOUNHomdfSM/bA/CqK n+JCc3bunbxCJKTCxXw4V+rA/K+ucHtHTWMI72L/jpR00UJRxKAmYwJuWuC3w9ysB53K hZgs++iZDHuuQn/08Jdvb7Hneceh27ctyfaCWzLLrURqIFnS78CKjpb958zXP7H9Zuha 4HAg== X-Gm-Message-State: AOAM532ZzELqmBQ1o0gDy94Ov8o4mTkWachNRP2SmKCo/V+CeWr+oXWv rdVuoVGSsTijLnQtC4rYxA4PKWXsmoJv6xOz3B8= X-Google-Smtp-Source: ABdhPJwbhRh0BDlAo7uOFS10ymB/759peexDNAkOvVzDQsPC2FA067LFuOktFkfjunhJ0pyyiSKU8xWYM9urMj84a8U= X-Received: by 2002:a1f:308d:: with SMTP id w135mr9814709vkw.15.1630155408521; Sat, 28 Aug 2021 05:56:48 -0700 (PDT) In-Reply-To: <87o89hewgp.fsf@gmail.com> 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:212870 Archived-At: --0000000000000dbe3805ca9e22fa Content-Type: text/plain; charset="UTF-8" Thanks for the update! Unfortunately, I actually rarely code in python. It was just when I did for a moment, then I noticed this surprising behavior of the 'python-send-repl' functions (which turned out to be partly a Spacemacs issue, and partly fixed already through the extra flag for (not) sending the coding cookie). About the first 'bug' (showing the input), I was considering the ipython shell where one can refer to previous input by its number. But I agree that for send-to-repl functions printing the input is not a very useful addition. Looking at the description of the patch, the new behavior looks preferable to me as it is generally nice to see some values when sending statements/code during interactive development. On Sat, 28 Aug 2021 at 11:43, Augusto Stoffel wrote: > On Thu, 17 Jun 2021 at 16:53, dalanicolai@gmail.com wrote: > > > This is a combined bug report for two unrelated but still somewhat > > related bugs. > > > > - The first bug is that when using `python-send-to-repl` functions, the > > input does not get printed in the REPL buffer. > > - The second bug is that for various setups, even the output does not > > get printed properly. > > > > See the patch in https://debbugs.gnu.org/cgi/bugreport.cgi?bug=49822#45 > for a proposed solution to the second problem. > > As to the first problem (not echoing the input): I think this would be > pretty hard to implement in a dumb terminal. You could try running the > Python shell in a terminal emulator (term or vterm) and write a macro to > paste regions of text into it. In any case, echoing the input also > seems to be a somewhat unconventional behavior. I don't think I would > want that. > > PS: By 'python-send-to-repl' I assume you mean the 'python-shell-send-*' > family of commands, or do you refer to some external package? > --0000000000000dbe3805ca9e22fa Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Thanks for the update! Unfortunately, I actually rarely co= de in python. It was
just when I did for a moment, then I noticed this s= urprising behavior of the
'python-send-repl' functions (which tu= rned out to be partly a Spacemacs issue,
and partly fixed already throug= h the extra flag for (not) sending the coding
cookie).

About the = first 'bug' (showing the input), I was considering the ipython shel= l
where one can refer to previous input by its number. But I agree that = for
send-to-repl functions printing the input is not a very useful addit= ion.

Looking at the description of the patch, the new behavior looks= preferable to me
as it is generally nice to see some values when sendin= g statements/code during
interactive development.


On S= at, 28 Aug 2021 at 11:43, Augusto Stoffel <arstoffel@gmail.com> wrote:
On Thu, 17 Jun 2021 at 16:53, dalanicolai@gmail.com wrote:=

> This is a combined bug report for two unrelated but still somewhat
> related bugs.
>
> - The first bug is that when using `python-send-to-repl` functions, th= e
> =C2=A0 input does not get printed in the REPL buffer.
> - The second bug is that for various setups, even the output does not<= br> > =C2=A0 get printed properly.
>

See the patch in https://debbugs.gnu.org/c= gi/bugreport.cgi?bug=3D49822#45
for a proposed solution to the second problem.

As to the first problem (not echoing the input): I think this would be
pretty hard to implement in a dumb terminal.=C2=A0 You could try running th= e
Python shell in a terminal emulator (term or vterm) and write a macro to paste regions of text into it.=C2=A0 In any case, echoing the input also seems to be a somewhat unconventional behavior.=C2=A0 I don't think I w= ould
want that.

PS: By 'python-send-to-repl' I assume you mean the 'python-shel= l-send-*'
family of commands, or do you refer to some external package?
--0000000000000dbe3805ca9e22fa--