emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nikolaus Rath <Nikolaus@rath.org>
To: emacs-orgmode@gnu.org
Subject: Re: Sparse tree for undated TODOs, or hierachical agenda?
Date: Tue, 21 Apr 2015 14:08:09 -0700	[thread overview]
Message-ID: <87iocp42bq.fsf@thinkpad.rath.org> (raw)
In-Reply-To: <87zj61h0dr.fsf@yale.edu> (Jorge A. Alfaro-Murillo's message of "Tue, 21 Apr 2015 13:11:44 -0400")

On Apr 21 2015, jorge.alfaro-murillo@yale.edu (Jorge A. Alfaro-Murillo) wrote:
> 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

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-keep) > (search category-keep)))
  eval((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))) 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 
> (C-c /) to show TODO items not SCHEDULED or DEADLINE'd use the key 
> 'm' and the following match:
>
> -SCHEDULED={.+}-DEADLINE={.+}+TODO="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

-- 
GPG encrypted emails preferred. Key id: 0xD113FCAC3C4E599F
Fingerprint: ED31 791B 2C5C 1613 AF38 8B8A D113 FCAC 3C4E 599F

             »Time flies like an arrow, fruit flies like a Banana.«

  reply	other threads:[~2015-04-21 21:08 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-18  3:35 Sparse tree for undated TODOs, or hierachical agenda? Nikolaus Rath
2015-04-21  1:16 ` Nikolaus Rath
2015-04-21 14:10 ` Jorge A. Alfaro-Murillo
2015-04-21 15:35   ` Nikolaus Rath
2015-04-21 17:11     ` Jorge A. Alfaro-Murillo
2015-04-21 21:08       ` Nikolaus Rath [this message]
2015-04-21 23:03         ` How to match TODO items not SCHEDULED or DEADLINE'd (was: Sparse tree for undated TODOs, or hierachical agenda?) Nikolaus Rath
2015-04-22 14:03           ` How to match TODO items not SCHEDULED or DEADLINE'd Jorge A. Alfaro-Murillo
2015-04-22 15:49             ` Nicolas Goaziou
2015-04-22 16:10               ` Jorge A. Alfaro-Murillo
2015-04-21 23:08         ` Sparse tree for undated TODOs, or hierachical agenda? Nikolaus Rath
2015-04-22 13:52         ` Jorge A. Alfaro-Murillo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87iocp42bq.fsf@thinkpad.rath.org \
    --to=nikolaus@rath.org \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).