Subject: bug#16090: 24.3.50; [PATCH] error when jumping to a doc-view bookmark

From: Andreas Politz <[email-masked]>
Date: Tue, 10 Dec 2013 11:02:41 +0100

Tassilo Horn <[email-masked]> writes:

> Stefan Monnier <[email-masked]> writes:

>> The code is already equipped to handle non-displayed buffers (it
>> keeps track of the "default current page" which is later used when/if
>> the buffer gets displayed in a window).

I see.  So the problem is the

  (with-selected-window (or ... (selected-window))),

which most of the times makes the wrong buffer current (having
image-mode-winprops-alist eq t).
>
> Yes, but I think that doesn't suffice.  The problem with bookmarks is
> that the display window function is run after the bookmark handler, so
> we have no clue in which window the bookmarked page is going to be
> shown.  [...]

What about setting an additional property for the page in
image-mode-winprops-alist and removing it later in
doc-view-new-window-function ?

-ap