From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chong Yidong Newsgroups: gmane.emacs.devel Subject: Re: 23.0.60; doc-view: occasionally stuck at welcome screen Date: Mon, 21 Apr 2008 01:36:47 -0400 Message-ID: <87zlrnbwgg.fsf@stupidchicken.com> References: <20080415162635.832C6809A05@mt-computer.local> <87hce22u5j.fsf@member.fsf.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1208756223 20491 80.91.229.12 (21 Apr 2008 05:37:03 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 21 Apr 2008 05:37:03 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Apr 21 07:37:37 2008 connect(): Connection refused 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 1Jnoid-0006Pk-Dy for ged-emacs-devel@m.gmane.org; Mon, 21 Apr 2008 07:37:35 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Jnohy-0001C2-5S for ged-emacs-devel@m.gmane.org; Mon, 21 Apr 2008 01:36:54 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Jnoht-00019M-2G for emacs-devel@gnu.org; Mon, 21 Apr 2008 01:36:49 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Jnohs-00017N-29 for emacs-devel@gnu.org; Mon, 21 Apr 2008 01:36:48 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Jnohr-00017A-Vf for emacs-devel@gnu.org; Mon, 21 Apr 2008 01:36:47 -0400 Original-Received: from c-98-216-111-182.hsd1.ma.comcast.net ([98.216.111.182] helo=furry) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Jnohr-00084H-NC for emacs-devel@gnu.org; Mon, 21 Apr 2008 01:36:47 -0400 Original-Received: by furry (Postfix, from userid 1000) id 6DEF1C047; Mon, 21 Apr 2008 01:36:47 -0400 (EDT) In-Reply-To: (Stefan Monnier's message of "Wed, 16 Apr 2008 10:04:24 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 2) 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:95595 Archived-At: Stefan Monnier writes: >> I've located the source of the problem. In doc-view-display the >> (dolist (win (get-buffer-window-list buffer nil t)) ...) >> doesn't iterate over any windows, e.g. get-buffer-window-list returns nil. > > Is it run before `buffer' is shown in a window, maybe? I think what's happening is that doc-view-mode is being run during file autodetection, before the selected window switches to the doc-view buffer. Thus, (window-buffer (selected-window)) is not equal to (current-buffer). Maybe you could fix this by reinstating the variable doc-view-current-page, which was removed in your 2008-02-21 change. That would provide a "default" current-page, applicable when the buffer isn't shown in any windows. Then modify doc-view-display accordingly.