Open stewmehr opened 2 years ago
Thanks for creating the issue. I think that the issue when using pdf-view-next-page
should have been fixed now (you should update both the image-roll
and the pdf-tools
packages).
About the page numbers not updating; I hope the issue got fixed as a 'side-effect' of the just mentioned fix. Otherwise, I am afraid that I can not be of much help because I do not use Doom, while also the page-numbers seem to update fine on emacs -Q
and on Spacemacs.
I think this issue is caused by the fact that pdf-view-change-page-hook
is not longer run. I fixed it for myself by
(add-hook 'image-roll-after-change-page-hook #'+modeline-update-pdf-pages)
This is with the "light" version of the mode-line which doesn't use the doom-modeline
package but looking at what doom-modeline
adds to pdf-view-change-page-hook
and adding the same function to image-roll-after-change-page-hook
should fix the issue.
I use
doom-modeline
(in vanilla Emacs) which can handle page numbers fine when I only skip entire pages viapdf-view-next-page
. If I use continuous scrolling to move through a document from the top, the page number freezes at1
and does not update. This may be due todoom-modeline
expecting a string argument for page numbers whereasimage-roll
probably provides a list of those viaimage-roll-displayed-pages
. I get the following error in my*Messages*
buffer:I can also confirm some behavior @dalanicolai warned me about: calling
pdf-view-next-page
when the next page is partly visible (even the tiniest fraction of white space is enough) does not work as expected. I only mention this here because it also has some side effects with regards to page numbers. Callingpdf-view-next-page
once increments the page counter (good) but only greys out the current page and otherwise does not update the view (bad). A second call topdf-view-next-page
increments the page counter again and then jumps two pages ahead from the last position - page number in the modeline and the displayed page match again, but we have skipped over one page. Interestingly enough, scrolling backwards through the PDF viapdf-view-previous-page
works just fine.EDIT: See screenshots to get around my awkward phrasing.
Initial situation:
After calling
pdf-view-next-page
once. Page counter updated, view greyed out:After calling
pdf-view-next-page
twice. Page counter updated, view moved two pages forward: