Subject: bug#1276 closed by martin rudalics <[email-masked]> (Re: bug#1276: 23.0.60; select_window_norecord chokes on dead window)

From: [email-masked] (Emacs bug Tracking System)

This is an automatic notification regarding your bug report
which was filed against the emacs package:

#1276: 23.0.60; select_window_norecord chokes on dead window

It has been closed by martin rudalics <[email-masked]>.

Their explanation is attached below along with your original report.
If this explanation is unsatisfactory and you have not received a
better one in a separate message then please contact martin rudalics <[email-masked]> by
replying to this email.

-- 
1276: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=1276
Emacs Bug Tracking System
Contact [email-masked] with problems
>From [email-masked] Fri Oct 31 07:09:01 2008
Date: Fri, 31 Oct 2008 15:07:41 +0100
From: martin rudalics <[email-masked]>
To: [email-masked]
Subject: Re: bug#1276: 23.0.60; select_window_norecord chokes on dead window

Fixed as

2008-10-31  Martin Rudalics  <[email-masked]>

	* window.c [...]
	(select_window_norecord): Fix return value.  (Bug#1276)

martin

>From [email-masked] Thu Oct 30 04:41:55 2008
Date: Thu, 30 Oct 2008 12:39:58 +0100
From: martin rudalics <[email-masked]>
To: emacs-pretest-bug <[email-masked]>
Subject: 23.0.60; select_window_norecord chokes on dead window

This is a multi-part message in MIME format.
--------------000408010302030800090607
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit

To reproduce with emacs -Q evaluate the following form

(progn
    (setq debug-on-error t)
    (set-frame-height (selected-frame) 10)
    (split-window)
    (temp-buffer-resize-mode)
    (setq temp-buffer-max-height 20))

and do

    C-h v temp-buffer-max-height

Gets me

Debugger entered--Lisp error: (wrong-type-argument window-live-p #<window 3>)
    describe-variable(temp-buffer-max-height)
    call-interactively(describe-variable nil nil)

FWIW, the reason is that `fit-window-to-buffer' deletes prev_window
temp_output_buffer_show eventually wants to resurrect after running
`temp-buffer-show-hook'.  The attached patch fixes this for me.

martin, who thinks that `fit-window-to-buffer' shouldn't delete windows ...

--------------000408010302030800090607
Content-Type: text/plain;
 name="select_window_norecord.diff"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline;
 filename="select_window_norecord.diff"

*** window.c.~1.631.~	2008-10-29 10:29:14.718750000 +0100
--- window.c	2008-10-30 11:08:50.406250000 +0100
***************
*** 3643,3649 ****
  select_window_norecord (window)
       Lisp_Object window;
  {
!   return Fselect_window (window, Qt);
  }
  =0C
  Lisp_Object
--- 3643,3650 ----
  select_window_norecord (window)
       Lisp_Object window;
  {
!   return WINDOW_LIVE_P (window)
!     ? Fselect_window (window, Qt) : selected_window;
  }
  =0C
  Lisp_Object

--------------000408010302030800090607--