emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] How to display sunrise and sunset in weekly agenda view, but onl


From: Nick Dokos
Subject: Re: [O] How to display sunrise and sunset in weekly agenda view, but only for today?
Date: Mon, 06 Feb 2012 10:08:50 -0500

Brian van den Broek <address@hidden> wrote:

> Hi all,
> 
> I was looking at <http://orgmode.org/worg/org-hacks.html#sec-2-7> 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:
> <http://article.gmane.org/gmane.emacs.orgmode/38879>.
> 
> 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]