Subject: Re: bug#9499: 24.0.50; M-x occur + M-x next-error window config problem

From: Chong Yidong <[email-masked]>
Date: Wed, 14 Sep 2011 11:15:00 -0400

martin rudalics <[email-masked]> writes:

>> Start emacs, switch to the *scratch* buffer
>> M-x occur RET
>> th RET
>> M-x next-error
>>
>> The *Occur* buffer is replaced by another view of the *scratch* buffer
>> I expect the *Occur* buffer to stay
>
> It's because
>
>     (pop-to-buffer (marker-buffer pos) t)
>
> in `occur-mode-goto-occurrence' has problems reusing the *scratch*
> window.  More precisely, because the *scratch* window is selected and
> the second argument t means to not use the selected window.

Sorry, this was my mistake.  The second arg should not be t in here.
Fixed in trunk.