From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nikolaus Rath Subject: Re: Sparse tree for undated TODOs, or hierachical agenda? Date: Tue, 21 Apr 2015 14:08:09 -0700 Message-ID: <87iocp42bq.fsf@thinkpad.rath.org> References: <87fv7yhzx3.fsf@vostro.rath.org> <87r3rdzi5z.fsf@yale.edu> <87zj614htm.fsf@thinkpad.rath.org> <87zj61h0dr.fsf@yale.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:54608) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YkfOv-0006ve-If for emacs-orgmode@gnu.org; Tue, 21 Apr 2015 17:08:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YkfOu-0006rB-2w for emacs-orgmode@gnu.org; Tue, 21 Apr 2015 17:08:13 -0400 Received: from ebox.rath.org ([2600:3c01::f03c:91ff:fe69:db07]:34982) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YkfOt-0006qf-SE for emacs-orgmode@gnu.org; Tue, 21 Apr 2015 17:08:12 -0400 Received: from thinkpad ([192.168.12.2]) by ebox.rath.org with esmtps (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.80) (envelope-from ) id 1YkfOr-0003fU-MM for emacs-orgmode@gnu.org; Tue, 21 Apr 2015 21:08:10 +0000 In-Reply-To: <87zj61h0dr.fsf@yale.edu> (Jorge A. Alfaro-Murillo's message of "Tue, 21 Apr 2015 13:11:44 -0400") 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 On Apr 21 2015, jorge.alfaro-murillo@yale.edu (Jorge A. Alfaro-Murillo) wro= te: > Nikolaus Rath writes: > >> Jorge A. Alfaro-Murillo writes:=20 >>> If you want to restrict to your current document before=20 >>> building the agenda use '<', so if 'C-c a' calls your agenda=20 >>> (suggested org key), then you can do 'C-c a < a' to get the=20 >>> agenda restricted to the buffer that you are in.=20 >>=20 >> Well, yes, but that still throws away all the headings. E.g.=20 >>=20 >> * Task 1 ** TODO Do A ** Other stuff * Task 2 ** TODO Do B **=20 >> TODO Do C=20 >> SCHEDULED: <2015-05-31 Sun>=20 >>=20 >> becomes (after C-c a t):=20 >>=20 >> * TODO Do A * TODO Do B=20 >>=20 >> What I would like to get is=20 >>=20 >> * Task 1 ** TODO Do A * Task 2 ** TODO Do B >=20=20 >>> I do not know what you mean by sparse tree,=20 >>=20 >> The sparse tree is what you get with C-c \ t (org-sparse-tree).=20 >> For the above example, you get:=20 >>=20 >> * Task 1 ** TODO Do A * Task 2 ** TODO Do B ** TODO Do C=20 >> SCHEDULED: <2015-05-31 Sun>=20 >>=20 >> so the structure is conserved like I want, but even with..=20 >>=20 >>> but this excludes anything scheduled or with a deadline from=20 >>> the global todo list:=20 >>>=20 >>> #+BEGIN_SRC emacs-lisp=20 >>> (setq org-agenda-todo-ignore-scheduled 'all) (setq=20 >>> org-agenda-todo-ignore-deadlines 'all)=20 >>> #+END_SRC=20 >>=20 >> .. the scheduled items are still included (because the todo-*=20 >> settings apply only to the Agenda view, not the sparse tree=20 >> view). > > It seems to me that these are two different issues. If you want=20 > the TODO list in the org-agenda to show your headlines you can=20 > 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 For me the second assignment fails with: Debugger entered--Lisp error: (void-variable >) (setq org-agenda-sorting-strategy > ((agenda habit-down time-up priority-= down category-keep) > (todo category-keep) > (tags priority-down category-k= eep) > (search category-keep))) eval((setq org-agenda-sorting-strategy > ((agenda habit-down time-up prio= rity-down category-keep) > (todo category-keep) > (tags priority-down categ= ory-keep) > (search category-keep))) nil) eval-last-sexp-1(nil) eval-last-sexp(nil) call-interactively(eval-last-sexp nil nil) command-execute(eval-last-sexp) If I evaluate just the first one, I'm getting the headlines as an additional column which is better but not yet perfect. > Now, if you want to narrow the agenda (C-c a) or org-sparse-tree=20 > (C-c /) to show TODO items not SCHEDULED or DEADLINE'd use the key=20 > 'm' and the following match: > > -SCHEDULED=3D{.+}-DEADLINE=3D{.+}+TODO=3D"TODO" This, however, works perfectly, thanks a lot! Is this explained anywhere in the documentation? Because I certainly searched for it but could not find anything. (I'm nevertheless interested in trying out your first solution for changing the Agenda view as well). Best, -Nikolaus --=20 GPG encrypted emails preferred. Key id: 0xD113FCAC3C4E599F Fingerprint: ED31 791B 2C5C 1613 AF38 8B8A D113 FCAC 3C4E 599F =C2=BBTime flies like an arrow, fruit flies like a Banana.=C2= =AB