From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Augusto Stoffel Newsgroups: gmane.emacs.bugs Subject: bug#57885: [PATCH] Add a command to restart the Python shell Date: Mon, 19 Sep 2022 09:20:54 +0200 Message-ID: <87leqfeso9.fsf@gmail.com> References: <875yhmapwr.fsf@gmail.com> <87sfkpaojl.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7511"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: 57885@debbugs.gnu.org, stefankangas@gmail.com To: Richard Stallman Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Sep 19 09:22:35 2022 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 1oaB6w-0001ot-VE for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 19 Sep 2022 09:22:34 +0200 Original-Received: from localhost ([::1]:59650 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oaB6v-0005G6-U7 for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 19 Sep 2022 03:22:33 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45106) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oaB6Q-0005Ew-Vx for bug-gnu-emacs@gnu.org; Mon, 19 Sep 2022 03:22:06 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:53039) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oaB6Q-0008Fo-NI for bug-gnu-emacs@gnu.org; Mon, 19 Sep 2022 03:22:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oaB6Q-0004Tp-ID for bug-gnu-emacs@gnu.org; Mon, 19 Sep 2022 03:22:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Augusto Stoffel Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 19 Sep 2022 07:22:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57885 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 57885-submit@debbugs.gnu.org id=B57885.166357206817130 (code B ref 57885); Mon, 19 Sep 2022 07:22:02 +0000 Original-Received: (at 57885) by debbugs.gnu.org; 19 Sep 2022 07:21:08 +0000 Original-Received: from localhost ([127.0.0.1]:52111 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oaB5Y-0004SD-2t for submit@debbugs.gnu.org; Mon, 19 Sep 2022 03:21:08 -0400 Original-Received: from mail-ej1-f50.google.com ([209.85.218.50]:45852) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oaB5S-0004RF-HR for 57885@debbugs.gnu.org; Mon, 19 Sep 2022 03:21:06 -0400 Original-Received: by mail-ej1-f50.google.com with SMTP id dv25so62295691ejb.12 for <57885@debbugs.gnu.org>; Mon, 19 Sep 2022 00:21:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date; bh=VkjG+32ARgJ9QasNsWTnaaDzta6ISxB7WAIQdZ1t7Yw=; b=Pna4MukYxp6BILRNs4xh3AX7FemCJ5zfL4Jllpg7d193F0TC8vnZX+Ar8MvptIWIpN 7lMCB0Q2LfvARi22ZNEnzQT2E2o+P7QfSrI+dTSCMJIksl+VRhJ1MK992UoUQ5siween 2K2M/7hoq3/UDjutYRR/lE7SzGJjSJ5nARpUyTkwvK2nkeze4jUsOATxahZnpRl8Kwd1 j/J82DSMZpU7lefklwJjM+jxeDyyO2q574reKpPEKh8eHJzTR+pE5Baq1usPqYWM25VT uCpSaF3/2y6E/RHVhfTnzwnrCBhx73NfXVFojS+e1+S/bH4oGepe9q9OAY1IWru6uGhg MlKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date; bh=VkjG+32ARgJ9QasNsWTnaaDzta6ISxB7WAIQdZ1t7Yw=; b=VboJuxd2CzAsTJyoU7Z8lug1FJ8CfeoHZFOi8xIiO7BVYLM6MGa9U2gXf4pyFt9LbP XXvAlmsLcEWj5Hovstp7+ekFlHXJsIN0piBZaRKwjCu6p0ZQ+gO7y8x5wchgzjiLA2qg JfapAmggn3dUTW/4CWAoiKl5X5BwNb3AE6IXeh3SrWw6oUISp74ljs3OlR3IGgoy6VAk /4mrvVDeL2YPa6hJHFlHS2iAvRZCb1pDI7Byje3v8dYsARqalenHDRyiNREMJkCuvsy4 LXmH1ABl85rpXz4QaPKVJ/jVmXwirBLIOhkdjijDYtKcFsV0WKN3+UZuqS7oYIS1dfrl 2+iw== X-Gm-Message-State: ACrzQf3nEYNqVyZ6w8ts50L44Vdy4n8KS9JzPDLw9B+gg/+hg4jMZUDf TsMuZjVmBu6Y3oB8uekpx8LCqa2tKK0= X-Google-Smtp-Source: AMsMyM5wPLyiuB0ncaZ3V48k9FTW7r8K58ts/nYwsh4b4xax3/BQV7YuY+PUBdgSPb2kZYaQSKVVZA== X-Received: by 2002:a17:907:a408:b0:780:3d91:9232 with SMTP id sg8-20020a170907a40800b007803d919232mr11622728ejc.506.1663572056145; Mon, 19 Sep 2022 00:20:56 -0700 (PDT) Original-Received: from ars3 ([2a02:8109:8ac0:56d0::8510]) by smtp.gmail.com with ESMTPSA id d6-20020a170906304600b0076f99055520sm15329183ejd.137.2022.09.19.00.20.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Sep 2022 00:20:55 -0700 (PDT) In-Reply-To: (Richard Stallman's message of "Sun, 18 Sep 2022 23:32:03 -0400") 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:243034 Archived-At: On Sun, 18 Sep 2022 at 23:32, Richard Stallman wrote: > [[[ To any NSA and FBI agents reading my email: please consider ]]] > [[[ whether defending the US Constitution against all enemies, ]]] > [[[ foreign or domestic, requires you to follow Snowden's example. ]]] > > In Shell mode, if you terminate the shell, M-x shell will restart it. > That is easy to remember and does not require adding any commands to Emacs. > > Can the same solution work here? > > Does it perhaps work already? This already works, but I think the new command is useful for a few different reasons. The most important is that you can operate the Python shell entirely from other buffers using `python-shell-send-region' and related commands (I use the Python shell to see the outputs, but rarely type input directly into it). So the procedure you suggest actually involves a number of steps that become annoying if you need to repeat them often.