From mboxrd@z Thu Jan 1 00:00:00 1970 From: Brian van den Broek Subject: Re: How to display sunrise and sunset in weekly agenda view, but only for today? Date: Mon, 6 Feb 2012 19:14:39 +0200 Message-ID: References: <23864.1328540930@alphaville> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Return-path: Received: from eggs.gnu.org ([140.186.70.92]:57618) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RuSA7-00065t-VI for emacs-orgmode@gnu.org; Mon, 06 Feb 2012 12:15:33 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RuS9w-0003E2-0q for emacs-orgmode@gnu.org; Mon, 06 Feb 2012 12:15:31 -0500 Received: from mail-gx0-f169.google.com ([209.85.161.169]:36601) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RuS9v-0003Du-Ry for emacs-orgmode@gnu.org; Mon, 06 Feb 2012 12:15:19 -0500 Received: by ggnu2 with SMTP id u2so3546958ggn.0 for ; Mon, 06 Feb 2012 09:15:19 -0800 (PST) In-Reply-To: <23864.1328540930@alphaville> 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 To: nicholas.dokos@hp.com Cc: emacs-orgmode On 6 February 2012 17:08, Nick Dokos wrote: > Brian van den Broek wrote: > >> Hi all, >> >> I was looking at and >> have used the code there to put sunrise and sunset into my agenda >> views; most cool. >> >> Poking around the thread that the worg page links to, I saw people >> were interested in displaying these times only in agenda day views. >> Konrad Hinsen posted an easy solution: >> . >> >> Never happy :-) what I'd like is to display the sun* times in the >> weekly view, but only for today. I always work from the week view and > Instead of Konrad's > > %%(when (eq span 'day) (diary-sunrise)) > %%(when (eq span 'day) (diary-sunset)) > > you can add > > %%(when (equal date (calendar-current-date)) (diary-sunrise)) > %%(when (equal date (calendar-current-date)) (diary-sunset)) > > so it will only happen on the current date. Thanks, Nick; works a charm. Best, Brian vdB