emacs-orgmode
[Top][All Lists]
Advanced

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

[O] How to avoid time part in date comparisons?


From: Sebastien Vauban
Subject: [O] How to avoid time part in date comparisons?
Date: Thu, 12 Sep 2013 14:27:14 +0200
User-agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.3.50 (windows-nt)

Hello,

Suppose you want to make a list of tasks you will have to do tomorrow.

The most logical expression would be "SCHEDULED = tomorrow":

--8<---------------cut here---------------start------------->8---
    (add-to-list 'org-agenda-custom-commands
                 '("1" "Tomorrow"
                   tags-todo "SCHEDULED=\"<+1d>\""
                   ((org-agenda-overriding-header "Tomorrow"))) t)
--8<---------------cut here---------------end--------------->8---

However, you'll "lose" timed tasks such as:

--8<---------------cut here---------------start------------->8---
** TODO Check weekend hours at the gym
   DEADLINE: <2013-09-13 Fri 12:30>
--8<---------------cut here---------------end--------------->8---

Hence, you need to write a more complex expression, like:

--8<---------------cut here---------------start------------->8---
    (add-to-list 'org-agenda-custom-commands
                 '("2" "Tomorrow"
                   tags-todo "SCHEDULED>=\"<+1d>\"+SCHEDULED<\"<+2d>\""
                   ((org-agenda-overriding-header "Tomorrow (full)"))) t)
--8<---------------cut here---------------end--------------->8---

Is there a better way to write such a basic request?

Best regards,
  Seb

-- 
Sebastien Vauban




reply via email to

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