[Bug] PDF page number does not update for pdf-tools continuous-scroll-mode
bug
### Thank you for the bug report
- [x] I am using the latest version of `doom-modeline` related packages.
- [x] I checked [FAQ](https://github.com/seagle0128/doom-modeline#faq).
- [x] You may also try reproduce the issue using clean environment and minimal configurations with
the command `emacs -Q`.
### Bug description
First of all, thanks for your excellent work on the awesome doom-modeline!
The pdf-tools package recently introduced [continuous-scroll-mode](https://github.com/vedang/pdf-tools?tab=readme-ov-file#continuous-scroll-mode-experimental), which is an experimental feature. When `pdf-view-roll-minor-mode` is activated, the PDF page number shown in modeline will not get updated as one runs `pdf-roll-scroll-screen-backward` or `pdf-roll-scroll-screen-forward`.
A quick workaround that works for me is
```elisp
(add-hook 'pdf-view-after-change-page-hook #'doom-modeline-update-pdf-pages)
```
Currently, the doom-modeline replies on `pdf-view-change-page-hook` instead of `pdf-view-after-change-page-hook`:
https://github.com/seagle0128/doom-modeline/blob/master/doom-modeline-segments.el#L2578
So perhaps a quick solution to this issue is to use the `pdf-view-after-change-page-hook`.
### Steps to reproduce
- Open a PDF in Emacs using pdf-tools
- Activate the continuous-scroll-mode by `M-x pdf-view-roll-minor-mode`
- Scroll down the pages by `M-x pdf-roll-scroll-screen-forward`
### Expected behavior
The page number shown in the modeline will be updated when one scrolls down/up to a new page.
### OS
MacOS
### Emacs Version
30
### Emacs Configurations
_No response_
### Error callstack
```emacs-lisp
```
### Anything else
_No response_
0 条评论