GNU bug report logs -
#34138
27.0.50; Delayed display of PDF file images
Previous Next
Reported by: Stephen Berman <stephen.berman <at> gmx.net>
Date: Sat, 19 Jan 2019 21:14:02 UTC
Severity: normal
Merged with 34202
Found in version 27.0.50
Fixed in version 27.1
Done: Noam Postavsky <npostavs <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
This
> backtrace()
> (let ((standard-output (get-buffer-create "*PDF test*"))) (backtrace))
> (cond ((and image slice) (if pixels (cons (nth 3 slice) (nth 4 slice)) (cons (/ (float (nth 3 slice)) (frame-char-width frame)) (/ (float (nth 4 slice)) (frame-char-height frame))))) (image (image-size image pixels frame)) (t (let ((standard-output (get-buffer-create "*PDF test*"))) (backtrace))))
> (let ((image (assoc 'image spec)) (slice (assoc 'slice spec))) (cond ((and image slice) (if pixels (cons (nth 3 slice) (nth 4 slice)) (cons (/ (float (nth 3 slice)) (frame-char-width frame)) (/ (float (nth 4 slice)) (frame-char-height frame))))) (image (image-size image pixels frame)) (t (let ((standard-output (get-buffer-create "*PDF test*"))) (backtrace)))))
> (cond ((eq (car spec) 'xwidget) (let ((xwi (xwidget-info (xwidget-at (point-min))))) (cons (aref xwi 2) (aref xwi 3)))) ((eq (car spec) 'image) (image-size spec pixels frame)) (t (let ((image (assoc 'image spec)) (slice (assoc 'slice spec))) (cond ((and image slice) (if pixels (cons (nth 3 slice) (nth 4 slice)) (cons (/ (float (nth 3 slice)) (frame-char-width frame)) (/ (float (nth 4 slice)) (frame-char-height frame))))) (image (image-size image pixels frame)) (t (let ((standard-output (get-buffer-create "*PDF test*"))) (backtrace)))))))
> image-display-size(nil t)
> pdf-view-image-size(t)
> pdf-misc-size-indication()
> eval((pdf-misc-size-indication))
> redisplay_internal\ \(C\ function\)()
> backtrace()
> (let ((standard-output (get-buffer-create "*PDF test*"))) (backtrace))
> (cond ((and image slice) (if pixels (cons (nth 3 slice) (nth 4 slice)) (cons (/ (float (nth 3 slice)) (frame-char-width frame)) (/ (float (nth 4 slice)) (frame-char-height frame))))) (image (image-size image pixels frame)) (t (let ((standard-output (get-buffer-create "*PDF test*"))) (backtrace))))
> (let ((image (assoc 'image spec)) (slice (assoc 'slice spec))) (cond ((and image slice) (if pixels (cons (nth 3 slice) (nth 4 slice)) (cons (/ (float (nth 3 slice)) (frame-char-width frame)) (/ (float (nth 4 slice)) (frame-char-height frame))))) (image (image-size image pixels frame)) (t (let ((standard-output (get-buffer-create "*PDF test*"))) (backtrace)))))
> (cond ((eq (car spec) 'xwidget) (let ((xwi (xwidget-info (xwidget-at (point-min))))) (cons (aref xwi 2) (aref xwi 3)))) ((eq (car spec) 'image) (image-size spec pixels frame)) (t (let ((image (assoc 'image spec)) (slice (assoc 'slice spec))) (cond ((and image slice) (if pixels (cons (nth 3 slice) (nth 4 slice)) (cons (/ (float (nth 3 slice)) (frame-char-width frame)) (/ (float (nth 4 slice)) (frame-char-height frame))))) (image (image-size image pixels frame)) (t (let ((standard-output (get-buffer-create "*PDF test*"))) (backtrace)))))))
> image-display-size(nil t)
> pdf-view-image-size(t)
> pdf-misc-size-indication()
> eval((pdf-misc-size-indication))
> posn-at-point(1 #<window 68 on fhs-2.3.pdf>)
> window-in-direction(below #<window 68 on fhs-2.3.pdf>)
reveals that the mode line is evaluated twice in your scenario - once
to get a window in a direction (where we call 'posn-at-point' to tell
where on your frame point currently is) and once from redisplay. I
don't know yet why 'image-get-display-property' apparently fails but
it looks like a good idea to me to wrap the 'image-display-size' call
in 'pdf-view-image-size' in 'ignore-errors' - evaluating a mode line
string should never throw an error (in paticular when it's only needed
to guess the height of the mode line).
martin
This bug report was last modified 6 years and 88 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.