help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Displaying images does not always work - why not?


From: Nick Dokos
Subject: Re: Displaying images does not always work - why not?
Date: Tue, 7 Jun 2011 04:39:22 +0000 (UTC)
User-agent: Loom/3.14 (http://gmane.org/)

Nick Dokos <nicholas.dokos <at> hp.com> writes:

> Turns out that if I defeat the caching and download the images from
> Google they display properly. If I try to display a cached image, I
> get the empty box. Here is what I tried:
> 
> (setq date '(6 6 2011))
> (setq foo (let ((org-google-weather-cache-time 0))
>             (org-google-weather)))
> 
> (setq bar (org-google-weather))
> 
> (equal foo bar) returns t. Evaluating foo and bar in separate
> windows and running compare-windows also says they are the
> same. Doing C-u C-x = and clicking on the display property of each
> and comparing them shows no difference.

Despite appearances, they are indeed differeent: I finally did
string-to-list on the image data strings and, comparing them, found
out that the data retrieved from the cache included multibyte
characters whereas the data obtained directly did
not. org-google-weather uses the url package and its caching
mechanism, so there seems to be a bug in url-cache.el. I don't know
what the right solution is, but for now I'm working around the problem
by marking the buffer that url-cache reads into with

 (set-buffer-multibyte nil)

Can somebody please vet this (and fix url-cache if this is correct)?

Thanks,
Nick





reply via email to

[Prev in Thread] Current Thread [Next in Thread]