From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: How to display sunrise and sunset in weekly agenda view, but only for today? Date: Mon, 06 Feb 2012 10:08:50 -0500 Message-ID: <23864.1328540930@alphaville> References: Reply-To: nicholas.dokos@hp.com Return-path: Received: from eggs.gnu.org ([140.186.70.92]:35041) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RuQBg-0000S4-FY for emacs-orgmode@gnu.org; Mon, 06 Feb 2012 10:09:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RuQBa-0002p1-Dd for emacs-orgmode@gnu.org; Mon, 06 Feb 2012 10:09:00 -0500 Received: from g1t0028.austin.hp.com ([15.216.28.35]:7714) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RuQBa-0002ou-85 for emacs-orgmode@gnu.org; Mon, 06 Feb 2012 10:08:54 -0500 In-Reply-To: Message from Brian van den Broek of "Mon, 06 Feb 2012 16:41:49 +0200." 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: Brian van den Broek Cc: nicholas.dokos@hp.com, emacs-orgmode 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 > export that to my phone. I'm interested in the sun* times for today, > but not interested enough to have what feels like clutter on future > days. > > I am of limited lisp and org internals knowledge, so don't really feel > able to figure out where to start poking. Has anyone done this? Or, > could anyone give me a push? > 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. Nick