dalanicolai / pdf-tools

Emacs support library for PDF files.
GNU General Public License v3.0
3 stars 8 forks source link

Error when calling pdf-view-scroll-up-or-next-page #1

Open yantar92 opened 2 years ago

yantar92 commented 2 years ago

I just tried to enable pdf-view-roll-minor-mode and got the following error:

Debugger entered--Lisp error: (error "Invalid image specification: (space :width (924) :height (1235))")
  (error "Invalid image specification: %s" (space :width (924) :height (1235)))
  (image-display-size (space :width (924) :height (1235)) t)
  (image-next-line 40)
  (image-scroll-up nil)
  (pdf-view-scroll-up-or-next-page nil)
  (funcall-interactively pdf-view-scroll-up-or-next-page nil)
  (call-interactively pdf-view-scroll-up-or-next-page)
  (eval (call-interactively #'pdf-view-scroll-up-or-next-page))
  (progn (eval `(call-interactively ,body)) t)
  (if (seq-reduce (lambda (prev el) (and prev (pcase el ('#'t t) (`#'... (eval `...)) (_ (eq major-mode (eval el)))))) subconditions t) (progn (eval `(call-interactively ,body)) t))
  (when (seq-reduce (lambda (prev el) (and prev (pcase el ('#'t t) (`#'... (eval `...)) (_ (eq major-mode (eval el)))))) subconditions t) (eval `(call-interactively ,body)) t)
  (let* ((rcondition (seq-reverse (cdr condition))) (body (car rcondition)) (subconditions (seq-reverse (cdr rcondition)))) (when (seq-reduce (lambda (prev el) (and prev (pcase el ('... t) (`... (eval ...)) (_ (eq major-mode ...))))) subconditions t) (eval `(call-interactively ,body)) t))
  ((lambda (condition) (let* ((rcondition (seq-reverse (cdr condition))) (body (car rcondition)) (subconditions (seq-reverse (cdr rcondition)))) (when (seq-reduce (lambda (prev el) (and prev (pcase el ... ... ...))) subconditions t) (eval `(call-interactively ,body)) t))) (meta-scroll-up%pdf-view-mode 'pdf-view-mode #'pdf-view-scroll-up-or-next-page))
  (#f(compiled-function (elt) #<bytecode -0x38fc81fa1d0741e>) (meta-scroll-up%pdf-view-mode 'pdf-view-mode #'pdf-view-scroll-up-or-next-page))
  (mapc #f(compiled-function (elt) #<bytecode -0x38fc81fa1d0741e>) ((meta-scroll-up%pdf-view-mode 'pdf-view-mode #'pdf-view-scroll-up-or-next-page) (meta-scroll-up%notmuch-tree-mode 'notmuch-tree-mode #'scroll-other-window) (meta-scroll-up%t #'t #'scroll-up)))
  (seq-do #f(compiled-function (elt) #<bytecode -0x38fc81fa1d0741e>) ((meta-scroll-up%pdf-view-mode 'pdf-view-mode #'pdf-view-scroll-up-or-next-page) (meta-scroll-up%notmuch-tree-mode 'notmuch-tree-mode #'scroll-other-window) (meta-scroll-up%t #'t #'scroll-up)))
  (seq-some (lambda (condition) (let* ((rcondition (seq-reverse (cdr condition))) (body (car rcondition)) (subconditions (seq-reverse (cdr rcondition)))) (when (seq-reduce (lambda (prev el) (and prev (pcase el ... ... ...))) subconditions t) (eval `(call-interactively ,body)) t))) ((meta-scroll-up%pdf-view-mode 'pdf-view-mode #'pdf-view-scroll-up-or-next-page) (meta-scroll-up%notmuch-tree-mode 'notmuch-tree-mode #'scroll-other-window) (meta-scroll-up%t #'t #'scroll-up)))
  (meta-scroll-up)
  (funcall-interactively meta-scroll-up)
  (command-execute meta-scroll-up)
dalanicolai commented 2 years ago

Ah, I should have mentioned that I have added keybindings on the arrow up/down and PgUp/PgDown buttons only. I have not 'reimplemented' the pdf-view-scroll-up-or-next-page (and down version) functions but instead I have only reused the pdf-view-next-line-or-next-page (and previous version) functions.