emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Samuel Loury <konubinix@gmail.com>
To: Nikolaus Rath <Nikolaus@rath.org>, emacs-orgmode@gnu.org
Subject: Re: Hiding "blocked" TODO items
Date: Tue, 07 Apr 2015 09:33:49 +0200	[thread overview]
Message-ID: <87384cpf36.fsf@konixwork.incubateur.ens-lyon.fr> (raw)
In-Reply-To: <87twws8w3y.fsf@vostro.rath.org>

[-- Attachment #1: Type: text/plain, Size: 2111 bytes --]

Dear Nikolaus,

Nikolaus Rath <Nikolaus@rath.org> writes:

> Is there a way to have TODO items "blocking" each other?
>
> For example, if I have this document:
>
> * TODO Pay water
>   :PROPERTIES:
>    :blocked-on: checks
>   :END:
> * TODO Pay electricity
>   :PROPERTIES:
>    :blocked-on: checks
>   :END:
> * TODO Get new checks
>   :PROPERTIES:
>    :id: checks
>   :END:
>
> Then I'd like the first two TODO items not to show up in the agenda
> until the third one is DONE (but I don't much care if the items can be
> manually switched to DONE or not).
>
> I looked at org-depend.el but as far as I can tell, it only allows to
> set up chains of dependencies, i.e. I could have "Pay Water" and "Pay
> electricity" in state NEXT, and have a trigger in "Get new checks" that
> would switch one, but not both, of the NEXT items to TODO.
>
> Do I understand that correctly? Is there some other way to achieve what
> I want?

I think that the dependency could be declared using org-depend but with
the BLOCKER keyword instead of the TRIGGER one. To allow the elements to
still be set to DONE, you could use the NOBLOCKING keyword.

Then, in the agenda view, you could use the org-agenda-skip-function
variable and put something like org-depend-block-todo that would
indicate to skip the blocked items. Sorry to be to lazy to write the
code here...

The outline would look like this:
--8<---------------cut here---------------start------------->8---
* TODO Pay water
  :PROPERTIES:
  :BLOCKER: checks
  :NOBLOCKING: t
  :END:
* TODO Pay electricity
  :PROPERTIES:
  :BLOCKER: checks
  :NOBLOCKING: t
  :END:
* TODO Get new checks
  :PROPERTIES:
  :id: checks
  :END:
--8<---------------cut here---------------end--------------->8---

Having at the same time BLOCKER and NOBLOCKING appears a bit confusing
to me. May be it is not a so good solution and an org-mode guru will
probably correct me :-).

Hoping this was useful.

Best regards,
-- 
Konubinix
GPG Key    : 7439106A
Fingerprint: 5993 BE7A DA65 E2D9 06CE  5C36 75D2 3CED 7439 106A

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 472 bytes --]

      reply	other threads:[~2015-04-07  7:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-07  3:18 Hiding "blocked" TODO items Nikolaus Rath
2015-04-07  7:33 ` Samuel Loury [this message]

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=87384cpf36.fsf@konixwork.incubateur.ens-lyon.fr \
    --to=konubinix@gmail.com \
    --cc=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).