Subject: Re: bug#34138: 27.0.50; Delayed display of PDF file images

From: Stephen Berman <[email-masked]>
Date: Sun, 20 Jan 2019 21:45:19 +0100

On Sun, 20 Jan 2019 18:55:16 +0100 martin rudalics <[email-masked]> wrote:

> This
>>   backtrace()
[...]
>
> 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).

I tried that but it made no difference to the delay.  I the instrumented
pdf-view-image-size with the changes and visited a PDF file, but Edebug
did not kick in, so it seems that pdf-view-image-size is not called when
initially visiting a PDF file.

Steve Berman