[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#16090: 24.3.50; [PATCH] error when jumping to a doc-view bookmark
From: |
Tassilo Horn |
Subject: |
bug#16090: 24.3.50; [PATCH] error when jumping to a doc-view bookmark |
Date: |
Tue, 10 Dec 2013 21:07:25 +0100 |
User-agent: |
Gnus/5.130008 (Ma Gnus v0.8) Emacs/24.3.50 (gnu/linux) |
Andreas Politz <politza@hochschule-trier.de> 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).
>
> Where is this page read and gone to ? doc-view-new-window-function at
> most switches to the first page
Comment in the `message' in the first line. You'll see that it's called
two times (once with t and once with a window in (car winprops)) if the
buffer hasn't been shown in some window already.
> and this
>
> (with-current-buffer (find-file-noselect "some.pdf")
> (doc-view-goto-page 2)
> (pop-to-buffer (current-buffer)))
>
> also displays the first page.
No, if some.pdf hasn't been open yet, it'll show page 2. In that case,
`image-mode-winprops-alist' default entry will look like this:
(t
(info .
#("Page 2 of 6.\n" 0 12
(face bold)))
(page . 2)
(overlay . #<overlay in no buffer>))
> Is this a mistake in this function, i.e. shouldn't it read the winprop
> page?
That happens during the second time the function is called with a real
window by making the overlay showing the image with that window's page
visible.
Bye,
Tassilo
bug#16090: 24.3.50; [PATCH] error when jumping to a doc-view bookmark, Tassilo Horn, 2013/12/20