From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Sebastien Vauban" Subject: How to avoid time part in date comparisons? Date: Thu, 12 Sep 2013 14:27:14 +0200 Message-ID: <86ppseuswt.fsf@somewhere.org> Mime-Version: 1.0 Content-Type: text/plain Return-path: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org-mXXj517/zsQ@public.gmane.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org-mXXj517/zsQ@public.gmane.org To: emacs-orgmode-mXXj517/zsQ@public.gmane.org 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