From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Slawomir Nowaczyk Newsgroups: gmane.emacs.devel Subject: python-mode: Selecting deleted buffer error Date: Mon, 05 Mar 2007 13:52:49 +0100 Message-ID: <20070305134517.A4BC.SLAWOMIR.NOWACZYK.847@student.lu.se> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-Trace: sea.gmane.org 1173099197 18617 80.91.229.12 (5 Mar 2007 12:53:17 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 5 Mar 2007 12:53:17 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Mar 05 13:53:11 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1HOCgg-0005wt-MS for ged-emacs-devel@m.gmane.org; Mon, 05 Mar 2007 13:53:10 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HOCgg-0005Uw-5d for ged-emacs-devel@m.gmane.org; Mon, 05 Mar 2007 07:53:10 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HOCgT-0005RT-MT for emacs-devel@gnu.org; Mon, 05 Mar 2007 07:52:57 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HOCgS-0005RH-9F for emacs-devel@gnu.org; Mon, 05 Mar 2007 07:52:57 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HOCgS-0005RE-6e for emacs-devel@gnu.org; Mon, 05 Mar 2007 07:52:56 -0500 Original-Received: from himmelsborg.cs.lth.se ([130.235.16.11]) by monty-python.gnu.org with esmtp (Exim 4.52) id 1HOCgR-0001El-Gp for emacs-devel@gnu.org; Mon, 05 Mar 2007 07:52:55 -0500 Original-Received: from [127.0.0.1] (slawek@dain [130.235.16.76]) by himmelsborg.cs.lth.se (8.13.6/8.13.6/perf-jw-tr) with ESMTP id l25Cqnh0021037 for ; Mon, 5 Mar 2007 13:52:50 +0100 (CET) X-Esmandil_Citation: done X-Mailer-Plugin: Popup Memopad for Becky!2 Ver.0.02 Rev.2 X-Mailer: Becky! ver. 2.25.02 [en] X-detected-kernel: Solaris 8 (1) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:67356 Archived-At: 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.