From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bernt Hansen Subject: Re: (no subject) How to sort agenda by timestamps (scheduled/deadline)? Date: Wed, 30 Jan 2013 20:11:29 -0500 Message-ID: <87a9rqyx4u.fsf@norang.ca> References: <87boc6euoy.fsf@norang.ca> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from eggs.gnu.org ([208.118.235.92]:36398) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U0igo-0003ne-Qs for emacs-orgmode@gnu.org; Wed, 30 Jan 2013 20:11:44 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U0ign-0006OG-51 for emacs-orgmode@gnu.org; Wed, 30 Jan 2013 20:11:42 -0500 Received: from mho-04-ewr.mailhop.org ([204.13.248.74]:22060 helo=mho-02-ewr.mailhop.org) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U0ign-0006N0-22 for emacs-orgmode@gnu.org; Wed, 30 Jan 2013 20:11:41 -0500 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@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Martin Beck Cc: emacs-orgmode@gnu.org Martin Beck writes: > Bernt Hansen norang.ca> writes: > >> >> "Martin Beck" web.de> writes: >> >> > I'm trying to create a custom agenda setup for my org-mode and I wonder how > I can sort the agenda-items by >> date (Scheduled >> > or deadline): newest first. >> > >> > I only found time-up / time-down in the parameters, but that does not seem > to do what I need. >> > ... >> >> Hi Martin, >> >> I sort my daily agenda items specifically using a bunch of complicated >> sorting functions. They are all documented here: >> >> http://doc.norang.ca/org-mode.html#AgendaViewTweaks >> >> HTH, >> Bernt >> >> > > Hi Bernt, > > thanks a lot - I'm already working with your setup and currently struggling to > adapt it to my needs, but my elisp/emacs/org-mode knowledge is still too limited. > > Is it true that "time-up" only sorts items which really have a time > (hours/minutes) defined, so it does not also sort everything with > date-timestamps by date? Hi Martin, >From ,----[ C-h v org-agenda-sorting-strategy ] | time-up Put entries with time-of-day indications first, early first | time-down Put entries with time-of-day indications first, late first `---- time-up should sort items with a date stamp and time with earlier times first followed by later times. time-down is the opposite. I don't think this has anything to do with durations. Yes it only seems to affect entries with a time component. On today's daily agenda if I set org-agenda-sorting-strategy to only be time-up then the grid is at the to of the agenda followed by all of the other entries. Any entries with a time are interspersed in the grid. With time-down the grid is in reverse at the bottom of the agenda. > > I tried to modify your Block Agenda by inserting the following block: > > (tags-todo "PRIORITY=\"A\"" ( > (org-agenda-overriding-header "Critical") > (org-agenda-entry-types '(:deadline)) > (org-agenda-sorting-strategy (quote (time-up category-keep))) > (org-agenda-todo-ignore-scheduled 'future) > (org-agenda-todo-ignore-deadlines 'future) > )) > > But unfortunately, it does only display category, TODO-keyword and subject, but > NO information about Deadline or Scheduled date. > > Ho could I insert this additional "column" in the agenda view? I can't make it work in the block agenda but as a standalone agenda does this help? --8<---------------cut here---------------start------------->8--- ("x" "test" tags-todo "PRIORITY=\"A\"" ((org-agenda-overriding-header "Critical") (org-agenda-entry-types '(:deadline)) (org-columns-default-format "%10CATEGORY(Category) %60ITEM(Task) %15DEADLINE(Deadline) %15SCHEDULED(Scheduled)") (org-agenda-view-columns-initially t) (org-agenda-sorting-strategy (quote (time-up category-keep))) (org-agenda-todo-ignore-scheduled 'future) (org-agenda-todo-ignore-deadlines 'future))) --8<---------------cut here---------------end--------------->8--- This starts the agenda in column mode and shows category, task, deadline, scheduled dates. 'q' exits column mode. In the block agenda if you turn on column mode with C-c C-x C-c you get the same information for all tasks in the agenda It's probably not exactly what you were looking for... Regards, Bernt