At Fri, 04 Mar 2011 17:05:55 -0500, Nick Dokos wrote: > Simon Brown <li...@700c.org> wrote: > > At Fri, 04 Mar 2011 08:40:23 +0000, > > Ian Barton wrote: > > > On 03/03/11 21:37, Simon Brown wrote: > > > > Has anybody tried adding the functionality of %%(diary-sunrise-sunset) > > > > (sunrise, sunset time and daylight hours) to the google weather code? > > > I just have something like: > > > > > > #+CATEGORY: Day/Year > > > &%%(diary-day-of-year) > > > #+CATEGORY: Sunrise > > > &%%(diary-sunrise-sunset) > > > > That's where I am at the moment, with the weather forecast, sunrise > > and sunset times on different lines. I was wondering if the two could > > be integrated to make a one line weather forecast, sunrise and sunset > > times. ? > > > > eg. > > Location: (icon) Chance of Rain, [-1,6] ℃, Sunrise 0658 Sunset 1759 1101 > > hrs of daylight > > > > Just write your own function to take the individual results and concatenate > them, e.g. > > --8<---------------cut here---------------start------------->8--- > (defun full-catastrophe () > (format "%s :: %s" (org-google-weather) (diary-sunrise-sunset))) > --8<---------------cut here---------------end--------------->8--- > > and add > > --8<---------------cut here---------------start------------->8--- > %%(full-catastrophe) > --8<---------------cut here---------------end--------------->8---
Excellent, I like your style :-) Simon