[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

python-mode: Selecting deleted buffer error

From: Slawomir Nowaczyk
Subject: python-mode: Selecting deleted buffer error
Date: Mon, 05 Mar 2007 13:52:49 +0100


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 
     (python-send-string command)
     (with-current-buffer python-buffer


 Best wishes,
   Slawomir Nowaczyk
     ( address@hidden )

The early bird may get the worm, but the second mouse gets the cheese.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]