all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* python-mode: Selecting deleted buffer error
@ 2007-03-05 12:52 Slawomir Nowaczyk
  2007-03-05 19:57 ` Stefan Monnier
  0 siblings, 1 reply; 2+ messages in thread
From: Slawomir Nowaczyk @ 2007-03-05 12:52 UTC (permalink / raw)
  To: emacs-devel

Hello,

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

********************************************************************************

-- 
 Best wishes,
   Slawomir Nowaczyk
     ( slawomir.nowaczyk.847@student.lu.se )

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: python-mode: Selecting deleted buffer error
  2007-03-05 12:52 python-mode: Selecting deleted buffer error Slawomir Nowaczyk
@ 2007-03-05 19:57 ` Stefan Monnier
  0 siblings, 0 replies; 2+ messages in thread
From: Stefan Monnier @ 2007-03-05 19:57 UTC (permalink / raw)
  To: Slawomir Nowaczyk; +Cc: emacs-devel

> 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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-03-05 19:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-05 12:52 python-mode: Selecting deleted buffer error Slawomir Nowaczyk
2007-03-05 19:57 ` Stefan Monnier

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.