From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Christopher Schmidt Newsgroups: gmane.emacs.bugs Subject: bug#12034: 24.1.50; pp-display-expression may select deleted window Date: Mon, 23 Jul 2012 15:04:32 +0100 (BST) Message-ID: <87a9yqwp3n@ch.ristopher.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: dough.gmane.org 1343052344 2795 80.91.229.3 (23 Jul 2012 14:05:44 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 23 Jul 2012 14:05:44 +0000 (UTC) To: 12034@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Jul 23 16:05:41 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1StJGS-0003X3-VA for geb-bug-gnu-emacs@m.gmane.org; Mon, 23 Jul 2012 16:05:37 +0200 Original-Received: from localhost ([::1]:35370 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1StJGR-0002Bd-Uy for geb-bug-gnu-emacs@m.gmane.org; Mon, 23 Jul 2012 10:05:35 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:36852) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1StJGP-00028Y-4y for bug-gnu-emacs@gnu.org; Mon, 23 Jul 2012 10:05:34 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1StJGK-0000Ra-83 for bug-gnu-emacs@gnu.org; Mon, 23 Jul 2012 10:05:33 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:51247) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1StJGK-0000RO-4O for bug-gnu-emacs@gnu.org; Mon, 23 Jul 2012 10:05:28 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1StJMf-0005bT-U7 for bug-gnu-emacs@gnu.org; Mon, 23 Jul 2012 10:12:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Christopher Schmidt Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 23 Jul 2012 14:12:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 12034 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.134305269521498 (code B ref -1); Mon, 23 Jul 2012 14:12:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 23 Jul 2012 14:11:35 +0000 Original-Received: from localhost ([127.0.0.1]:60792 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1StJME-0005ag-5t for submit@debbugs.gnu.org; Mon, 23 Jul 2012 10:11:35 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:44428) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1StJMB-0005aZ-Uh for submit@debbugs.gnu.org; Mon, 23 Jul 2012 10:11:33 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1StJFl-00008W-0w for submit@debbugs.gnu.org; Mon, 23 Jul 2012 10:04:57 -0400 Original-Received: from lists.gnu.org ([208.118.235.17]:42845) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1StJFk-00008R-Tt for submit@debbugs.gnu.org; Mon, 23 Jul 2012 10:04:52 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:46911) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1StJFg-0000x4-Un for bug-gnu-emacs@gnu.org; Mon, 23 Jul 2012 10:04:52 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1StJFT-00005i-Ie for bug-gnu-emacs@gnu.org; Mon, 23 Jul 2012 10:04:48 -0400 Original-Received: from ristopher.com ([146.185.21.93]:40171 helo=saturn.ch.ristopher.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1StJFT-00005F-9M for bug-gnu-emacs@gnu.org; Mon, 23 Jul 2012 10:04:35 -0400 Original-Received: by saturn.ch.ristopher.com (Postfix, from userid 0) id D628D20BB8; Mon, 23 Jul 2012 15:04:32 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=ch.ristopher.com; s=mail; t=1343052272; bh=4X/h2jAwf6XRHam2v22oq9JjzRIGNWzhbf4cUD2N324=; h=From:To:Subject:Message-ID:MIME-Version:Content-Type:Date; b=F2j1R5JezqXq1G7VyFFkHgIVYUQrKlacTbzfmcs3UYU0qjAcs8Xu9jDVp6huZNa+Q epIwMjcctSB1waZFxz+1iJ+TekXLsPhTtlQN4WFrhVXnWA7px8G8sx5uN8Cf5JTFfe ul6diavWXOfC4LRu/vEjG1EeEoLCORJmQCycD1lk= Mail-Followup-To: bug-gnu-emacs@gnu.org X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:62309 Archived-At: --=-=-= Content-Type: text/plain In pp-display-expression there is this sexp: (let ((temp-buffer-show-function old-show-function) (old-selected (selected-window)) (window (display-buffer buf))) ^^^^^^^^^^^^^^^^^^^^ (goto-char (point-min)) ; expected by some hooks ... (make-frame-visible (window-frame window)) (unwind-protect (progn (select-window window) (run-hooks 'temp-buffer-show-hook)) (select-window old-selected) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ (message "See buffer %s." out-buffer-name))) An user may implement an overriding action for display-buffer that could delete old-selected. --=-=-= Content-Type: text/x-diff; charset=utf-8 Content-Disposition: inline; filename=pp-display-expression.diff Content-Transfer-Encoding: quoted-printable =3D=3D=3D modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-07-22 21:14:12 +0000 +++ lisp/ChangeLog 2012-07-23 12:49:21 +0000 @@ -1,3 +1,8 @@ +2012-07-23 Christopher Schmidt + + * emacs-lisp/pp.el (pp-display-expression): Select old selected + window only if it is still live (Bug#). + 2012-07-22 Vincent Bela=C3=AFche =20 * ses.el (ses-cell-formula-aset): New macro. =3D=3D=3D modified file 'lisp/emacs-lisp/pp.el' --- lisp/emacs-lisp/pp.el 2012-02-05 02:09:35 +0000 +++ lisp/emacs-lisp/pp.el 2012-07-23 12:44:07 +0000 @@ -110,7 +110,8 @@ (progn (select-window window) (run-hooks 'temp-buffer-show-hook)) - (select-window old-selected) + (when (window-live-p old-selected) + (select-window old-selected)) (message "See buffer %s." out-buffer-name))) (message "%s" (buffer-substring (point-min) (point))) )))))) --=-=-= Content-Type: text/plain Christopher --=-=-=--