From: Nick Dokos <nicholas.dokos@hp.com>
To: help-gnu-emacs@gnu.org
Subject: Re: Displaying images does not always work - why not?
Date: Tue, 7 Jun 2011 04:39:22 +0000 (UTC) [thread overview]
Message-ID: <loom.20110607T061839-233@post.gmane.org> (raw)
In-Reply-To: loom.20110607T001150-502@post.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
prev parent reply other threads:[~2011-06-07 4:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-06 22:53 Displaying images does not always work - why not? Nick Dokos
2011-06-07 2:54 ` Nick Dokos
2011-06-07 4:39 ` Nick Dokos [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=loom.20110607T061839-233@post.gmane.org \
--to=nicholas.dokos@hp.com \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.