From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andreas =?UTF-8?Q?R=C3=B6hler?= Newsgroups: gmane.emacs.bugs Subject: bug#15647: 24.3.50; python.el does not clean up temp file Date: Sat, 19 Oct 2013 19:04:29 +0200 Message-ID: <5262BB9D.4050802@easy-emacs.de> References: <87eh7ih0pz.fsf@orion.kollektiv-hamburg.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1382202204 23978 80.91.229.3 (19 Oct 2013 17:03:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 19 Oct 2013 17:03:24 +0000 (UTC) To: 15647@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Oct 19 19:03:27 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1VXZvy-0005Vy-1L for geb-bug-gnu-emacs@m.gmane.org; Sat, 19 Oct 2013 19:03:26 +0200 Original-Received: from localhost ([::1]:33889 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VXZvx-00025D-Al for geb-bug-gnu-emacs@m.gmane.org; Sat, 19 Oct 2013 13:03:25 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49317) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VXZvk-00024Z-HZ for bug-gnu-emacs@gnu.org; Sat, 19 Oct 2013 13:03:21 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VXZva-0005Xm-Ph for bug-gnu-emacs@gnu.org; Sat, 19 Oct 2013 13:03:12 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:44104) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VXZva-0005Xi-Li for bug-gnu-emacs@gnu.org; Sat, 19 Oct 2013 13:03:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1VXZva-0000YT-7w for bug-gnu-emacs@gnu.org; Sat, 19 Oct 2013 13:03:02 -0400 X-Loop: help-debbugs@gnu.org 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 X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.13822021532096 (code B ref -1); Sat, 19 Oct 2013 17:03:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 19 Oct 2013 17:02:33 +0000 Original-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 Original-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 Original-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 Original-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 Original-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 Original-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 Original-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 Original-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 User-Agent: Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20100101 Thunderbird/24.0 In-Reply-To: <87eh7ih0pz.fsf@orion.kollektiv-hamburg.de> 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-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 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.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:79393 Archived-At: 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?