From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jorgen Schaefer Newsgroups: gmane.emacs.bugs Subject: bug#15647: 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> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1382122345 7750 80.91.229.3 (18 Oct 2013 18:52:25 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 18 Oct 2013 18:52:25 +0000 (UTC) To: 15647@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Oct 18 20:52: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 1VXF9u-0001W2-El for geb-bug-gnu-emacs@m.gmane.org; Fri, 18 Oct 2013 20:52:26 +0200 Original-Received: from localhost ([::1]:59072 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VXF9u-0005Uj-4z for geb-bug-gnu-emacs@m.gmane.org; Fri, 18 Oct 2013 14:52:26 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51992) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VXF9h-0005Kr-0Q for bug-gnu-emacs@gnu.org; Fri, 18 Oct 2013 14:52:22 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VXF9X-0004f6-Fv for bug-gnu-emacs@gnu.org; Fri, 18 Oct 2013 14:52:12 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:43181) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VXF9X-0004f0-Cl for bug-gnu-emacs@gnu.org; Fri, 18 Oct 2013 14:52:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1VXF9W-0006qb-KL for bug-gnu-emacs@gnu.org; Fri, 18 Oct 2013 14:52:02 -0400 X-Loop: help-debbugs@gnu.org 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: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.138212230526293 (code B ref -1); Fri, 18 Oct 2013 18:52:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 18 Oct 2013 18:51:45 +0000 Original-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 Original-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 Original-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 Original-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 Original-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 Original-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 Original-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 Original-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) Original-Received: by orion.kollektiv-hamburg.de (Postfix, from userid 1000) id E302432C754; Fri, 18 Oct 2013 20:51:04 +0200 (CEST) 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-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:79369 Archived-At: 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)