From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: [OT] Icon problem with org-google-weather Date: Mon, 06 Jun 2011 12:35:45 -0400 Message-ID: <1113.1307378145@alphaville.dokosmarshall.org> References: <24071.1307320041@alphaville.dokosmarshall.org> <871uz7v287.fsf@member.fsf.org> <29857.1307368279@alphaville.dokosmarshall.org> <87lixf56as.fsf@member.fsf.org> <593.1307374832@alphaville.dokosmarshall.org> Reply-To: nicholas.dokos@hp.com Return-path: Received: from eggs.gnu.org ([140.186.70.92]:41511) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QTcmg-0006Fu-QT for emacs-orgmode@gnu.org; Mon, 06 Jun 2011 12:36:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QTcmf-00057i-Dj for emacs-orgmode@gnu.org; Mon, 06 Jun 2011 12:36:10 -0400 Received: from vms173005pub.verizon.net ([206.46.173.5]:34528) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QTcmf-00057W-0B for emacs-orgmode@gnu.org; Mon, 06 Jun 2011 12:36:09 -0400 Received: from alphaville.dokosmarshall.org ([unknown] [173.76.32.106]) by vms173005.mailsrvcs.net (Sun Java(tm) System Messaging Server 7u2-7.02 32bit (built Apr 16 2009)) with ESMTPA id <0LMD00CMZNFL06C0@vms173005.mailsrvcs.net> for emacs-orgmode@gnu.org; Mon, 06 Jun 2011 11:35:51 -0500 (CDT) In-reply-to: Message from Nick Dokos of "Mon, 06 Jun 2011 11:40:32 EDT." <593.1307374832@alphaville.dokosmarshall.org> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Cc: Tassilo Horn , nicholas.dokos@hp.com, emacs-orgmode@gnu.org Nick Dokos wrote: > Tassilo Horn wrote: > > It's already there. But now I get > > > > (error "Bad url: :/ig/images/weather/chance_of_storm.gif") > > > > in the first `org-google-weather' call. > > > > Me too: this is recent - the image URLs were of the form g0.static (or > something like this) yesterday - but it seems that Google is playing games: > > when I visit https://www.google.com/ig/api?weather=Boston through a browser, > I get in the returned XML. > Here's a quick-and-dirty hack to work around Google's inability to make up its mind about what it will return: a path or a complete URL? The hack assumes that the value-du-jour is a path, so if tomorrow Google changes its mind, you may have to revert: diff --git a/google-weather.el b/google-weather.el index fad9ed7..f59b1bf 100644 --- a/google-weather.el +++ b/google-weather.el @@ -172,7 +172,7 @@ See `google-weather-retrieve-data' for the use of EXPIRE-TIME." `(,forecast-encoded-date (low ,(google-weather-assoc 'low forecast)) (high ,(google-weather-assoc 'high forecast)) - (icon ,(google-weather-assoc 'icon forecast)) + (icon ,(concat "https://www.google.com" (google-weather-assoc 'icon forecast))) (condition ,(google-weather-assoc 'condition forecast))))) (loop for entry in (google-weather-data->weather data) when (eq (car entry) 'forecast_conditions) With this, I get the usual 4-day org-google-weather forecast in my agenda, except that cached images still don't work. Nick