From unknown Sun Jun 22 20:58:56 2025 X-Loop: help-debbugs@gnu.org Subject: bug#21242: 24.5.1; python.el: should display output buffer on exceptions when using python-shell-send-region Resent-From: Yuri D'Elia Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 12 Aug 2015 14:06:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 21242 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 21242@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.143938836116017 (code B ref -1); Wed, 12 Aug 2015 14:06:01 +0000 Received: (at submit) by debbugs.gnu.org; 12 Aug 2015 14:06:01 +0000 Received: from localhost ([127.0.0.1]:54246 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZPWfI-0004AF-An for submit@debbugs.gnu.org; Wed, 12 Aug 2015 10:06:01 -0400 Received: from eggs.gnu.org ([208.118.235.92]:44294) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZPWfF-0004A6-KB for submit@debbugs.gnu.org; Wed, 12 Aug 2015 10:05:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZPWfA-0001iG-Se for submit@debbugs.gnu.org; Wed, 12 Aug 2015 10:05:57 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:57629) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZPWfA-0001iB-QJ for submit@debbugs.gnu.org; Wed, 12 Aug 2015 10:05:52 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54276) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZPWf6-00044z-Ks for bug-gnu-emacs@gnu.org; Wed, 12 Aug 2015 10:05:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZPWf3-0001gc-37 for bug-gnu-emacs@gnu.org; Wed, 12 Aug 2015 10:05:48 -0400 Received: from e.thregr.org ([80.68.88.20]:55800) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZPWf2-0001gK-S1 for bug-gnu-emacs@gnu.org; Wed, 12 Aug 2015 10:05:44 -0400 Received: from [2a02:27e8:20:9049:8edc:d4ff:fed6:5d5b] by e.thregr.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86) (envelope-from ) id 1ZPWf0-00068s-U0 for bug-gnu-emacs@gnu.org; Wed, 12 Aug 2015 16:05:42 +0200 From: Yuri D'Elia X-Enigmail-Draft-Status: N1110 Message-ID: <55CB52B6.8020308@thregr.org> Date: Wed, 12 Aug 2015 16:05:42 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Icedove/38.1.0 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------020700010200090205000606" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 208.118.235.17 X-Spam-Score: -4.1 (----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.1 (----) This is a multi-part message in MIME format. --------------020700010200090205000606 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit When evaluating the code interactively, there's currently no notification about evaluation errors. Exceptions in the output buffer go simply unnoticed, unless you watch for them closely. I like to keep the output buffer buried, and assume that no-notification==no-error. Exceptions caused by interactive evaluation should either: - show a notification of sorts in the minibuffer - display the output buffer for inspection For inspiration about the second, see: https://github.com/wavexx/python-x.el/blob/master/python-x.el#L424 Given previous experience with python-mode.el (which tends to break the current window layout with his own splitting logic), I find it important that the notification function (which displays the output buffer) should be customizable, and this is reflected in the example code. --------------020700010200090205000606 Content-Type: text/x-diff; name="python-buffer-substring.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="python-buffer-substring.patch" --- python.el.Orig 2015-07-18 18:00:49.367517569 +0200 +++ python.el 2015-07-18 18:03:01.203659502 +0200 @@ -2548,18 +2548,22 @@ (make-string ;; Subtract 2 because of the coding cookie. (- (line-number-at-pos start) 2) ?\n)))) - (toplevel-block-p (save-excursion - (goto-char start) - (or (zerop (line-number-at-pos start)) - (progn - (python-util-forward-comment 1) - (zerop (current-indentation))))))) + (block-param (save-excursion + (goto-char start) + (progn + (python-util-forward-comment 1) + (list (current-indentation) + (/= (point) start))))) + (block-indentation (car block-param)) + (starts-with-indentation-p (cadr block-param))) (with-temp-buffer (python-mode) (if fillstr (insert fillstr)) + (when (and (> block-indentation 0) (not starts-with-indentation-p)) + (insert (make-string block-indentation ?\s))) (insert substring) (goto-char (point-min)) - (when (not toplevel-block-p) + (when (> block-indentation 0) (insert "if True:") (delete-region (point) (line-end-position))) (when nomain --------------020700010200090205000606-- From unknown Sun Jun 22 20:58:56 2025 X-Loop: help-debbugs@gnu.org Subject: bug#21242: 24.5.1; python.el: should display output buffer on exceptions when using python-shell-send-region Resent-From: Andreas =?UTF-8?Q?R=C3=B6hler?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 13 Aug 2015 06:50:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21242 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 21242@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.14394485484142 (code B ref -1); Thu, 13 Aug 2015 06:50:02 +0000 Received: (at submit) by debbugs.gnu.org; 13 Aug 2015 06:49:08 +0000 Received: from localhost ([127.0.0.1]:54552 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZPmK4-00014j-6A for submit@debbugs.gnu.org; Thu, 13 Aug 2015 02:49:08 -0400 Received: from eggs.gnu.org ([208.118.235.92]:58761) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZPmK2-00014b-7t for submit@debbugs.gnu.org; Thu, 13 Aug 2015 02:49:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZPmK0-0007G2-Js for submit@debbugs.gnu.org; Thu, 13 Aug 2015 02:49:05 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:51330) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZPmK0-0007Fr-HA for submit@debbugs.gnu.org; Thu, 13 Aug 2015 02:49:04 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40526) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZPmJz-0000Fo-Dn for bug-gnu-emacs@gnu.org; Thu, 13 Aug 2015 02:49:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZPmJt-0007FN-Ks for bug-gnu-emacs@gnu.org; Thu, 13 Aug 2015 02:49:03 -0400 Received: from mout.kundenserver.de ([212.227.126.130]:63797) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZPmJt-0007FH-9V for bug-gnu-emacs@gnu.org; Thu, 13 Aug 2015 02:48:57 -0400 Received: from [192.168.178.31] ([77.12.121.69]) by mrelayeu.kundenserver.de (mreue002) with ESMTPSA (Nemesis) id 0MgTYM-1ZC4um40d4-00NhVe for ; Thu, 13 Aug 2015 08:48:55 +0200 Message-ID: <55CC3DC9.1070400@easy-emacs.de> Date: Thu, 13 Aug 2015 08:48:41 +0200 From: Andreas =?UTF-8?Q?R=C3=B6hler?= User-Agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 References: <55CB52B6.8020308@thregr.org> In-Reply-To: <55CB52B6.8020308@thregr.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:rFQJdwMLm/wX/wwuzvgXlDGg57oonLwBtjVIjzb3lw6FBJrbtGi XpO4v5T1X9SQvKCIinZcdVNwGEhj6ZpjCzF6/KMiDEX6KG9LlXxZA5Od7bxmka0WE8HGT+E AK/41hwZz1M4u1ymMSuYCEBCbxmRZ+b3g/6JDfnXSnZ9xFbEXAL+tr0xhnZAtGmECaZh4rp sQU+Y6V2BvGocYtXBSbTA== X-UI-Out-Filterresults: notjunk:1;V01:K0:cyWYWpQcJVA=:scOz6Lsxq9krAyP2z1agGG sCvw/+yHRw3EfNBGvtmKxAaB3h2rOl0nqhiGmjdcbPcxn9tgxUmqbf45lD5jByHDZnIBAzuhf tYqjyiz0Za4ZvquO54VdDtsjVSNeK142gajXWd4L0R8fi7Ce43YN0u5y38xDKSpoI7Och23DA gocmhv/uzFEPBiXedAY5OIORSKKZWYycWQCscmXgHcaXrn2rgkvOg4BWnncM9qNqZPp9zffjy Te1SsgECfUjXYnjyIuFV1ZGw3HC5l2o81L4t/TH7nOpEHj/4EiH4umvs3sadYFeYpYggKNLuy lT6vd6tCOTG6k6v+1BaMa1tQbNEJQkxQLnxdLvOMUuJ8i0C8YZg4ZX6Anqkw4I2Kp8HoaxVen EepRYGv2Q08/qMR43t37eOpY3+ROldx6x9kGwKSHZ/Q/2QjRipv3hadEgqxvjvYvUdRWCq4hv TbkjCryHpLNmRQ4IHDZxpBuXItoYJz0mG8YThhgsaqBX6cIM+6kBgn75hVLgcU4up2YZwNUl5 YsieoFuUElAHaqhhBplRQYwwm0KNFHFQOWuqwMfGgbhqRHKXbcko49BR/1nv3/kpOd7UPxMTe Sj2SuJr625ThEcMTvqQ+xb/Td5T2aUo28eSwbu9sP2cdNpqZIqOb0+NlWVHrPSECgNe7zv7pq y76t1y8tQLF1eZGywA4DwaYucbcrxS+GVdQHboN/rGJpRRiy0B9FsIUQWDl+qXceadHwWVQq5 1D+2OLR2eRqZjl5SnsA5moCbUYh4tkUw2VFbCC2GwoSJoqi9jVq8oB3utnf3P7OEng3YERsSX iXjb/9R5oHasAo4dB8lLnyJBj43oQ== X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) Am 12.08.2015 um 16:05 schrieb Yuri D'Elia: > When evaluating the code interactively, there's currently no > notification about evaluation errors. Exceptions in the output buffer go > simply unnoticed, unless you watch for them closely. I like to keep the > output buffer buried, and assume that no-notification==no-error. > > Exceptions caused by interactive evaluation should either: > > - show a notification of sorts in the minibuffer > - display the output buffer for inspection > > For inspiration about the second, see: > > https://github.com/wavexx/python-x.el/blob/master/python-x.el#L424 > > Given previous experience with python-mode.el (which tends to break the > current window layout with his own splitting logic), I find it important > that the notification function (which displays the output buffer) should > be customizable, and this is reflected in the example code. WRT python-mode.el: Splitting-behavior _is_ customizable. It only occurs if py-split-window-on-execute is non-nil - default is 'just-two. Also there is py-keep-windows-configuration, when non-nil it precedes other settings. From debbugs-submit-bounces@debbugs.gnu.org Sun Jun 04 14:32:52 2017 Received: (at control) by debbugs.gnu.org; 4 Jun 2017 18:32:53 +0000 Received: from localhost ([127.0.0.1]:56098 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dHaKa-0003wJ-Nn for submit@debbugs.gnu.org; Sun, 04 Jun 2017 14:32:52 -0400 Received: from mail-it0-f51.google.com ([209.85.214.51]:34336) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dHaKZ-0003w7-Ia for control@debbugs.gnu.org; Sun, 04 Jun 2017 14:32:51 -0400 Received: by mail-it0-f51.google.com with SMTP id m47so11842385iti.1 for ; Sun, 04 Jun 2017 11:32:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:subject:date:message-id:mime-version; bh=aYRnOyVxJarMMHuMoHtyVpeoLpDvlo5ZdoSnHDqNquU=; b=Wc2BoA+HHEDXqn69r2IKXblkT/4fAk7Hq0/PJxKo3KItAnv6kZaeWyhWxR6nxCWzOc p//g89yIgTX5i6xtYYR6SQAxRiQnJN6AJJe/0UjB5l1qZqjzUYzN8lUZVL1PWLOVPz5u 00fXndJHoTHHRi//fwwHq5kBuE5jQZgyBtFh97I9g1Nq2p2JbNiewKoCzgarSzO8WTre wDiE84YkLr76kTiowMVdmphhoaU8XU807omwcDRzmfARE+aN76rujsVkPaHy0je1rQ92 xdL4GiQR9Aeealn8+mZITSCck9G0ZPM31iTeMj8AhNQ2bmM3Vn0e5nlU5MkO3Po+rvKv qoGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:subject:date:message-id :mime-version; bh=aYRnOyVxJarMMHuMoHtyVpeoLpDvlo5ZdoSnHDqNquU=; b=YPOUv0tgj5b1sTbVZ/NYutu7Nd0XW4HJ9EDFmtOjByG+QPEm00nS9HWMThdlPEWPEI 3uHpZm7sfan4acjaS8YFqs+z1g+DoP1EKzEIy+RGHmBQKNo0ymNI3/z53Aok6QddCvdj zfZ+H7I9atofXwbeuy6MnzRPWTf0fVMcSp1WUILyw0Ah3RxcW6Ufy5PZEDAa+VPQuDh6 qgNf9jAWrsUryFN7wPw5V2Yaj0XqyCxHQUdwRllurpTZqJmzYaYK5iWzGXEE98NTpDpp lDJn2I+x0f2ntISsG/Cql8i7iYz0SrKRoUUEJ3vKyl6a64kVA10/+znDgRolJ1kQxwd7 I94A== X-Gm-Message-State: AODbwcAXbwqH0kNjynYhOklty3u6T7nu+AOLg+8ZYee9910LuXJnuIbG Mw2svW3A97BLzum7 X-Received: by 10.107.32.148 with SMTP id g142mr17415885iog.222.1496601165711; Sun, 04 Jun 2017 11:32:45 -0700 (PDT) Received: from zony ([45.2.7.65]) by smtp.googlemail.com with ESMTPSA id k2sm4002021itk.3.2017.06.04.11.32.44 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 04 Jun 2017 11:32:44 -0700 (PDT) From: npostavs@users.sourceforge.net To: control@debbugs.gnu.org Subject: control message for bug #21242 Date: Sun, 04 Jun 2017 14:34:22 -0400 Message-ID: <878tl7zjo1.fsf@users.sourceforge.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.7 (/) severity 21242 wishlist quit From unknown Sun Jun 22 20:58:56 2025 X-Loop: help-debbugs@gnu.org Subject: bug#21242: 24.5.1; python.el: should display output buffer on exceptions when using python-shell-send-region Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 17 Sep 2020 18:02:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21242 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Yuri D'Elia Cc: 21242@debbugs.gnu.org Received: via spool by 21242-submit@debbugs.gnu.org id=B21242.160036569512320 (code B ref 21242); Thu, 17 Sep 2020 18:02:02 +0000 Received: (at 21242) by debbugs.gnu.org; 17 Sep 2020 18:01:35 +0000 Received: from localhost ([127.0.0.1]:38960 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kIyDv-0003CO-Ht for submit@debbugs.gnu.org; Thu, 17 Sep 2020 14:01:35 -0400 Received: from quimby.gnus.org ([95.216.78.240]:43916) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kIyDt-00037e-Tf for 21242@debbugs.gnu.org; Thu, 17 Sep 2020 14:01:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID :In-Reply-To:Date:References:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=EEewcdEq0/V7psJjIzMOqh6G1FsFAr696DdC8ixlHN0=; b=Cyk53bvaC6oYtES9TAGFkz6xN5 Ea84DOWq+Oc7g+bekWXBohnD4X/3FZaRBupc8ztNOi576lCSqZZhybw6zmwhF8IYgvbEarm3CDsnB t/qyqAy8uGH5WzeU19derizpdLefA9guxIL73KsSm5mEtJX8SKiX5X1IkrO9RMQkb2mQ=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kIyDh-0003Kn-Nz; Thu, 17 Sep 2020 20:01:27 +0200 From: Lars Ingebrigtsen References: <55CB52B6.8020308@thregr.org> X-Now-Playing: Scritti Politti's _Provision_: "First boy in this town" Date: Thu, 17 Sep 2020 20:01:20 +0200 In-Reply-To: <55CB52B6.8020308@thregr.org> (Yuri D'Elia's message of "Wed, 12 Aug 2015 16:05:42 +0200") Message-ID: <87pn6kmgen.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Yuri D'Elia writes: > When evaluating the code interactively, there's currently no > notification about evaluation errors. Exceptions in the output buffer go > simply unnoticed, unless you watch for them closely. I like [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Yuri D'Elia writes: > When evaluating the code interactively, there's currently no > notification about evaluation errors. Exceptions in the output buffer go > simply unnoticed, unless you watch for them closely. I like to keep the > output buffer buried, and assume that no-notification=3D=3Dno-error. > > Exceptions caused by interactive evaluation should either: > > - show a notification of sorts in the minibuffer > - display the output buffer for inspection I don't use this stuff a lot, but I just don't understand how the patch attached relates to the reported problem. And there's also Andreas's comment (at the end). Yuri, could you explain a bit more about how this patch fixes the problem? > - (toplevel-block-p (save-excursion > - (goto-char start) > - (or (zerop (line-number-at-pos start)) > - (progn > - (python-util-forward-comment 1) > - (zerop (current-indentation))))))) > + (block-param (save-excursion > + (goto-char start) > + (progn > + (python-util-forward-comment 1) > + (list (current-indentation) > + (/=3D (point) start))))) > + (block-indentation (car block-param)) > + (starts-with-indentation-p (cadr block-param))) > (with-temp-buffer > (python-mode) > (if fillstr (insert fillstr)) > + (when (and (> block-indentation 0) (not starts-with-indentation-p)) > + (insert (make-string block-indentation ?\s))) > (insert substring) > (goto-char (point-min)) > - (when (not toplevel-block-p) > + (when (> block-indentation 0) > (insert "if True:") > (delete-region (point) (line-end-position))) Andreas R=C3=B6hler writes: >> Given previous experience with python-mode.el (which tends to break the >> current window layout with his own splitting logic), I find it important >> that the notification function (which displays the output buffer) should >> be customizable, and this is reflected in the example code. > > WRT python-mode.el: > > Splitting-behavior _is_ customizable. It only occurs if > py-split-window-on-execute is non-nil - default is 'just-two. > Also there is py-keep-windows-configuration, when non-nil it precedes > other settings. --=20 (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Thu Sep 17 14:01:41 2020 Received: (at control) by debbugs.gnu.org; 17 Sep 2020 18:01:41 +0000 Received: from localhost ([127.0.0.1]:38963 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kIyE0-0003GU-RB for submit@debbugs.gnu.org; Thu, 17 Sep 2020 14:01:41 -0400 Received: from quimby.gnus.org ([95.216.78.240]:43932) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kIyDz-0003BO-HZ for control@debbugs.gnu.org; Thu, 17 Sep 2020 14:01:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=IBffSMb2H6VVdBlRcy4yUnKmBJwW7Fz9cracW/zC494=; b=iT0GCwxVXLgVMGBQFjp4V9xlsu zXooS6rFASiMrfTLvs6/dm9SSzyq5dLQHCp3lAXz1j13XDYX6AoNlY7wrTAtPPf5+lddCanvYK0KB 92COhZB9UeNERHGCpyDGFC2IjXsUEkD4QxBJik5Mxdt5oYYYZx0rbynf2KMJKk5hsCNM=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kIyDr-0003Kw-PA for control@debbugs.gnu.org; Thu, 17 Sep 2020 20:01:33 +0200 Date: Thu, 17 Sep 2020 20:01:30 +0200 Message-Id: <87o8m4mged.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #21242 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: tags 21242 + moreinfo quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) tags 21242 + moreinfo quit From unknown Sun Jun 22 20:58:56 2025 X-Loop: help-debbugs@gnu.org Subject: bug#21242: 24.5.1; python.el: should display output buffer on exceptions when using python-shell-send-region Resent-From: Yuri D'Elia Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 17 Sep 2020 18:45:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21242 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo To: Lars Ingebrigtsen Cc: 21242@debbugs.gnu.org Received: via spool by 21242-submit@debbugs.gnu.org id=B21242.160036825128247 (code B ref 21242); Thu, 17 Sep 2020 18:45:02 +0000 Received: (at 21242) by debbugs.gnu.org; 17 Sep 2020 18:44:11 +0000 Received: from localhost ([127.0.0.1]:39028 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kIyt8-0007LX-Tu for submit@debbugs.gnu.org; Thu, 17 Sep 2020 14:44:11 -0400 Received: from erc.thregr.org ([46.43.2.63]:40324) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kIyt6-0007LN-Oy for 21242@debbugs.gnu.org; Thu, 17 Sep 2020 14:44:09 -0400 Received: from [2a02:27e8:ffff:10::3] (helo=localhost) by erc.thregr.org with esmtpsa (TLS1.3:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) id 1kIyt4-0001nH-85 (envelope-from ); Thu, 17 Sep 2020 20:44:06 +0200 References: <55CB52B6.8020308@thregr.org> <87pn6kmgen.fsf@gnus.org> User-agent: mu4e 1.5.5; emacs 28.0.50 From: Yuri D'Elia In-reply-to: <87pn6kmgen.fsf@gnus.org> Date: Thu, 17 Sep 2020 20:44:05 +0200 Message-ID: <87a6xoqm4q.fsf@wavexx.thregr.org> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On Thu, Sep 17 2020, Lars Ingebrigtsen wrote: > I don't use this stuff a lot, but I just don't understand how the patch > attached relates to the reported problem. > > And there's also Andreas's comment (at the end). > > Yuri, could you explain a bit more about how this patch fixes the > problem? I won't lie here, I have _no_ clue anymore what I had in mind with that code at a first glance. From unknown Sun Jun 22 20:58:56 2025 X-Loop: help-debbugs@gnu.org Subject: bug#21242: 24.5.1; python.el: should display output buffer on exceptions when using python-shell-send-region Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 18 Sep 2020 11:09:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21242 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo To: Yuri D'Elia Cc: 21242@debbugs.gnu.org Received: via spool by 21242-submit@debbugs.gnu.org id=B21242.16004272845165 (code B ref 21242); Fri, 18 Sep 2020 11:09:02 +0000 Received: (at 21242) by debbugs.gnu.org; 18 Sep 2020 11:08:04 +0000 Received: from localhost ([127.0.0.1]:41039 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kJEFI-0001LF-AN for submit@debbugs.gnu.org; Fri, 18 Sep 2020 07:08:04 -0400 Received: from quimby.gnus.org ([95.216.78.240]:52774) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kJEFG-0001Kh-9C for 21242@debbugs.gnu.org; Fri, 18 Sep 2020 07:08:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=gJI8wWv+4mNl91y91dAuWX12GRo18H0/uXN4g/Uop+E=; b=Rkepy27N5ToamBL49b6YoAXZL/ QiQY4h+Ob5brLLwyP9vfv4dS48Dm4PNa7ZnMuMSxuRU1S4O/92tgyfL2oCdM7mk11UEjnaSG/U9Gz RLSeA4ehzvPPasaLJxDb0f7GwZaKaUyiDlifutDWzXPMloBahPOKWhE7t9LeVkff9YeA=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kJEF7-0004zo-10; Fri, 18 Sep 2020 13:07:56 +0200 From: Lars Ingebrigtsen References: <55CB52B6.8020308@thregr.org> <87pn6kmgen.fsf@gnus.org> <87a6xoqm4q.fsf@wavexx.thregr.org> X-Now-Playing: Stina Nordenstam's _Dynamite_: "This Time, John" Date: Fri, 18 Sep 2020 13:07:51 +0200 In-Reply-To: <87a6xoqm4q.fsf@wavexx.thregr.org> (Yuri D'Elia's message of "Thu, 17 Sep 2020 20:44:05 +0200") Message-ID: <87lfh7jqbc.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Yuri D'Elia writes: >> Yuri, could you explain a bit more about how this patch fixes the >> problem? > > I won't lie here, I have _no_ clue anymore what I had in mind with that > code at a first glance. Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Yuri D'Elia writes: >> Yuri, could you explain a bit more about how this patch fixes the >> problem? > > I won't lie here, I have _no_ clue anymore what I had in mind with that > code at a first glance. :-) But it sounds like there probably won't be more progress here in this bug report, then, so I'm closing it. If further progress can be made, please respond to the debbugs address, and we'll reopen. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 18 07:08:09 2020 Received: (at control) by debbugs.gnu.org; 18 Sep 2020 11:08:09 +0000 Received: from localhost ([127.0.0.1]:41043 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kJEFN-0001LX-Io for submit@debbugs.gnu.org; Fri, 18 Sep 2020 07:08:09 -0400 Received: from quimby.gnus.org ([95.216.78.240]:52790) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kJEFM-0001LB-AX for control@debbugs.gnu.org; Fri, 18 Sep 2020 07:08:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=sHZVM9jr8+I6jzLUcTOz+8yLiqb8Un4YbO7SsFFUpGk=; b=PtgY8kkm2vuCrJy9PuKPNWnkP5 sVI1vhXWlUB9J777XZaGnwd66Hf6vnm88Qmz9jFGnw4ks3UDqU10+ydja8UTBAYI5Nkw0p1+2JPUp cQmx9KD8uuojfvlZjt/Pk7pbv945bCp8EBEAhEiF1fECJ319d2DmUcilKgU6PPLc/EBE=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kJEFE-0004zv-Jy for control@debbugs.gnu.org; Fri, 18 Sep 2020 13:08:02 +0200 Date: Fri, 18 Sep 2020 13:07:59 +0200 Message-Id: <87k0wrjqb4.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #21242 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: close 21242 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) close 21242 quit