emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Ignacio Casso <ignaciocasso@hotmail.com>
To: Ihor Radchenko <yantar92@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: [BUG] Inconsistent behaviour of TODO + COMMENT + TODO dependencies + agenda? [9.5 (9.5-g0a86ad @ /home/ignacio/.emacs.d/elpa/org-9.5/)]
Date: Sun, 07 Aug 2022 22:49:25 +0200	[thread overview]
Message-ID: <AM8P250MB019891FCD0B4CB9A93DDEF52C6609@AM8P250MB0198.EURP250.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <8735ekm5f4.fsf@localhost>


>> P.D: Just when I was going to send this I tried to investigate it a
>> little bit more to not waste anyone's time, and I found the variable
>> 'org-agenda-skip-comment-trees', which defaults to 't'. So now I see that
>> if it is set to 'nil' it would not be inconsistent to me anymore, but I
>> still think that the default behaviour is inconsistent, or at least
>> unintituive for newcomers, and that maybe a corresponding variable like
>> 'org-dependencies-skip-comment-trees' might be needed.
>
> This makes sense. The new variable should default to the old behaviour -
> we do not want to break existing Org files relying on it.
>
> Patches are welcome!

I was going to write one, but I have found further inconsistencies and
incomplete documentation and I think we should clearly define first how
we want dependencies to behave. According to the Org Mode documentation
and the docstrings of `org-enforce-todo-dependencies' and
`org-block-todo-from-children-or-siblings-or-parent', tasks are blocked
when:

  1. The task has undone children tasks.

  2. A task has a parent with the property :ORDERED:, and there
     are undone sibling tasks prior to the current task

  3. The parent of the task is blocked because it has siblings that should
     be done first, or is child of a blocked grandparent TODO entry."

But they are actually blocked when:

  1. The task has undone DESCENDANT tasks (i.e., undone children of
  children also block)

  2. A task has a parent with the property :ORDERED:, and there
     are sibling tasks prior to the current task which are undone OR
     HAVE UNDONE DESCENDANTS

  3. The parent of the task is blocked because it has siblings that should
     be done first, or is child of a blocked grandparent TODO entry. BUT
     THE TASK IS NOT BLOCKED E.G., IF ITS GRANDPARENT IS BLOCKED AND IS
     PARENT IS DONE OR HAS NO TODO STATE.

So my other issues are:

- Remarks in upper case in points 1 and 2 should be clarified in the
  documentation and docstrings, if that is actually the desired
  behaviour and not a bug. Otherwise, they should be fixed. I can do
  that in the same patch.

- I also find inconsistent that in points 1 and 2 not only parents and
  children are considered for blocking but also further ancestors and
  descendants, but in point three only a direct chain of blocked parents
  is considered.


What do you think about them? I'll start writing the original patch for
now, let me know if you want me to address any of those points too while
I'm at it.

Ignacio


  reply	other threads:[~2022-08-07 21:32 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-09 12:19 [BUG] Inconsistent behaviour of TODO + COMMENT + TODO dependencies + agenda? [9.5 (9.5-g0a86ad @ /home/ignacio/.emacs.d/elpa/org-9.5/)] Ignacio Casso
2022-07-29 13:09 ` Ihor Radchenko
2022-08-07 20:49   ` Ignacio Casso [this message]
2022-09-15  8:34     ` Ihor Radchenko

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=AM8P250MB019891FCD0B4CB9A93DDEF52C6609@AM8P250MB0198.EURP250.PROD.OUTLOOK.COM \
    --to=ignaciocasso@hotmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=yantar92@gmail.com \
    /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).