emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Orgmode] Can't make TODO dependencies work


From: Carsten Dominik
Subject: Re: [Orgmode] Can't make TODO dependencies work
Date: Sun, 1 Feb 2009 20:38:21 +0100

In fact, we need a FAQ about this issue:

Several variables in Org must already be set a load time.
This is one of the reasons why you should not use (require 'org)
in your setup, but better only (require 'org-install).

However, org.el will also get loaded when you require some
other org-... file, for example an add-on from the contrib
directory.

The right way is therefore *always* this (a general Emacs truth).

First, set all your variables.  Then load the package.

In this particular example, the problem is the following:
Setting the variables for the todo dependencies triggers
adding functions to org-blocker-hook, at load time for org.el.

I *could* do a different implementation, where the functions
are always in the blocker hook, but are only active when the
variables are set.  However, the problem is then that it is
difficult to see from the outside if the hook is doing something,
and I want to use that knowledge to avoid overhead in the
agenda for people who do not use todo dependencies.

- Carsten


On Feb 1, 2009, at 8:21 PM, Carsten Dominik wrote:


On Feb 1, 2009, at 7:23 PM, John Rakestraw wrote:

On Sun, 1 Feb 2009 19:03:46 +0100
Carsten Dominik <address@hidden> wrote:

This is misleading. I realized that dependencies *do* work
consistently
in the minimal configuration. With the header line in the test
file, I can change the main task from TODO to STARTED (or to any of
the other non-done states), but I'm blocked from changing it to
DONE.

This is how it should be.

I agree -- that's why I apologized for introducing that point.

But they still don't work with my usual configuration.

Well, if the value of org-blocker-hook is nil in this case, I
am not surprised!   Why is it nil?  If you set the
org-enforce... variables, the hook should be filled
with the two functions.

I don't know why it's nil. However, I've discovered a bit more. It
seems that the problem is that my settings in my org-config file:

(setq org-enforce-todo-dependencies t)
(setq org-agenda-dim-blocked-tasks 'invisible)
(setq org-enforce-todo-checkbox-dependencies t)

didn't prompt the required change in the value of org-blocker-hook.
With these lines in my org config file, the values of the three
variables are as expected, but the value of org-blocker-hook remains
nil, even if I stop and re-start emacs.

You need to set these variables before org.el is loaded.

- Carsten




When I change the value of org-enforce-todo-dependencies using
customize, then the value of org-blocker-hook is what it should be, and
the dependencies work, even if I stop and re-start emacs.

So presumably something else in my config file is keeping
org-blocker-hook from being re-set?

I'd prefer not to use the customize function, so I'd hoped to set it in
my config file.

Thanks, and apologies for not sorting through this a bit more before
the initial post.

--John








reply via email to

[Prev in Thread] Current Thread [Next in Thread]