From: "Andreas Röhler" <andreas.roehler@easy-emacs.de>
To: 15647@debbugs.gnu.org
Subject: bug#15647: 24.3.50; python.el does not clean up temp file
Date: Sat, 19 Oct 2013 19:04:29 +0200 [thread overview]
Message-ID: <5262BB9D.4050802@easy-emacs.de> (raw)
In-Reply-To: <87eh7ih0pz.fsf@orion.kollektiv-hamburg.de>
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?
next prev parent reply other threads:[~2013-10-19 17:04 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-18 18:51 bug#15647: 24.3.50; python.el does not clean up temp file Jorgen Schaefer
2013-10-19 17:04 ` Andreas Röhler [this message]
2013-10-19 21:51 ` Stefan Monnier
2013-10-20 7:51 ` Andreas Röhler
2013-10-20 15:33 ` Eli Zaretskii
2013-10-20 16:25 ` Andreas Röhler
2013-10-20 18:27 ` Glenn Morris
2013-10-20 18:31 ` Glenn Morris
2013-10-20 19:12 ` Eli Zaretskii
2013-10-21 0:53 ` Glenn Morris
2013-11-23 19:39 ` Glenn Morris
2013-10-20 2:01 ` Glenn Morris
2013-11-23 3:13 ` Glenn Morris
2013-11-23 4:21 ` Glenn Morris
2013-11-23 13:34 ` Andreas Röhler
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5262BB9D.4050802@easy-emacs.de \
--to=andreas.roehler@easy-emacs.de \
--cc=15647@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.