From: Matt Lundin <mdl@imapmail.org>
To: PT <spamfilteraccount@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: Is it possible to show an agenda item only if it's due?
Date: Tue, 22 Sep 2009 12:42:59 -0400 [thread overview]
Message-ID: <m2skefdj70.fsf@fastmail.fm> (raw)
In-Reply-To: <loom.20090922T174600-464@post.gmane.org> (PT's message of "Tue, 22 Sep 2009 15:50:51 +0000 (UTC)")
PT <spamfilteraccount@gmail.com> writes:
> Matt Lundin <mdl <at> imapmail.org> writes:
>
>> One recommendation:
>>
>> Create an ":EVENING:" tag and filter it out in the agenda. Or,
>> optionally, create custom agenda commands for day and evening agendas
>> that pull up different results based on tags.
>>
>
> This wouldn't work, because I have lots of different such times during
> the day which cannot be grouped into 2-3 main categories.
>
> 4pm was only an example. It can be any other time during the day and I only
> want those items to appear when their time is due.
Ah I see. Another idea: write an agenda skip function that converts the
timestamp to universal time and ignores the entry if it is greater than
(current-time). Such as,
--8<---------------cut here---------------start------------->8---
(defun my-skip-if-later ()
"Skip entries that are later than the current time."
(let ((time (or (org-entry-get nil "TIMESTAMP")
(org-entry-get nil "SCHEDULED"))))
(when time
(if (time-less-p (org-time-string-to-time time) (current-time))
nil ;; less than current time --> include it
(outline-next-heading))))) ;; otherwise move on
(setq org-agenda-custom-commands
'(("A" "Without later items" agenda ""
((org-agenda-ndays 1)
(org-agenda-skip-function '(my-skip-if-later))))))
--8<---------------cut here---------------end--------------->8---
Note: this is just a quick example. I haven't tested it and am not sure
whether it breaks something. Also, it would become considerably more
complex if you also wanted to consider time-of-day information in the
heading.
- Matt
next prev parent reply other threads:[~2009-09-22 16:43 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-22 15:30 Is it possible to show an agenda item only if it's due? PT
2009-09-22 15:43 ` Matt Lundin
2009-09-22 15:50 ` PT
2009-09-22 16:42 ` Matt Lundin [this message]
2009-09-22 17:12 ` PT
2009-09-23 12:18 ` J. David Boyd
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=m2skefdj70.fsf@fastmail.fm \
--to=mdl@imapmail.org \
--cc=emacs-orgmode@gnu.org \
--cc=spamfilteraccount@gmail.com \
/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).