Re: [O] View inherited DEADLINEs in agenda

2012-04-11 Thread Vedang
Hi All,

I had asked a similar question on StackOverflow a long time ago
(http://stackoverflow.com/questions/4872088/is-there-any-way-for-subtasks-to-inherit-deadlines-in-org-mode)
and one of the answers was useful to me - namely,
http://stackoverflow.com/a/8920418/137430.

Adding the answer here for sake of completion.

How about a function for adding subtasks? This one adds a deadline to
the subtask if its parent has one:

(defun my-org-insert-sub-task ()
  (interactive)
  (let ((parent-deadline (org-get-deadline-time nil)))
(org-goto-sibling)
(org-insert-todo-subheading t)
(when parent-deadline
  (org-deadline nil parent-deadline

Don't forget to bind it to a key:

(define-key org-mode-map (kbd C-c s) 'my-org-insert-sub-task)


On Tue, Apr 3, 2012 at 12:46 PM, Bastien b...@gnu.org wrote:

 Hi Fabrizio,

 Fabrizio Chiarello fabrizio.chiare...@ieee.org writes:

  I solved by adding the following block in the agenda:

 This is a nice and useful hack.

 Can you consider adding it to Worg/org-hacks.org?

 If you want, just send me the .org content that I would
 add to org-hacks.org.  Otherwise send me your public key
 and I'll give you write access to Worg.

 Thanks in advance for your contribution!

 --
  Bastien




--
Unix is simple. It takes a genius to understand it's simplicity.    -    Anon
People think it must be fun to be a super genius, but they don't
realize how hard it is to put up with all the idiots in the world.
-    Calvin.

Cheers,
Vedang.

Programmer,
Infinitely Beta.
http://twitter.com/vedang
http://vedang.me



Re: [O] View inherited DEADLINEs in agenda

2012-04-03 Thread Bastien
Hi Fabrizio,

Fabrizio Chiarello fabrizio.chiare...@ieee.org writes:

 I solved by adding the following block in the agenda:

This is a nice and useful hack.

Can you consider adding it to Worg/org-hacks.org?

If you want, just send me the .org content that I would
add to org-hacks.org.  Otherwise send me your public key
and I'll give you write access to Worg.

Thanks in advance for your contribution!

-- 
 Bastien



Re: [O] View inherited DEADLINEs in agenda

2011-11-09 Thread Carsten Dominik

On 8.11.2011, at 23:35, Brian van den Broek wrote:

 On 7 November 2011 16:29, Carsten Dominik carsten.domi...@gmail.com wrote:
 
 On Nov 7, 2011, at 1:19 PM, Giovanni Ridolfi wrote:
 
 Fabrizio Chiarello fabrizio.chiare...@ieee.org writes:
 
 
 I have many tasks with a DEADLINE, and I wish to have their subtasks to
 inherit such DEADLINE. To this aim, I set:
 
  (setq org-use-property-inheritance (quote (DEADLINE)))
 
 
 The problem is that the agenda only shows deadlines for the tasks that
 define them
 
 is DEADLINE  a property that can be inherited?
 
 Deadlines can currently *not* be inherited.  I would probably advice
 against implementing this because of performance issues that would
 result for the construction of the agenda.
 
 - Carsten
 
 
 Hi all,
 
 Here's a thought: what about a function which scans a subtree of an
 item that has a deadline and adds that same deadline to any
 descendants that lack a deadline? It seems to me that this would, via
 a one time user intervention, meet the OP's need, without the constant
 overhead  about which Carsten is concerned.

This is a good idea and very easy to do.
The only disadvantage is that any new entries you make
would not get the deadline.  Though, I think, one
could put a function into org-insert-heading-hook
to check for a deadline higher up in the tree and copy it.

- Carsten

 
 It further occurred to me that invoked without arguments, it would
 prompt the user for each item without deadline, with a prefix
 argument, apply all the deadlines automatically, and, with a numeric
 prefix n, automatically apply the alterations n-levels down.
 
 Best,
 
 Brian vdB




Re: [O] View inherited DEADLINEs in agenda

2011-11-08 Thread Brian van den Broek
On 7 November 2011 16:29, Carsten Dominik carsten.domi...@gmail.com wrote:

 On Nov 7, 2011, at 1:19 PM, Giovanni Ridolfi wrote:

 Fabrizio Chiarello fabrizio.chiare...@ieee.org writes:


 I have many tasks with a DEADLINE, and I wish to have their subtasks to
 inherit such DEADLINE. To this aim, I set:

  (setq org-use-property-inheritance (quote (DEADLINE)))


 The problem is that the agenda only shows deadlines for the tasks that
 define them

 is DEADLINE  a property that can be inherited?

 Deadlines can currently *not* be inherited.  I would probably advice
 against implementing this because of performance issues that would
 result for the construction of the agenda.

 - Carsten


Hi all,

Here's a thought: what about a function which scans a subtree of an
item that has a deadline and adds that same deadline to any
descendants that lack a deadline? It seems to me that this would, via
a one time user intervention, meet the OP's need, without the constant
overhead  about which Carsten is concerned.

It further occurred to me that invoked without arguments, it would
prompt the user for each item without deadline, with a prefix
argument, apply all the deadlines automatically, and, with a numeric
prefix n, automatically apply the alterations n-levels down.

Best,

Brian vdB



[O] View inherited DEADLINEs in agenda

2011-11-07 Thread Fabrizio Chiarello
Hi all,

I have many tasks with a DEADLINE, and I wish to have their subtasks to
inherit such DEADLINE. To this aim, I set:

  (setq org-use-property-inheritance (quote (DEADLINE)))

The problem is that the agenda only shows deadlines for the tasks that
define them (the parent tasks) and not for the subtasks. Is there a way
to view the inherited deadlines in the agenda?

Thanks in advance,
fc

-- 
Fabrizio Chiarello fabrizio.chiare...@ieee.org
Photonics and Electromagnetics Group
Department of Information Engineering
University of Padova, Italy

Planets are too dim to be detected with existing equipment, far away,
except in these very special circumstances where they're seen by their
gravitational effect.
  -- Murray Gell-Mann



Re: [O] View inherited DEADLINEs in agenda

2011-11-07 Thread Giovanni Ridolfi
Fabrizio Chiarello fabrizio.chiare...@ieee.org writes:


 I have many tasks with a DEADLINE, and I wish to have their subtasks to
 inherit such DEADLINE. To this aim, I set:

   (setq org-use-property-inheritance (quote (DEADLINE)))


 The problem is that the agenda only shows deadlines for the tasks that
 define them 

is DEADLINE  a property that can be inherited?

would you please post an example file?
Thanks,

Giovanni





Re: [O] View inherited DEADLINEs in agenda

2011-11-07 Thread suvayu ali
On Mon, Nov 7, 2011 at 13:19, Giovanni Ridolfi
giovanni.rido...@yahoo.it wrote:
 Fabrizio Chiarello fabrizio.chiare...@ieee.org writes:


 I have many tasks with a DEADLINE, and I wish to have their subtasks to
 inherit such DEADLINE. To this aim, I set:

   (setq org-use-property-inheritance (quote (DEADLINE)))


 The problem is that the agenda only shows deadlines for the tasks that
 define them

 is DEADLINE  a property that can be inherited?

 would you please post an example file?

I don't think DEADLINE is a property at all.

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] View inherited DEADLINEs in agenda

2011-11-07 Thread Gustav Wikström
I second this.

Tt would seem logical (to me at least) that the deadline should be
inherited. I.e. in order to finish the project in time one has to also
finish the subtasks in time.

Right now the following property is illogical from this point of view:

  (setq org-agenda-dim-blocked-tasks 'invisible)

since it hides the parent in the agenda even if the date is in the past!

/Gustav

On Mon, Nov 7, 2011 at 2:16 PM, Fabrizio Chiarello
fabrizio.chiare...@ieee.org wrote:
 On Mon, Nov 07, 2011 at 01:22:31PM +0100, suvayu ali wrote:
 On Mon, Nov 7, 2011 at 13:19, Giovanni Ridolfi
 giovanni.rido...@yahoo.it wrote:
  Fabrizio Chiarello fabrizio.chiare...@ieee.org writes:
 
 
  I have many tasks with a DEADLINE, and I wish to have their subtasks to
  inherit such DEADLINE. To this aim, I set:
 
    (setq org-use-property-inheritance (quote (DEADLINE)))
 
 
  The problem is that the agenda only shows deadlines for the tasks that
  define them
 
  is DEADLINE  a property that can be inherited?
 
  would you please post an example file?

 I don't think DEADLINE is a property at all.


 In my org 7.7 manual, in section 7.2 Special properties, DEADLINE is
 defined as a (special) property.

 By the way, consider the following example:

 * TODO parent
  DEADLINE: 2011-12-31 Sat
 ** TODO child A
 ** TODO child B
   DEADLINE: 2011-11-30 Wed
 ** TODO child C

 In my workflow, to mark parent as DONE i have to complete child A,B
 and C. And it would be nice to have child A and C inherit the DEADLINE
 from the parent, and to show up in the agenda. Any idea?

 --
 Fabrizio Chiarello fabrizio.chiare...@ieee.org
 Photonics and Electromagnetics Group
 Department of Information Engineering
 University of Padova, Italy

 Intelligence is quickness to apprehend as distinct form ability, which
 is capacity to act wisely on the thing apprehended.
  -- Alfred North Whitehead





Re: [O] View inherited DEADLINEs in agenda

2011-11-07 Thread Carsten Dominik

On Nov 7, 2011, at 1:19 PM, Giovanni Ridolfi wrote:

 Fabrizio Chiarello fabrizio.chiare...@ieee.org writes:
 
 
 I have many tasks with a DEADLINE, and I wish to have their subtasks to
 inherit such DEADLINE. To this aim, I set:
 
  (setq org-use-property-inheritance (quote (DEADLINE)))
 
 
 The problem is that the agenda only shows deadlines for the tasks that
 define them 
 
 is DEADLINE  a property that can be inherited?

Deadlines can currently *not* be inherited.  I would probably advice
against implementing this because of performance issues that would
result for the construction of the agenda.

- Carsten

 
 would you please post an example file?
 Thanks,
 
 Giovanni
 
 
 

- Carsten