emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nick Dokos <nicholas.dokos@hp.com>
To: Brian van den Broek <brian.van.den.broek@gmail.com>
Cc: nicholas.dokos@hp.com, emacs-orgmode <emacs-orgmode@gnu.org>
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	[thread overview]
Message-ID: <23864.1328540930@alphaville> (raw)
In-Reply-To: Message from Brian van den Broek <brian.van.den.broek@gmail.com> of "Mon, 06 Feb 2012 16:41:49 +0200." <CAF6DajLq3R16ztdFiZVQcnVkivTookEeJnPMakFbB9PBN7VtpQ@mail.gmail.com>

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

  reply	other threads:[~2012-02-06 15:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2012-02-06 17:14   ` Brian van den Broek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=23864.1328540930@alphaville \
    --to=nicholas.dokos@hp.com \
    --cc=brian.van.den.broek@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).