From mboxrd@z Thu Jan 1 00:00:00 1970 From: jorge.alfaro-murillo@yale.edu (Jorge A. Alfaro-Murillo) Subject: Re: Sparse tree for undated TODOs, or hierachical agenda? Date: Tue, 21 Apr 2015 13:11:44 -0400 Message-ID: <87zj61h0dr.fsf@yale.edu> References: <87fv7yhzx3.fsf@vostro.rath.org> <87r3rdzi5z.fsf@yale.edu> <87zj614htm.fsf@thinkpad.rath.org> Mime-Version: 1.0 Content-Type: text/plain; format=flowed Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:52261) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YkbiK-0007yH-1t for emacs-orgmode@gnu.org; Tue, 21 Apr 2015 13:12:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YkbiF-0004qS-W0 for emacs-orgmode@gnu.org; Tue, 21 Apr 2015 13:12:00 -0400 Received: from plane.gmane.org ([80.91.229.3]:37720) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YkbiF-0004qE-Pv for emacs-orgmode@gnu.org; Tue, 21 Apr 2015 13:11:55 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1YkbiD-0006s3-KL for emacs-orgmode@gnu.org; Tue, 21 Apr 2015 19:11:53 +0200 Received: from nat-130-132-173-151.central.yale.edu ([130.132.173.151]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 21 Apr 2015 19:11:53 +0200 Received: from jorge.alfaro-murillo by nat-130-132-173-151.central.yale.edu with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 21 Apr 2015 19:11:53 +0200 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: emacs-orgmode@gnu.org Nikolaus Rath writes: > Jorge A. Alfaro-Murillo writes: >> If you want to restrict to your current document before >> building the agenda use '<', so if 'C-c a' calls your agenda >> (suggested org key), then you can do 'C-c a < a' to get the >> agenda restricted to the buffer that you are in. > > Well, yes, but that still throws away all the headings. E.g. > > * Task 1 ** TODO Do A ** Other stuff * Task 2 ** TODO Do B ** > TODO Do C > SCHEDULED: <2015-05-31 Sun> > > becomes (after C-c a t): > > * TODO Do A * TODO Do B > > What I would like to get is > > * Task 1 ** TODO Do A * Task 2 ** TODO Do B >> I do not know what you mean by sparse tree, > > The sparse tree is what you get with C-c \ t (org-sparse-tree). > For the above example, you get: > > * Task 1 ** TODO Do A * Task 2 ** TODO Do B ** TODO Do C > SCHEDULED: <2015-05-31 Sun> > > so the structure is conserved like I want, but even with.. > >> but this excludes anything scheduled or with a deadline from >> the global todo list: >> >> #+BEGIN_SRC emacs-lisp >> (setq org-agenda-todo-ignore-scheduled 'all) (setq >> org-agenda-todo-ignore-deadlines 'all) >> #+END_SRC > > .. the scheduled items are still included (because the todo-* > settings apply only to the Agenda view, not the sparse tree > view). It seems to me that these are two different issues. If you want the TODO list in the org-agenda to show your headlines you can configure the view to show breadcrumbs (and order by category): #+BEGIN_SRC emacs-lisp (setq org-agenda-prefix-format '((agenda . " %i %-12:c%?-12t% s") (timeline . " % s") (todo . " %i %-12:c%-24:b") (tags . " %i %-12:c") (search . " %i %-12:c"))) (setq org-agenda-sorting-strategy ((agenda habit-down time-up priority-down category-keep) (todo category-keep) (tags priority-down category-keep) (search category-keep))) #+END_SRC Now, if you want to narrow the agenda (C-c a) or org-sparse-tree (C-c /) to show TODO items not SCHEDULED or DEADLINE'd use the key 'm' and the following match: -SCHEDULED={.+}-DEADLINE={.+}+TODO="TODO" Best, -- Jorge.