emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 23.0.60; doc-view: occasionally stuck at welcome screen


From: Chong Yidong
Subject: Re: 23.0.60; doc-view: occasionally stuck at welcome screen
Date: Mon, 28 Apr 2008 20:00:39 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

Chong Yidong <address@hidden> writes:

> Stefan Monnier <address@hidden> 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).

I've checked in a fix for this particular problem.

Taking a step back, though, I think the "window memory" feature you
introduced to image-mode and doc-view may be a misfeature.

Currently, if a window has previously been used to view a pdf file at a
particular page, then switching back to the pdf file jumps back to that
page automatically.  But this is not the way Emacs behaves for ordinary
buffers.  There, you jump to the value of point determined roughly as
follows:

(i) if there is at least one existing window displaying that buffer, use
the first such window found.

(ii) otherwise, use the last value of point set in that buffer (in any
window).

I think image-mode and doc-view should mirror the behavior of ordinary
buffers.  So instead of a buffer-local alist variable
((WIN . PROPS)...), we should have a buffer-local variable PROPS, and
update PROPS every time you scroll the image.

WDYT?




reply via email to

[Prev in Thread] Current Thread [Next in Thread]