-
-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Activating pdf-view-auto-slice-minor-mode
leads to blank grey pages
#12
Comments
Thanks for enjoying image-roll and toc-mode. I will probably not work any more on image-roll, as I am/have been working on its successor. I did not write much about it yet, but you can have a look at minad/consult#625 to get an impression. If you like, you can already test a 'pdf-tools' version of the thumbs side window, by simply loading the code here, however this requires the About donations, well, any kind of donation would help me a lot. Developing these packages takes a lot of work, and a massive amount of investigation (especially the things that are not documented, like the redisplay functionality. I will try to soon publish some article about the need for documentation). |
I am experiencing exactly the same issue described by @haselwarter after upgrading to emacs 28 and installing pdf-tools + image-roll. Given that |
Debugger entered--Lisp error: (error "Invalid image specification")
image-size(((slice 103 189 647 869) (image :type png :data "\211PNG\15\n\32\n\0\0\0\15IHDR\0\0\3}\0\0\4\204\10\2\0\0\0_\322\361\261\0\0 \0IDATx\1\354\235\5\270\35\305\371..." :scale 1 :margin (0 . 2) :width 893 :map (((rect (337 . 268) 348 . 288) link-8-1 (pointer hand help-echo "Goto page 7")) ((rect (493 . 289) 505 . 309) link-8-2 (pointer hand help-echo "Goto page 7")) ((rect (287 . 835) 298 . 856) link-8-3 (pointer hand help-echo "Goto page 8")) ((rect (161 . 187) 730 . 207) pdf-view-text-region (pointer text)) ((rect (131 . 207) 352 . 228) pdf-view-text-region (pointer text)) ((rect (161 . 244) 559 . 264) pdf-view-text-region (pointer text)) ((rect (187 . 267) 730 . 270) pdf-view-text-region (pointer text)) ((rect (131 . 270) 147 . 288) pdf-view-text-region (pointer text)) ((rect (187 . 270) 730 . 288) pdf-view-text-region (pointer text)) ((rect (187 . 288) 730 . 289) pdf-view-text-region (pointer text)) ((rect (161 . 289) 730 . 309) pdf-view-text-region (pointer text)) ((rect (131 . 309) 616 . 330) pdf-view-text-region (pointer text)) ((rect (279 . 340) 611 . 344) pdf-view-text-region (pointer text)) ((rect (279 . 344) 611 . 365) pdf-view-text-region (pointer text)) ((rect (706 . 344) 730 . 365) pdf-view-text-region (pointer text)) ((rect (279 . 365) 611 . 369) pdf-view-text-region (pointer text)) ((rect (161 . 378) 730 . 401) pdf-view-text-region (pointer text)) ((rect (124 . 401) 147 . 419) pdf-view-text-region (pointer text)) ((rect (161 . 401) 730 . 419) pdf-view-text-region (pointer text)) ((rect (161 . 419) 730 . 420) pdf-view-text-region (pointer text)) ((rect (161 . 420) 331 . 441) pdf-view-text-region (pointer text)) ((rect (407 . 444) 438 . 447) pdf-view-text-region (pointer text)) ((rect (390 . 447) 398 . 458) pdf-view-text-region (pointer text)) ((rect (407 . 447) 438 . 458) pdf-view-text-region (pointer text)) ((rect (320 . 458) 378 . 463) pdf-view-text-region (pointer text)) ((rect (390 . 458) 398 . 463) pdf-view-text-region (pointer text)) ((rect (407 . 458) 438 . 463) pdf-view-text-region (pointer text)) ((rect (442 . 458) 572 . 463) pdf-view-text-region (pointer text)) ((rect (706 . 458) 730 . 463) pdf-view-text-region (pointer text)) ((rect (320 . 463) 378 . 469) pdf-view-text-region (pointer text)) ((rect (390 . 463) 398 . 469) pdf-view-text-region (pointer text)) ((rect (442 . 463) 572 . 469) pdf-view-text-region (pointer text)) ((rect (706 . 463) 730 . 469) pdf-view-text-region (pointer text)) ((rect (320 . 469) 378 . 470) pdf-view-text-region (pointer text)) ((rect (442 . 469) 572 . 470) pdf-view-text-region (pointer text)) ((rect (706 . 469) 730 . 470) pdf-view-text-region (pointer text)) ((rect (320 . 470) 378 . 480) pdf-view-text-region (pointer text)) ((rect (384 . 470) 441 . 480) pdf-view-text-region (pointer text)) ((rect (442 . 470) 572 . 480) pdf-view-text-region (pointer text)) ((rect (706 . 470) 730 . 480) pdf-view-text-region (pointer text)) ((rect (384 . 480) 441 . 495) pdf-view-text-region (pointer text)) ((rect (161 . 504) 730 . 509) pdf-view-text-region (pointer text)) ((rect (124 . 509) 147 . 527) pdf-view-text-region (pointer text)) ((rect (161 . 509) 730 . 527) pdf-view-text-region (pointer text)) ((rect (161 . 527) 730 . 528) pdf-view-text-region (pointer text)) ((rect (161 . 528) 667 . 549) pdf-view-text-region (pointer text)) ((rect (372 . 562) 519 . 582) pdf-view-text-region (pointer text)) ((rect (706 . 562) 730 . 582) pdf-view-text-region (pointer text)) ((rect (161 . 596) 730 . 598) pdf-view-text-region (pointer text)) ((rect (124 . 598) 147 . 616) pdf-view-text-region (pointer text)) ...) :pointer arrow :relief 0 :transform-smoothing t)) t)
image-roll-undisplay-page(8)
image-roll-update-displayed-pages()
image-roll-scroll-forward(t)
image-roll-scroll-backward()
(let ((_ --dotimes-counter--)) (image-roll-scroll-backward))
(while (< --dotimes-counter-- --dotimes-limit--) (let ((_ --dotimes-counter--)) (image-roll-scroll-backward)) (setq --dotimes-counter-- (1+ --dotimes-counter--)))
(let ((--dotimes-limit-- (or arg 1)) (--dotimes-counter-- 0)) (while (< --dotimes-counter-- --dotimes-limit--) (let ((_ --dotimes-counter--)) (image-roll-scroll-backward)) (setq --dotimes-counter-- (1+ --dotimes-counter--))))
(if pdf-view-roll-minor-mode (let ((--dotimes-limit-- (or arg 1)) (--dotimes-counter-- 0)) (while (< --dotimes-counter-- --dotimes-limit--) (let ((_ --dotimes-counter--)) (image-roll-scroll-backward)) (setq --dotimes-counter-- (1+ --dotimes-counter--)))) (pdf-view--previous-line-or-previous-page arg))
pdf-view-previous-line-or-previous-page(1)
funcall-interactively(pdf-view-previous-line-or-previous-page 1)
call-interactively(pdf-view-previous-line-or-previous-page nil nil)
command-execute(pdf-view-previous-line-or-previous-page) |
I have pushed a 'partial fix'. PR's for better fixes are welcome, but as mentioned in my previous comment, I will not spend more time on this package because of other priorities. |
I accidentally deleted the wrong line in that fix... but I have put that line back now... so it should work now |
Thanks but unfortunately it does not. I can't even activate the package and am receiving this error
and when running
I totally understand that you have other priorities besides this package, but I would like to know if the old pdf-continuous-scroll package also works on 28.1, given that pcs has no conflicts with |
Are you using the pdf-roll branch of my pdf-tools fork? Because I remember that is required for using image-roll. From the error, it looks like the If that does not work, indeed the old continuous-scroll package should work fine on Emacs 28/29 as far as I know. |
@dalanicolai thanks for your reply/confirmation, but it is still not working, despite using your pdf-tools package. @haselwarter Sorry for introducing extra stuff into your issue. (use-package pdf-tools
:after (quelpa)
:ensure t
:magic ("%PDF" . pdf-view-mode)
;; default page width behaviour
:hook ((pdf-view-mode . pdf-view-auto-slice-minor-mode))
;; use Ctrl+home/end keys to move to the first/last page
:bind (:map pdf-view-mode-map
("<home>" . 'pdf-view-first-page)
("<end>" . 'pdf-view-last-page))
:quelpa (pdf-tools :fetcher github
:repo "dalanicolai/pdf-tools"
:branch "pdf-roll"
:files ("lisp/*.el"
"README"
("build" "Makefile")
("build" "server")
(:exclude "lisp/tablist.el" "lisp/tablist-filter.el")))
)
(use-package image-roll
:ensure t
:after (pdf-tools)
:hook ((pdf-view-mode . pdf-view-roll-minor-mode)
)
:quelpa (image-roll :fetcher github
:repo "dalanicolai/image-roll.el"
:upgrade t)
) |
I am not sure how I used to load pdf-roll.el, but it looks that file is not loaded. Try to call |
Did you mean :config
(require 'image-roll) in the above setup to no avail :-( |
For the record, I'm using
```
(use-package image-roll
:straight
'(:host github :repo "dalanicolai/image-roll.el"))
```
and
```
(use-package pdf-tools
:straight '(:type git
:host github
:fork (:repo "dalanicolai/pdf-tools")
:branch "pdf-roll"
:files ("lisp/*.el"
"README"
("build" "Makefile")
("build" "server")
(:exclude "lisp/tablist.el" "lisp/tablist-filter.el")))
:bind (:map pdf-view-mode-map
([remap consult-goto-line] . pdf-view-goto-page)
("c" . pdf-view-roll-minor-mode)
("d" . redraw-display))
;; :hook
;; (pdf-view-mode . pdf-view-roll-minor-mode)
)
```
…On Tue, 27 Sept 2022 at 13:45, Averter ***@***.***> wrote:
I am not sure how I used to load pdf-roll.el, but it looks that file is
not loaded. Try to call M-x find-libary pdf-tools and pdf-roll manually,
before trying to open some pdf. If that fixes the problem, then you should
probably additionally somehow require pdf-roll when loading/requiring
pdf-tools.
Did you mean image-roll instead of pdf-roll? I am able to find both
pdf-tools and image-roll (the .el files show up) but that does not fix the
problem, i.e., the function is still not recognized when opening a pdf. I
have also tried to introduce
:config
(require 'image-roll)
in the above setup to no avail :-(
—
Reply to this email directly, view it on GitHub
<#12 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAGO4GWPAKMRGJRWAT2KPXTWALT77ANCNFSM6AAAAAAQMOBY6U>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
@averter I mean |
Thanks both for all the help. I have tried several things and it does not work no matter what I try :-( , so I think I will give up on this one/it is just too much hassle to handle, and I will revert back to the old pdf-continuous-scroll package. Thanks again. |
@haselwarter If you'd like to open the files with pdf-view-roll-minor-mode active then you could try
@averter It means loading |
@dalanicolai even though I had installed your version of pdf-tools I was not able to find |
Okay, when I simply install my branch here (using quelpa) then I can find |
Maybe there's still a stale `melpa` version of `pdf-tools` around that's
shadowing the `pdf-roll` fork. As Daniel is saying, you can check that via
`M-x find-library`.
…On Thu, 29 Sept 2022 at 11:49, Daniel Nicolai ***@***.***> wrote:
Okay, when I simply install my branch here (using quelpa) then I can find
pdf-roll using M-x find-library. However, if that does not work, then you
should be able to find it in the in pdf-tools.../lisp directory within
your elpa directory.
To get there, you could simply do M-x find-library pdf-view, as that
package is located in the same directory. From there you can search for the
pdf-roll package. If it is not in that directory, then you are not using
the pdf-roll branch somehow.
—
Reply to this email directly, view it on GitHub
<#12 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAGO4GS7OZIJSFUYXLE56K3WAVX3TANCNFSM6AAAAAAQMOBY6U>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Firstly, thank you for writing
image-roll
andtoc-mode
.It would be great to merge your
pdf-roll
for ofpdf-tools
, and to publishimage-roll
.pdf-tools
is pretty popular, and the scrolling thatimage-roll
brings is a massive improvement. Ideally, upstreaming your changes could reduce your maintenance burden on the fork and onimage-roll
. I understand that this would require some polishing. I usepdf-tools
a lot, and gettingimage-roll
properly integrated would be useful to me. How much of a donation would help you fix this issue, and move forward with publishingimage-roll
?Now, for the actual bug report.
pdf-view-roll-minor-mode
seems to have issues withpdf-view-auto-slice-minor-mode
. Notably, it leads to pages not being displayed. Instead, a grey page is shown, and it's impossible to scroll past this grey page.M-x redraw-display
mostly seems to bring back the view of the pdf.Tested with GNU Emacs 29.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.34, cairo version 1.17.6) of 2022-09-12, on wayland (sway).
Here's the recipe I used with a clean Emacs config.
Edit: It seems these issues with redisplay already happen without
auto-slice-mode
. They happen less frequently, but often enough to be a bother.The text was updated successfully, but these errors were encountered: