From unknown Thu Sep 11 06:33:41 2025 X-Loop: help-debbugs@gnu.org Subject: bug#15647: 24.3.50; python.el does not clean up temp file Resent-From: Jorgen Schaefer Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 18 Oct 2013 18:52:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 15647 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 15647@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.138212230526293 (code B ref -1); Fri, 18 Oct 2013 18:52:02 +0000 Received: (at submit) by debbugs.gnu.org; 18 Oct 2013 18:51:45 +0000 Received: from localhost ([127.0.0.1]:57200 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VXF9F-0006q1-An for submit@debbugs.gnu.org; Fri, 18 Oct 2013 14:51:45 -0400 Received: from eggs.gnu.org ([208.118.235.92]:50101) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VXF9C-0006pl-O7 for submit@debbugs.gnu.org; Fri, 18 Oct 2013 14:51:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VXF8y-0004ay-0a for submit@debbugs.gnu.org; Fri, 18 Oct 2013 14:51:37 -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.0 required=5.0 tests=BAYES_40 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:56621) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VXF8x-0004at-M3 for submit@debbugs.gnu.org; Fri, 18 Oct 2013 14:51:27 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51806) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VXF8q-0004Pm-CE for bug-gnu-emacs@gnu.org; Fri, 18 Oct 2013 14:51:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VXF8f-0004Xa-EO for bug-gnu-emacs@gnu.org; Fri, 18 Oct 2013 14:51:20 -0400 Received: from istinn.electusmatari.com ([83.169.37.145]:33147) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VXF8f-0004XE-8q for bug-gnu-emacs@gnu.org; Fri, 18 Oct 2013 14:51:09 -0400 Received: from orion.kollektiv-hamburg.de (x2f18fd4.dyn.telefonica.de [2.241.143.212]) by istinn.electusmatari.com (Postfix) with ESMTPSA id 256F0D10002F for ; Fri, 18 Oct 2013 20:51:07 +0200 (CEST) Received: by orion.kollektiv-hamburg.de (Postfix, from userid 1000) id E302432C754; Fri, 18 Oct 2013 20:51:04 +0200 (CEST) From: Jorgen Schaefer Date: Fri, 18 Oct 2013 20:51:04 +0200 Message-ID: <87eh7ih0pz.fsf@orion.kollektiv-hamburg.de> MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x 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 (-----) python.el will use temporary files to communicate with the inferior python process. These temporary files are never cleaned up. To reproduce, simply run M-x run-python and check the temp dir. It has a "py?????" file in it. Kill the buffer and repeat, such files will accumulate. The following simple patch will delete the file after loading it. --- lisp/progmodes/python.el 2013-10-07 18:51:26 +0000 +++ lisp/progmodes/python.el 2013-10-18 18:47:02 +0000 @@ -2048,6 +2048,8 @@ (file-name (or (buffer-file-name) temp-file-name))) (with-temp-file temp-file-name (insert string) + (insert (format "\n\nimport os ; os.remove('''%s''')\n" + temp-file-name)) (delete-trailing-whitespace)) (python-shell-send-file file-name process temp-file-name)) (comint-send-string process string) From unknown Thu Sep 11 06:33:41 2025 X-Loop: help-debbugs@gnu.org Subject: bug#15647: 24.3.50; python.el does not clean up temp file Resent-From: Andreas =?UTF-8?Q?R=C3=B6hler?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 19 Oct 2013 17:03:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 15647 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: 15647@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.13822021532096 (code B ref -1); Sat, 19 Oct 2013 17:03:02 +0000 Received: (at submit) by debbugs.gnu.org; 19 Oct 2013 17:02:33 +0000 Received: from localhost ([127.0.0.1]:58123 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VXZv7-0000Xk-B3 for submit@debbugs.gnu.org; Sat, 19 Oct 2013 13:02:33 -0400 Received: from eggs.gnu.org ([208.118.235.92]:47493) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VXZv4-0000XQ-KO for submit@debbugs.gnu.org; Sat, 19 Oct 2013 13:02:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VXZup-0005TM-To for submit@debbugs.gnu.org; Sat, 19 Oct 2013 13:02:25 -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.0 required=5.0 tests=BAYES_40 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:35503) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VXZup-0005TI-Qr for submit@debbugs.gnu.org; Sat, 19 Oct 2013 13:02:15 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49187) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VXZui-00021V-GL for bug-gnu-emacs@gnu.org; Sat, 19 Oct 2013 13:02:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VXZub-0005RY-69 for bug-gnu-emacs@gnu.org; Sat, 19 Oct 2013 13:02:08 -0400 Received: from moutng.kundenserver.de ([212.227.17.9]:52952) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VXZua-0005RK-St for bug-gnu-emacs@gnu.org; Sat, 19 Oct 2013 13:02:01 -0400 Received: from purzel.sitgens (brln-4d0c77df.pool.mediaWays.net [77.12.119.223]) by mrelayeu.kundenserver.de (node=mreu1) with ESMTP (Nemesis) id 0LcC9p-1VzBR50Nsr-00jb89; Sat, 19 Oct 2013 19:01:58 +0200 Message-ID: <5262BB9D.4050802@easy-emacs.de> Date: Sat, 19 Oct 2013 19:04:29 +0200 From: Andreas =?UTF-8?Q?R=C3=B6hler?= User-Agent: Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20100101 Thunderbird/24.0 MIME-Version: 1.0 References: <87eh7ih0pz.fsf@orion.kollektiv-hamburg.de> In-Reply-To: <87eh7ih0pz.fsf@orion.kollektiv-hamburg.de> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V02:K0:cQqenCK5HBeExufaR+TIzM8P02b0YJMyEaCAsxa0Hk+ MDsDhp8QEW1NF8DAA/c40PYHq3TO11p6b+Lp3dLvdrvlk7dYsG hdskpH9xXrsAjbEhOW/4gC+xqASFsS3HgVjH+sC7iwplnuRg9k 6AcyEmymr+Qalyheyh+dVgI51mnX3o72mms7/XD/gYiJewRKDu wP42L3vaqxhS0XCq1w0h0ZKcDn4By5e/CTR3vCH46I5UKdUs9B VuEbARvWV/alXhLwgATMWt+e/Ea9QZPaxqs0e0uoX25+mbm/KL VNWzAaxteZ+0Km1fia/rxqis34mejVPUg8ptpAgnX9pGChNS6N d9jkbWdIQx7WpiyoDOvRsVWn/cZOkmZaySIwy9xMg X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.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 18.10.2013 20:51, schrieb Jorgen Schaefer: > python.el will use temporary files to communicate with the inferior > python process. These temporary files are never cleaned up. > > To reproduce, simply run M-x run-python and check the temp dir. It has a > "py?????" file in it. Kill the buffer and repeat, such files will > accumulate. > > The following simple patch will delete the file after loading it. > > > --- lisp/progmodes/python.el 2013-10-07 18:51:26 +0000 > +++ lisp/progmodes/python.el 2013-10-18 18:47:02 +0000 > @@ -2048,6 +2048,8 @@ > (file-name (or (buffer-file-name) temp-file-name))) > (with-temp-file temp-file-name > (insert string) > + (insert (format "\n\nimport os ; os.remove('''%s''')\n" > + temp-file-name)) > (delete-trailing-whitespace)) > (python-shell-send-file file-name process temp-file-name)) > (comint-send-string process string) > > > > Beside of other nasty side-effects to expect, when the code to send is extended that way: Why relying on Python process in order to delete a file? From unknown Thu Sep 11 06:33:41 2025 X-Loop: help-debbugs@gnu.org Subject: bug#15647: 24.3.50; python.el does not clean up temp file Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 19 Oct 2013 21:53:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 15647 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Andreas =?UTF-8?Q?R=C3=B6hler?= Cc: 15647@debbugs.gnu.org Received: via spool by 15647-submit@debbugs.gnu.org id=B15647.13822195236927 (code B ref 15647); Sat, 19 Oct 2013 21:53:01 +0000 Received: (at 15647) by debbugs.gnu.org; 19 Oct 2013 21:52:03 +0000 Received: from localhost ([127.0.0.1]:58310 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VXeRG-0001nb-6T for submit@debbugs.gnu.org; Sat, 19 Oct 2013 17:52:02 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.182]:1231) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VXeRD-0001n5-PX for 15647@debbugs.gnu.org; Sat, 19 Oct 2013 17:52:00 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av8EABK/CFFsr+kq/2dsb2JhbABEuzWDWRdzgh4BAQQBViMFCws0EhQYDSSIHgbBLZEKA5JakiCBXoMT X-IPAS-Result: Av8EABK/CFFsr+kq/2dsb2JhbABEuzWDWRdzgh4BAQQBViMFCws0EhQYDSSIHgbBLZEKA5JakiCBXoMT X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="35890262" Received: from 108-175-233-42.dsl.teksavvy.com (HELO pastel.home) ([108.175.233.42]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 19 Oct 2013 17:51:53 -0400 Received: by pastel.home (Postfix, from userid 20848) id 80D73608B1; Sat, 19 Oct 2013 17:51:53 -0400 (EDT) From: Stefan Monnier Message-ID: References: <87eh7ih0pz.fsf@orion.kollektiv-hamburg.de> <5262BB9D.4050802@easy-emacs.de> Date: Sat, 19 Oct 2013 17:51:53 -0400 In-Reply-To: <5262BB9D.4050802@easy-emacs.de> ("Andreas =?UTF-8?Q?R=C3=B6hler?="'s message of "Sat, 19 Oct 2013 19:04:29 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) 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: 0.3 (/) > Beside of other nasty side-effects to expect, when the code to send is > extended that way: Why relying on Python process in order to delete > a file? IIUC the purpose is to make sure it's erased and to make sure it's erased *after* the use. Whether it does that, I don't know. But doing it in Elisp would otherwise require detecting the next prompt to figure out when the temp file can be erased. Stefan From unknown Thu Sep 11 06:33:41 2025 X-Loop: help-debbugs@gnu.org Subject: bug#15647: 24.3.50; python.el does not clean up temp file Resent-From: Glenn Morris Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 20 Oct 2013 02:02:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 15647 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Jorgen Schaefer Cc: 15647@debbugs.gnu.org Received: via spool by 15647-submit@debbugs.gnu.org id=B15647.138223448531768 (code B ref 15647); Sun, 20 Oct 2013 02:02:01 +0000 Received: (at 15647) by debbugs.gnu.org; 20 Oct 2013 02:01:25 +0000 Received: from localhost ([127.0.0.1]:58436 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VXiKa-0008GJ-U7 for submit@debbugs.gnu.org; Sat, 19 Oct 2013 22:01:25 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:55653 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VXiKY-0008GB-MP for 15647@debbugs.gnu.org; Sat, 19 Oct 2013 22:01:22 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1VXiKW-000138-C7; Sat, 19 Oct 2013 22:01:20 -0400 From: Glenn Morris References: <87eh7ih0pz.fsf@orion.kollektiv-hamburg.de> X-Spook: investigation South Africa FTS2000 Belknap beanpole X-Ran: #c.poS,KDz@Dpszc&nxL7OGRx}-chS1b`I1Cuin*j$Ks?w`d-{$e38ljJOT*kC]m7)*5?? X-Hue: magenta X-Attribution: GM Date: Sat, 19 Oct 2013 22:01:20 -0400 In-Reply-To: <87eh7ih0pz.fsf@orion.kollektiv-hamburg.de> (Jorgen Schaefer's message of "Fri, 18 Oct 2013 20:51:04 +0200") Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -5.4 (-----) 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.4 (-----) Thanks. It bugs me that every `make check' in Emacs trunk leaves several python temp files behind, so I hope something like this gets applied. From unknown Thu Sep 11 06:33:41 2025 X-Loop: help-debbugs@gnu.org Subject: bug#15647: 24.3.50; python.el does not clean up temp file Resent-From: Andreas =?UTF-8?Q?R=C3=B6hler?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 20 Oct 2013 07:50:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 15647 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Stefan Monnier Cc: 15647@debbugs.gnu.org Received: via spool by 15647-submit@debbugs.gnu.org id=B15647.13822553511245 (code B ref 15647); Sun, 20 Oct 2013 07:50:02 +0000 Received: (at 15647) by debbugs.gnu.org; 20 Oct 2013 07:49:11 +0000 Received: from localhost ([127.0.0.1]:58620 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VXnl8-0000Jy-Iz for submit@debbugs.gnu.org; Sun, 20 Oct 2013 03:49:10 -0400 Received: from moutng.kundenserver.de ([212.227.126.187]:49343) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VXnl5-0000JT-NG for 15647@debbugs.gnu.org; Sun, 20 Oct 2013 03:49:08 -0400 Received: from purzel.sitgens (brln-4db9223c.pool.mediaWays.net [77.185.34.60]) by mrelayeu.kundenserver.de (node=mrbap2) with ESMTP (Nemesis) id 0LxLzO-1Vmcbu0LyU-016GvM; Sun, 20 Oct 2013 09:49:00 +0200 Message-ID: <52638B84.6070409@easy-emacs.de> Date: Sun, 20 Oct 2013 09:51:32 +0200 From: Andreas =?UTF-8?Q?R=C3=B6hler?= User-Agent: Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20100101 Thunderbird/24.0 MIME-Version: 1.0 References: <87eh7ih0pz.fsf@orion.kollektiv-hamburg.de> <5262BB9D.4050802@easy-emacs.de> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V02:K0:sbR1ekaa1NoIJfsAK0XbFAm/YRBL3otH+bG7tMZ5OHc VFitKgZGc5/f3HcFkMbhHIskMEsJt/UuBX6+YEE1+dBXsjNQiE 7Xu7vnf+P76KgcIm0bReIErdIPhI0DTkd3pVFNA08NU3XKNWKA ac1+Di5qUE9bL2BPw64RwgwClYfkjP5mg3MrEPbzr3BEB9LeZ/ eGtb6qorB4gZxab8StkkMNNYna2m/dLQqrfRym2ixNoFmS5JH4 icXaPq88wGmZvK8R7W3Tt/nw0ZbwQJ9UPpAkWQkA0aaNnCvNdx OM+JInNmTArFMlK6+stFwIRu125jB5yunqHhCe0rYqyA/G29lm /uCMcop/u5MO/mMBtiEI= X-Spam-Score: -0.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: -0.0 (/) Am 19.10.2013 23:51, schrieb Stefan Monnier: >> Beside of other nasty side-effects to expect, when the code to send is >> extended that way: Why relying on Python process in order to delete >> a file? > > IIUC the purpose is to make sure it's erased and to make sure it's > erased *after* the use. Whether it does that, I don't know. > But doing it in Elisp would otherwise require detecting the next prompt Don't think so. Once the file is sent to process, it's sent. A remaining question: what to do if the command fails? Maybe the temp file is of interest than? Which might be an argument to do it from Python, as the error might prevent further action, i.e. deleting. OTOH python-mode will do an error-checking anyway, will point to it, so deleting might made depend from this. For several reasons in favor of an Emacs Lisp solution as far as possible. Executing code should not change the state of Python more than the code demands. If a module isn't there, Emacs should it not provide it slightly - unless there is no other way to make things work. If Emacs changes the Python state without the user is alerted, error tracking of Python itself might puzzle people. Well, in the precise case it's probably rather a sanitary issue, a matter of code quality. > to figure out when the temp file can be erased. > > > Stefan > From unknown Thu Sep 11 06:33:41 2025 X-Loop: help-debbugs@gnu.org Subject: bug#15647: 24.3.50; python.el does not clean up temp file Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 20 Oct 2013 15:34:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 15647 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Andreas =?UTF-8?Q?R=C3=B6hler?= Cc: 15647@debbugs.gnu.org, monnier@iro.umontreal.ca Reply-To: Eli Zaretskii Received: via spool by 15647-submit@debbugs.gnu.org id=B15647.138228323718039 (code B ref 15647); Sun, 20 Oct 2013 15:34:01 +0000 Received: (at 15647) by debbugs.gnu.org; 20 Oct 2013 15:33:57 +0000 Received: from localhost ([127.0.0.1]:59260 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VXv0u-0004gs-Fp for submit@debbugs.gnu.org; Sun, 20 Oct 2013 11:33:56 -0400 Received: from mtaout20.012.net.il ([80.179.55.166]:41975) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VXv0r-0004gc-FH for 15647@debbugs.gnu.org; Sun, 20 Oct 2013 11:33:55 -0400 Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0MUZ00C004EN6Y00@a-mtaout20.012.net.il> for 15647@debbugs.gnu.org; Sun, 20 Oct 2013 18:33:44 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MUZ00BFY4K7U4B0@a-mtaout20.012.net.il>; Sun, 20 Oct 2013 18:33:44 +0300 (IDT) Date: Sun, 20 Oct 2013 18:33:53 +0300 From: Eli Zaretskii In-reply-to: <52638B84.6070409@easy-emacs.de> X-012-Sender: halo1@inter.net.il Message-id: <83li1oklcu.fsf@gnu.org> MIME-version: 1.0 Content-type: text/plain; charset=iso-8859-15 Content-transfer-encoding: 8BIT References: <87eh7ih0pz.fsf@orion.kollektiv-hamburg.de> <5262BB9D.4050802@easy-emacs.de> <52638B84.6070409@easy-emacs.de> X-Spam-Score: 1.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: 1.0 (+) > Date: Sun, 20 Oct 2013 09:51:32 +0200 > From: Andreas Röhler > Cc: 15647@debbugs.gnu.org > > > IIUC the purpose is to make sure it's erased and to make sure it's > > erased *after* the use. Whether it does that, I don't know. > > But doing it in Elisp would otherwise require detecting the next prompt > > Don't think so. Once the file is sent to process, it's sent. That's Unix-speak: deleting a file that is potentially in use. Outside of Posix, deleting a file immediately after submitting it to a process will at best fail (because the process is still using it), and at worst cause trouble (because the process didn't yet have enough time to even open the file). In fact, in this case, even on Unix this proposal will cause trouble, because the command sent to Python might take time to execute on the Python side, and we might already have deleted the file when Python tries to open it. I think in this case the better place to delete the file is in python-shell-send-file, as part of the command sent to Python, because that's where we know that the file was used up and closed by the Python interpreter. > A remaining question: what to do if the command fails? Maybe the temp file is of interest than? > Which might be an argument to do it from Python, as the error might prevent further action, i.e. deleting. No, it's an argument to add independent logging facilities to python.el, IMO. IOW, if python.el wants to have debugging features, it should have them without relying on the Python interpreter and without interfering with the "normal" workflow (whereby the file is deleted after being used). Relying on a temporary file to remain in the filesystem for prolonged periods of time is not a good idea anyway. From unknown Thu Sep 11 06:33:41 2025 X-Loop: help-debbugs@gnu.org Subject: bug#15647: 24.3.50; python.el does not clean up temp file Resent-From: Andreas =?UTF-8?Q?R=C3=B6hler?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 20 Oct 2013 16:24:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 15647 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Eli Zaretskii Cc: 15647@debbugs.gnu.org, monnier@iro.umontreal.ca Received: via spool by 15647-submit@debbugs.gnu.org id=B15647.138228619522712 (code B ref 15647); Sun, 20 Oct 2013 16:24:01 +0000 Received: (at 15647) by debbugs.gnu.org; 20 Oct 2013 16:23:15 +0000 Received: from localhost ([127.0.0.1]:59304 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VXvmc-0005uF-5b for submit@debbugs.gnu.org; Sun, 20 Oct 2013 12:23:15 -0400 Received: from moutng.kundenserver.de ([212.227.126.171]:49419) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VXvmZ-0005ty-Ix for 15647@debbugs.gnu.org; Sun, 20 Oct 2013 12:23:12 -0400 Received: from purzel.sitgens (brln-4db9223c.pool.mediaWays.net [77.185.34.60]) by mrelayeu.kundenserver.de (node=mreu2) with ESMTP (Nemesis) id 0MCuUJ-1VPzHh0pcZ-009NnU; Sun, 20 Oct 2013 18:23:03 +0200 Message-ID: <526403F9.6020209@easy-emacs.de> Date: Sun, 20 Oct 2013 18:25:29 +0200 From: Andreas =?UTF-8?Q?R=C3=B6hler?= User-Agent: Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20100101 Thunderbird/24.0 MIME-Version: 1.0 References: <87eh7ih0pz.fsf@orion.kollektiv-hamburg.de> <5262BB9D.4050802@easy-emacs.de> <52638B84.6070409@easy-emacs.de> <83li1oklcu.fsf@gnu.org> In-Reply-To: <83li1oklcu.fsf@gnu.org> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 8bit X-Provags-ID: V02:K0:L3HRIbKgeGeco5ADbXhrFEdtXy6G64X1wrbyRauBU6X n/iMpsUZqsofEMDVXx0YiN8mK0gRK4OahXNZ+qU7lq1yNCCP3k nvhNGFYN8DkwBmdnJL4pz2oBbb+D2QGpCwx0GdT8UBw3dwHb+R a9GmE/314T5CFoXAGusOgdNT8pRC0pBe+qyAEc7DbDUV8LqLMD Kc4QPQ7vTJphqEUWnmRdqhlogBBZe3tf4NwfxP0C/HFtPzwkC7 qNUeYc9cHUW8geqtXMEdTdwYrPLWoek32fLEQknp41U23fUhv7 kOtTuERcKd94ggAZ6+sgwwcNfk5r7wg/4K1jJQhRI+q/Hho8GL LP6VIeR6/XXbBM+YImHo= X-Spam-Score: -0.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: -0.0 (/) Am 20.10.2013 17:33, schrieb Eli Zaretskii: >> Date: Sun, 20 Oct 2013 09:51:32 +0200 >> From: Andreas Röhler >> Cc: 15647@debbugs.gnu.org >> >>> IIUC the purpose is to make sure it's erased and to make sure it's >>> erased *after* the use. Whether it does that, I don't know. >>> But doing it in Elisp would otherwise require detecting the next prompt >> >> Don't think so. Once the file is sent to process, it's sent. > > That's Unix-speak: deleting a file that is potentially in use. > Outside of Posix, deleting a file immediately after submitting it to a > process will at best fail (because the process is still using it), and > at worst cause trouble (because the process didn't yet have enough > time to even open the file). > > In fact, in this case, even on Unix this proposal will cause trouble, > because the command sent to Python might take time to execute on the > Python side, and we might already have deleted the file when Python > tries to open it. > > I think in this case the better place to delete the file is in > python-shell-send-file, as part of the command sent to Python, because > that's where we know that the file was used up and closed by the > Python interpreter. > Agreed. >> A remaining question: what to do if the command fails? Maybe the temp file is of interest than? >> Which might be an argument to do it from Python, as the error might prevent further action, i.e. deleting. > > No, it's an argument to add independent logging facilities to > python.el, IMO. IOW, if python.el wants to have debugging features, > it should have them without relying on the Python interpreter and > without interfering with the "normal" workflow (whereby the file is > deleted after being used). Relying on a temporary file to remain in > the filesystem for prolonged periods of time is not a good idea > anyway. > Agreed also. However don't think it's a big issue if the one or other file remains. Just it should not happen all the time. BTW python-mode.el does this behind an unwind-protect, so errors should not go into the way. From unknown Thu Sep 11 06:33:41 2025 X-Loop: help-debbugs@gnu.org Subject: bug#15647: 24.3.50; python.el does not clean up temp file Resent-From: Glenn Morris Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 20 Oct 2013 18:28:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 15647 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Eli Zaretskii Cc: 15647@debbugs.gnu.org, Andreas =?UTF-8?Q?R=C3=B6hler?= Received: via spool by 15647-submit@debbugs.gnu.org id=B15647.13822936701707 (code B ref 15647); Sun, 20 Oct 2013 18:28:02 +0000 Received: (at 15647) by debbugs.gnu.org; 20 Oct 2013 18:27:50 +0000 Received: from localhost ([127.0.0.1]:59389 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VXxjB-0000RS-Rl for submit@debbugs.gnu.org; Sun, 20 Oct 2013 14:27:50 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:35774 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VXxj9-0000RK-RW for 15647@debbugs.gnu.org; Sun, 20 Oct 2013 14:27:48 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1VXxj8-0003UO-Ik; Sun, 20 Oct 2013 14:27:46 -0400 From: Glenn Morris References: <87eh7ih0pz.fsf@orion.kollektiv-hamburg.de> <5262BB9D.4050802@easy-emacs.de> <52638B84.6070409@easy-emacs.de> <83li1oklcu.fsf@gnu.org> X-Spook: 64 Vauxhall Cross militia Uzbekistan Waco, Texas Verisign X-Ran: IK6VvyIwa}.t@fIWm;}8!\F[a}=TfQL$,?/~hX17ma)gQ~B8@X.^5&K8QC0HE]I6L9HP.# X-Hue: yellow X-Attribution: GM Date: Sun, 20 Oct 2013 14:27:46 -0400 In-Reply-To: <83li1oklcu.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 20 Oct 2013 18:33:53 +0300") Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -5.4 (-----) 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.4 (-----) Eli Zaretskii wrote: > In fact, in this case, even on Unix this proposal will cause trouble, > because the command sent to Python might take time to execute on the > Python side, and we might already have deleted the file when Python > tries to open it. Whut? It's python itself that deletes the file, as the last thing in the file. So it's already done whatever it was supposed to actually do. It's like a self-deleting shell script. FWIW, the patch looks fine to me (I say this was zero testing of it). From unknown Thu Sep 11 06:33:41 2025 X-Loop: help-debbugs@gnu.org Subject: bug#15647: 24.3.50; python.el does not clean up temp file Resent-From: Glenn Morris Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 20 Oct 2013 18:32:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 15647 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: 15647@debbugs.gnu.org Received: via spool by 15647-submit@debbugs.gnu.org id=B15647.13822939152156 (code B ref 15647); Sun, 20 Oct 2013 18:32:02 +0000 Received: (at 15647) by debbugs.gnu.org; 20 Oct 2013 18:31:55 +0000 Received: from localhost ([127.0.0.1]:59393 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VXxn8-0000Yh-SP for submit@debbugs.gnu.org; Sun, 20 Oct 2013 14:31:55 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:35820 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VXxn6-0000YY-Ul for 15647@debbugs.gnu.org; Sun, 20 Oct 2013 14:31:53 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1VXxn6-000266-7i; Sun, 20 Oct 2013 14:31:52 -0400 From: Glenn Morris References: <87eh7ih0pz.fsf@orion.kollektiv-hamburg.de> <5262BB9D.4050802@easy-emacs.de> <52638B84.6070409@easy-emacs.de> <83li1oklcu.fsf@gnu.org> X-Spook: Mossad cracking pipeline USCODE ISEC Guantanamo freedom X-Ran: 8UQL$7b=0|Z2W@,D'Du.DDAV++K4d_"4}`Im4rs'}dMNL#2Wn$(%%pBw*jViGQ#hA)^c&\ X-Hue: red X-Attribution: GM Date: Sun, 20 Oct 2013 14:31:51 -0400 In-Reply-To: (Glenn Morris's message of "Sun, 20 Oct 2013 14:27:46 -0400") Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -5.4 (-----) 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.4 (-----) Glenn Morris wrote: > FWIW, the patch looks fine to me (I say this was zero testing of it). s/was/with From unknown Thu Sep 11 06:33:41 2025 X-Loop: help-debbugs@gnu.org Subject: bug#15647: 24.3.50; python.el does not clean up temp file Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 20 Oct 2013 19:13:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 15647 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Glenn Morris Cc: 15647@debbugs.gnu.org, andreas.roehler@easy-emacs.de Reply-To: Eli Zaretskii Received: via spool by 15647-submit@debbugs.gnu.org id=B15647.13822963375850 (code B ref 15647); Sun, 20 Oct 2013 19:13:02 +0000 Received: (at 15647) by debbugs.gnu.org; 20 Oct 2013 19:12:17 +0000 Received: from localhost ([127.0.0.1]:59411 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VXyQC-0001WI-Mt for submit@debbugs.gnu.org; Sun, 20 Oct 2013 15:12:17 -0400 Received: from mtaout23.012.net.il ([80.179.55.175]:38650) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VXyQ9-0001W3-D1 for 15647@debbugs.gnu.org; Sun, 20 Oct 2013 15:12:15 -0400 Received: from conversion-daemon.a-mtaout23.012.net.il by a-mtaout23.012.net.il (HyperSendmail v2007.08) id <0MUZ00H00EE9RK00@a-mtaout23.012.net.il> for 15647@debbugs.gnu.org; Sun, 20 Oct 2013 22:12:06 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout23.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MUZ00H9CEO4OK60@a-mtaout23.012.net.il>; Sun, 20 Oct 2013 22:12:06 +0300 (IDT) Date: Sun, 20 Oct 2013 22:12:13 +0300 From: Eli Zaretskii In-reply-to: X-012-Sender: halo1@inter.net.il Message-id: <83eh7flpte.fsf@gnu.org> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-transfer-encoding: 8BIT References: <87eh7ih0pz.fsf@orion.kollektiv-hamburg.de> <5262BB9D.4050802@easy-emacs.de> <52638B84.6070409@easy-emacs.de> <83li1oklcu.fsf@gnu.org> X-Spam-Score: 1.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: 1.0 (+) > From: Glenn Morris > Cc: Andreas Röhler , > 15647@debbugs.gnu.org > Date: Sun, 20 Oct 2013 14:27:46 -0400 > > Eli Zaretskii wrote: > > > In fact, in this case, even on Unix this proposal will cause trouble, > > because the command sent to Python might take time to execute on the > > Python side, and we might already have deleted the file when Python > > tries to open it. > > Whut? > It's python itself that deletes the file, as the last thing in the file. I was talking about Andreas's proposal, not about the patch. Sorry for being unclear. From unknown Thu Sep 11 06:33:41 2025 X-Loop: help-debbugs@gnu.org Subject: bug#15647: 24.3.50; python.el does not clean up temp file Resent-From: Glenn Morris Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 21 Oct 2013 00:55:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 15647 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Eli Zaretskii Cc: 15647@debbugs.gnu.org Received: via spool by 15647-submit@debbugs.gnu.org id=B15647.13823168434506 (code B ref 15647); Mon, 21 Oct 2013 00:55:01 +0000 Received: (at 15647) by debbugs.gnu.org; 21 Oct 2013 00:54:03 +0000 Received: from localhost ([127.0.0.1]:59639 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VY3kx-0001Ac-33 for submit@debbugs.gnu.org; Sun, 20 Oct 2013 20:54:03 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:40154 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VY3ku-0001AB-HW for 15647@debbugs.gnu.org; Sun, 20 Oct 2013 20:54:01 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1VY3kt-0006aN-11; Sun, 20 Oct 2013 20:53:59 -0400 From: Glenn Morris References: <87eh7ih0pz.fsf@orion.kollektiv-hamburg.de> <5262BB9D.4050802@easy-emacs.de> <52638B84.6070409@easy-emacs.de> <83li1oklcu.fsf@gnu.org> <83eh7flpte.fsf@gnu.org> X-Spook: constitution Albright Waco, Texas PGP advisors emc Hamas X-Ran: lPZ|8"xdl2A02~NCylK|,]@>Ync5/'tx=EPLA`MmO"[*JHX0'^w35yshFW!kpiU@N4*`<" X-Hue: magenta X-Attribution: GM Date: Sun, 20 Oct 2013 20:53:58 -0400 In-Reply-To: <83eh7flpte.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 20 Oct 2013 22:12:13 +0300") Message-ID: <9wd2mzsau1.fsf@fencepost.gnu.org> User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -5.4 (-----) 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.4 (-----) Eli Zaretskii wrote: > I was talking about Andreas's proposal, not about the patch. Sorry > for being unclear. Probably my bad for not reading properly. From unknown Thu Sep 11 06:33:41 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.503 (Entity 5.503) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Jorgen Schaefer Subject: bug#15647: closed (Re: bug#15647: 24.3.50; python.el does not clean up temp file) Message-ID: References: <87eh7ih0pz.fsf@orion.kollektiv-hamburg.de> X-Gnu-PR-Message: they-closed 15647 X-Gnu-PR-Package: emacs X-Gnu-PR-Keywords: patch Reply-To: 15647@debbugs.gnu.org Date: Sat, 23 Nov 2013 03:14:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1385176442-3991-1" This is a multi-part message in MIME format... ------------=_1385176442-3991-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #15647: 24.3.50; python.el does not clean up temp file which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 15647@debbugs.gnu.org. --=20 15647: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D15647 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1385176442-3991-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 15647-done) by debbugs.gnu.org; 23 Nov 2013 03:13:20 +0000 Received: from localhost ([127.0.0.1]:39182 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Vk3ep-00011J-Rj for submit@debbugs.gnu.org; Fri, 22 Nov 2013 22:13:20 -0500 Received: from fencepost.gnu.org ([208.118.235.10]:39898 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Vk3eo-00011B-6S for 15647-done@debbugs.gnu.org; Fri, 22 Nov 2013 22:13:18 -0500 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1Vk3en-0004gi-O1; Fri, 22 Nov 2013 22:13:17 -0500 From: Glenn Morris To: 15647-done@debbugs.gnu.org Subject: Re: bug#15647: 24.3.50; python.el does not clean up temp file References: <87eh7ih0pz.fsf@orion.kollektiv-hamburg.de> X-Spook: virus warfare Geraldton Leitrim CNCIS threat TWA X-Ran: kh'J8Zs2VUfnxpWB`sf0ecZ/WXpBow*lES~*L?c:2Z:m0R~%!P;cGnQHzf}@;G2^%2h'x= X-Hue: black X-Debbugs-No-Ack: yes X-Attribution: GM Date: Fri, 22 Nov 2013 22:13:17 -0500 In-Reply-To: <87eh7ih0pz.fsf@orion.kollektiv-hamburg.de> (Jorgen Schaefer's message of "Fri, 18 Oct 2013 20:51:04 +0200") Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -5.5 (-----) X-Debbugs-Envelope-To: 15647-done 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.5 (-----) Version: 24.4 Thanks; applied. ------------=_1385176442-3991-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 18 Oct 2013 18:51:45 +0000 Received: from localhost ([127.0.0.1]:57200 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VXF9F-0006q1-An for submit@debbugs.gnu.org; Fri, 18 Oct 2013 14:51:45 -0400 Received: from eggs.gnu.org ([208.118.235.92]:50101) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VXF9C-0006pl-O7 for submit@debbugs.gnu.org; Fri, 18 Oct 2013 14:51:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VXF8y-0004ay-0a for submit@debbugs.gnu.org; Fri, 18 Oct 2013 14:51:37 -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.0 required=5.0 tests=BAYES_40 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:56621) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VXF8x-0004at-M3 for submit@debbugs.gnu.org; Fri, 18 Oct 2013 14:51:27 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51806) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VXF8q-0004Pm-CE for bug-gnu-emacs@gnu.org; Fri, 18 Oct 2013 14:51:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VXF8f-0004Xa-EO for bug-gnu-emacs@gnu.org; Fri, 18 Oct 2013 14:51:20 -0400 Received: from istinn.electusmatari.com ([83.169.37.145]:33147) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VXF8f-0004XE-8q for bug-gnu-emacs@gnu.org; Fri, 18 Oct 2013 14:51:09 -0400 Received: from orion.kollektiv-hamburg.de (x2f18fd4.dyn.telefonica.de [2.241.143.212]) by istinn.electusmatari.com (Postfix) with ESMTPSA id 256F0D10002F for ; Fri, 18 Oct 2013 20:51:07 +0200 (CEST) Received: by orion.kollektiv-hamburg.de (Postfix, from userid 1000) id E302432C754; Fri, 18 Oct 2013 20:51:04 +0200 (CEST) From: Jorgen Schaefer To: bug-gnu-emacs@gnu.org Subject: 24.3.50; python.el does not clean up temp file Date: Fri, 18 Oct 2013 20:51:04 +0200 Message-ID: <87eh7ih0pz.fsf@orion.kollektiv-hamburg.de> MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x 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-Debbugs-Envelope-To: submit 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 (-----) python.el will use temporary files to communicate with the inferior python process. These temporary files are never cleaned up. To reproduce, simply run M-x run-python and check the temp dir. It has a "py?????" file in it. Kill the buffer and repeat, such files will accumulate. The following simple patch will delete the file after loading it. --- lisp/progmodes/python.el 2013-10-07 18:51:26 +0000 +++ lisp/progmodes/python.el 2013-10-18 18:47:02 +0000 @@ -2048,6 +2048,8 @@ (file-name (or (buffer-file-name) temp-file-name))) (with-temp-file temp-file-name (insert string) + (insert (format "\n\nimport os ; os.remove('''%s''')\n" + temp-file-name)) (delete-trailing-whitespace)) (python-shell-send-file file-name process temp-file-name)) (comint-send-string process string) ------------=_1385176442-3991-1-- From unknown Thu Sep 11 06:33:41 2025 X-Loop: help-debbugs@gnu.org Subject: bug#15647: 24.3.50; python.el does not clean up temp file Resent-From: Glenn Morris Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 23 Nov 2013 04:22:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 15647 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: 15647@debbugs.gnu.org Cc: forcer@forcix.cx Received: via spool by 15647-submit@debbugs.gnu.org id=B15647.138518047419228 (code B ref 15647); Sat, 23 Nov 2013 04:22:02 +0000 Received: (at 15647) by debbugs.gnu.org; 23 Nov 2013 04:21:14 +0000 Received: from localhost ([127.0.0.1]:39196 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Vk4iY-000502-Du for submit@debbugs.gnu.org; Fri, 22 Nov 2013 23:21:14 -0500 Received: from fencepost.gnu.org ([208.118.235.10]:41107 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Vk4iV-0004zt-Sd for 15647@debbugs.gnu.org; Fri, 22 Nov 2013 23:21:12 -0500 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1Vk4iU-0006ae-Ue; Fri, 22 Nov 2013 23:21:10 -0500 From: Glenn Morris References: <87eh7ih0pz.fsf@orion.kollektiv-hamburg.de> X-Spook: CID Afghanistan csim NWO kibo Merlin top secret Saddam X-Ran: 2(AG:`|hH%ojAwh:"BM:~)Td^@TCd2:Ik^U#sRzF!+qLh&*?;/vE<5/qBdJjn6@mSJ.6f` X-Hue: black X-Attribution: GM Date: Fri, 22 Nov 2013 23:21:10 -0500 In-Reply-To: (Glenn Morris's message of "Fri, 22 Nov 2013 22:13:17 -0500") Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -5.5 (-----) 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.5 (-----) Actually on second thought, un-applied and reopened. From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 22 23:23:33 2013 Received: (at control) by debbugs.gnu.org; 23 Nov 2013 04:23:33 +0000 Received: from localhost ([127.0.0.1]:39208 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Vk4km-00054Y-My for submit@debbugs.gnu.org; Fri, 22 Nov 2013 23:23:32 -0500 Received: from fencepost.gnu.org ([208.118.235.10]:41156 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Vk4kl-00054Q-Ch for control@debbugs.gnu.org; Fri, 22 Nov 2013 23:23:31 -0500 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1Vk4kk-0006si-Vq for control@debbugs.gnu.org; Fri, 22 Nov 2013 23:23:31 -0500 Date: Fri, 22 Nov 2013 23:23:30 -0500 Message-Id: Subject: control message for bug 15647 To: X-Mailer: mail (GNU Mailutils 2.1) From: Glenn Morris X-Spam-Score: -5.5 (-----) X-Debbugs-Envelope-To: control 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.5 (-----) found 15647 24.4 From unknown Thu Sep 11 06:33:41 2025 X-Loop: help-debbugs@gnu.org Subject: bug#15647: 24.3.50; python.el does not clean up temp file Resent-From: Andreas =?UTF-8?Q?R=C3=B6hler?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 23 Nov 2013 13:33:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 15647 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: 15647@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.138521355117042 (code B ref -1); Sat, 23 Nov 2013 13:33:02 +0000 Received: (at submit) by debbugs.gnu.org; 23 Nov 2013 13:32:31 +0000 Received: from localhost ([127.0.0.1]:39663 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VkDK2-0004Qm-9X for submit@debbugs.gnu.org; Sat, 23 Nov 2013 08:32:30 -0500 Received: from eggs.gnu.org ([208.118.235.92]:57167) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VkDK0-0004Qa-H4 for submit@debbugs.gnu.org; Sat, 23 Nov 2013 08:32:29 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VkDJl-0003u0-Q3 for submit@debbugs.gnu.org; Sat, 23 Nov 2013 08:32:23 -0500 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]:36731) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VkDJl-0003tw-NI for submit@debbugs.gnu.org; Sat, 23 Nov 2013 08:32:13 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58861) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VkDJe-0002Q0-ER for bug-gnu-emacs@gnu.org; Sat, 23 Nov 2013 08:32:13 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VkDJX-0003qQ-5t for bug-gnu-emacs@gnu.org; Sat, 23 Nov 2013 08:32:06 -0500 Received: from moutng.kundenserver.de ([212.227.126.186]:57398) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VkDJW-0003qC-Ru for bug-gnu-emacs@gnu.org; Sat, 23 Nov 2013 08:31:59 -0500 Received: from purzel.sitgens (brln-4db93ef8.pool.mediaWays.net [77.185.62.248]) by mrelayeu.kundenserver.de (node=mrbap1) with ESMTP (Nemesis) id 0MRjb7-1WD76Q3SKv-00TWTX; Sat, 23 Nov 2013 14:31:56 +0100 Message-ID: <5290AEFF.3080200@easy-emacs.de> Date: Sat, 23 Nov 2013 14:34:55 +0100 From: Andreas =?UTF-8?Q?R=C3=B6hler?= User-Agent: Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 MIME-Version: 1.0 References: <87eh7ih0pz.fsf@orion.kollektiv-hamburg.de> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V02:K0:FxpDO0E20tQntAGvMPQELljEtEyqAM7OKTVuipdJrDl C/CS29gtVWuH1MfpN6oPqoBJ6KxjBG5o5V+nL/mbiZme9Hpifr 7OECMLWddKGLHW/8wV1KpWIcd3EPBQHkdwe27PrF4jv6vNj0Lo mVh07PpxhKuke5NdMHondf4gMKoBnmTrZJIDyhpRnHEfS9PQWL Jk4IdzhJW52Ur5ACkYiOJM5odQkc8Ga16jvZMH0iIMMwmciJpV hYTySow9kLKfgPnDFdv2dMs1ZlBtg6dTWkSCvtnW4ywjZCudMw WSFhlVd7kztQ1aPQrH2YUFA1svF41KjD+oylUSF33fxs+R0+2I I4CX8hwWUmneTG9WcJd1epEEL6tcweYJwCnYTuXe2 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.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 23.11.2013 05:21, schrieb Glenn Morris: > > Actually on second thought, un-applied and reopened. > > > > Seems wise. Nonetheless, may you tell your reflections? From unknown Thu Sep 11 06:33:41 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.503 (Entity 5.503) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Jorgen Schaefer Subject: bug#15647: closed (Re: bug#15647: 24.3.50; python.el does not clean up temp file) Message-ID: References: <87eh7ih0pz.fsf@orion.kollektiv-hamburg.de> X-Gnu-PR-Message: they-closed 15647 X-Gnu-PR-Package: emacs X-Gnu-PR-Keywords: patch Reply-To: 15647@debbugs.gnu.org Date: Sat, 23 Nov 2013 19:40:06 +0000 Content-Type: multipart/mixed; boundary="----------=_1385235606-20080-1" This is a multi-part message in MIME format... ------------=_1385235606-20080-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #15647: 24.3.50; python.el does not clean up temp file which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 15647@debbugs.gnu.org. --=20 15647: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D15647 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1385235606-20080-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 15647-done) by debbugs.gnu.org; 23 Nov 2013 19:39:56 +0000 Received: from localhost ([127.0.0.1]:40442 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VkJ3c-0005DX-DJ for submit@debbugs.gnu.org; Sat, 23 Nov 2013 14:39:56 -0500 Received: from fencepost.gnu.org ([208.118.235.10]:57030 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VkJ3Z-0005DP-O6 for 15647-done@debbugs.gnu.org; Sat, 23 Nov 2013 14:39:54 -0500 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1VkJ3Z-0002eh-5z; Sat, 23 Nov 2013 14:39:53 -0500 From: Glenn Morris To: 15647-done@debbugs.gnu.org Subject: Re: bug#15647: 24.3.50; python.el does not clean up temp file References: <87eh7ih0pz.fsf@orion.kollektiv-hamburg.de> <5262BB9D.4050802@easy-emacs.de> <52638B84.6070409@easy-emacs.de> <83li1oklcu.fsf@gnu.org> X-Spook: MDA Sears Tower UFO enemy of the state Area 51 satellite X-Ran: Su1vZ&/@JtCS&~%w)9c,B,<4M@r"7Akr).<,J.cMK#`7&2qf1g.**?Y~YC'12~H}Y&Y@GQ X-Hue: cyan X-Attribution: GM Date: Sat, 23 Nov 2013 14:39:52 -0500 In-Reply-To: <83li1oklcu.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 20 Oct 2013 18:33:53 +0300") Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -5.5 (-----) X-Debbugs-Envelope-To: 15647-done 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.5 (-----) Version: 24.4 Eli Zaretskii wrote: > I think in this case the better place to delete the file is in > python-shell-send-file, as part of the command sent to Python, because > that's where we know that the file was used up and closed by the > Python interpreter. Agreed; done. ------------=_1385235606-20080-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 18 Oct 2013 18:51:45 +0000 Received: from localhost ([127.0.0.1]:57200 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VXF9F-0006q1-An for submit@debbugs.gnu.org; Fri, 18 Oct 2013 14:51:45 -0400 Received: from eggs.gnu.org ([208.118.235.92]:50101) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VXF9C-0006pl-O7 for submit@debbugs.gnu.org; Fri, 18 Oct 2013 14:51:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VXF8y-0004ay-0a for submit@debbugs.gnu.org; Fri, 18 Oct 2013 14:51:37 -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.0 required=5.0 tests=BAYES_40 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:56621) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VXF8x-0004at-M3 for submit@debbugs.gnu.org; Fri, 18 Oct 2013 14:51:27 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51806) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VXF8q-0004Pm-CE for bug-gnu-emacs@gnu.org; Fri, 18 Oct 2013 14:51:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VXF8f-0004Xa-EO for bug-gnu-emacs@gnu.org; Fri, 18 Oct 2013 14:51:20 -0400 Received: from istinn.electusmatari.com ([83.169.37.145]:33147) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VXF8f-0004XE-8q for bug-gnu-emacs@gnu.org; Fri, 18 Oct 2013 14:51:09 -0400 Received: from orion.kollektiv-hamburg.de (x2f18fd4.dyn.telefonica.de [2.241.143.212]) by istinn.electusmatari.com (Postfix) with ESMTPSA id 256F0D10002F for ; Fri, 18 Oct 2013 20:51:07 +0200 (CEST) Received: by orion.kollektiv-hamburg.de (Postfix, from userid 1000) id E302432C754; Fri, 18 Oct 2013 20:51:04 +0200 (CEST) From: Jorgen Schaefer To: bug-gnu-emacs@gnu.org Subject: 24.3.50; python.el does not clean up temp file Date: Fri, 18 Oct 2013 20:51:04 +0200 Message-ID: <87eh7ih0pz.fsf@orion.kollektiv-hamburg.de> MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x 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-Debbugs-Envelope-To: submit 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 (-----) python.el will use temporary files to communicate with the inferior python process. These temporary files are never cleaned up. To reproduce, simply run M-x run-python and check the temp dir. It has a "py?????" file in it. Kill the buffer and repeat, such files will accumulate. The following simple patch will delete the file after loading it. --- lisp/progmodes/python.el 2013-10-07 18:51:26 +0000 +++ lisp/progmodes/python.el 2013-10-18 18:47:02 +0000 @@ -2048,6 +2048,8 @@ (file-name (or (buffer-file-name) temp-file-name))) (with-temp-file temp-file-name (insert string) + (insert (format "\n\nimport os ; os.remove('''%s''')\n" + temp-file-name)) (delete-trailing-whitespace)) (python-shell-send-file file-name process temp-file-name)) (comint-send-string process string) ------------=_1385235606-20080-1--