[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: python-mode: Selecting deleted buffer error
From: |
Stefan Monnier |
Subject: |
Re: python-mode: Selecting deleted buffer error |
Date: |
Mon, 05 Mar 2007 14:57:34 -0500 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.93 (gnu/linux) |
> Calling python-send-region (and friends) after *Python* buffer has been
> deleted can cause "Selecting deleted buffer" error. Steps to reproduce:
> (require 'python)
> (python-switch-to-python t)
> (kill-buffer "*Python*")
> (python-send-region (point-min) (point-max))
> The following patch seems to fix the problem:
> ********************************************************************************
> --- EmacsCVS/lisp/progmodes/python.el 2007-03-05 12:17:50.687500000
> +0100
> +++ Emacs/lisp/progmodes/python.el 2007-03-05 13:24:42.625000000 +0100
> @@ -1383,7 +1383,7 @@
> COMMAND should be a single statement."
> ;; (assert (not (string-match "\n" command)))
> ;; (let ((end (marker-position (process-mark (python-proc)))))
> - (with-current-buffer python-buffer (goto-char (point-max)))
> + (with-current-buffer (process-buffer (python-proc)) (goto-char
> (point-max)))
> (compilation-forget-errors)
> (python-send-string command)
> (with-current-buffer python-buffer
> ********************************************************************************
I've installed a similar patch.
Stefan