emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* How to display sunrise and sunset in weekly agenda view, but only for today?
@ 2012-02-06 14:41 Brian van den Broek
  2012-02-06 15:08 ` Nick Dokos
  0 siblings, 1 reply; 3+ messages in thread
From: Brian van den Broek @ 2012-02-06 14:41 UTC (permalink / raw)
  To: emacs-orgmode

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?

Thanks and best,

Brian vdB

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: How to display sunrise and sunset in weekly agenda view, but only for today?
  2012-02-06 14:41 How to display sunrise and sunset in weekly agenda view, but only for today? Brian van den Broek
@ 2012-02-06 15:08 ` Nick Dokos
  2012-02-06 17:14   ` Brian van den Broek
  0 siblings, 1 reply; 3+ messages in thread
From: Nick Dokos @ 2012-02-06 15:08 UTC (permalink / raw)
  To: Brian van den Broek; +Cc: nicholas.dokos, emacs-orgmode

Brian van den Broek <brian.van.den.broek@gmail.com> 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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: How to display sunrise and sunset in weekly agenda view, but only for today?
  2012-02-06 15:08 ` Nick Dokos
@ 2012-02-06 17:14   ` Brian van den Broek
  0 siblings, 0 replies; 3+ messages in thread
From: Brian van den Broek @ 2012-02-06 17:14 UTC (permalink / raw)
  To: nicholas.dokos; +Cc: emacs-orgmode

On 6 February 2012 17:08, Nick Dokos <nicholas.dokos@hp.com> wrote:
> Brian van den Broek <brian.van.den.broek@gmail.com> 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

<snip>

> 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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-02-06 17:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-06 14:41 How to display sunrise and sunset in weekly agenda view, but only for today? Brian van den Broek
2012-02-06 15:08 ` Nick Dokos
2012-02-06 17:14   ` Brian van den Broek

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).