* View inherited DEADLINEs in agenda @ 2011-11-07 12:03 Fabrizio Chiarello 2011-11-07 12:19 ` Giovanni Ridolfi 0 siblings, 1 reply; 12+ messages in thread From: Fabrizio Chiarello @ 2011-11-07 12:03 UTC (permalink / raw) To: emacs-orgmode 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.chiarello@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 ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: View inherited DEADLINEs in agenda 2011-11-07 12:03 View inherited DEADLINEs in agenda Fabrizio Chiarello @ 2011-11-07 12:19 ` Giovanni Ridolfi 2011-11-07 12:22 ` suvayu ali 2011-11-07 14:29 ` Carsten Dominik 0 siblings, 2 replies; 12+ messages in thread From: Giovanni Ridolfi @ 2011-11-07 12:19 UTC (permalink / raw) To: Fabrizio Chiarello; +Cc: emacs-orgmode Fabrizio Chiarello <fabrizio.chiarello@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 ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: View inherited DEADLINEs in agenda 2011-11-07 12:19 ` Giovanni Ridolfi @ 2011-11-07 12:22 ` suvayu ali 2011-11-07 13:16 ` Fabrizio Chiarello 2011-11-07 14:29 ` Carsten Dominik 1 sibling, 1 reply; 12+ messages in thread From: suvayu ali @ 2011-11-07 12:22 UTC (permalink / raw) To: Giovanni Ridolfi; +Cc: emacs-orgmode, Fabrizio Chiarello On Mon, Nov 7, 2011 at 13:19, Giovanni Ridolfi <giovanni.ridolfi@yahoo.it> wrote: > Fabrizio Chiarello <fabrizio.chiarello@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. ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: View inherited DEADLINEs in agenda 2011-11-07 12:22 ` suvayu ali @ 2011-11-07 13:16 ` Fabrizio Chiarello 2011-11-07 13:23 ` Gustav Wikström 0 siblings, 1 reply; 12+ messages in thread From: Fabrizio Chiarello @ 2011-11-07 13:16 UTC (permalink / raw) To: suvayu ali; +Cc: emacs-orgmode On Mon, Nov 07, 2011 at 01:22:31PM +0100, suvayu ali wrote: > On Mon, Nov 7, 2011 at 13:19, Giovanni Ridolfi > <giovanni.ridolfi@yahoo.it> wrote: > > Fabrizio Chiarello <fabrizio.chiarello@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.chiarello@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 ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: View inherited DEADLINEs in agenda 2011-11-07 13:16 ` Fabrizio Chiarello @ 2011-11-07 13:23 ` Gustav Wikström 0 siblings, 0 replies; 12+ messages in thread From: Gustav Wikström @ 2011-11-07 13:23 UTC (permalink / raw) To: Fabrizio Chiarello; +Cc: emacs-orgmode 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.chiarello@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.ridolfi@yahoo.it> wrote: >> > Fabrizio Chiarello <fabrizio.chiarello@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.chiarello@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 > > ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: View inherited DEADLINEs in agenda 2011-11-07 12:19 ` Giovanni Ridolfi 2011-11-07 12:22 ` suvayu ali @ 2011-11-07 14:29 ` Carsten Dominik 2011-11-07 19:46 ` Fabrizio Chiarello 2011-11-08 22:35 ` Brian van den Broek 1 sibling, 2 replies; 12+ messages in thread From: Carsten Dominik @ 2011-11-07 14:29 UTC (permalink / raw) To: Giovanni Ridolfi; +Cc: emacs-orgmode, Fabrizio Chiarello On Nov 7, 2011, at 1:19 PM, Giovanni Ridolfi wrote: > Fabrizio Chiarello <fabrizio.chiarello@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 ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: View inherited DEADLINEs in agenda 2011-11-07 14:29 ` Carsten Dominik @ 2011-11-07 19:46 ` Fabrizio Chiarello 2011-11-08 22:35 ` Brian van den Broek 1 sibling, 0 replies; 12+ messages in thread From: Fabrizio Chiarello @ 2011-11-07 19:46 UTC (permalink / raw) To: Carsten Dominik; +Cc: emacs-orgmode On Mon, Nov 07, 2011 at 03:29:41PM +0100, Carsten Dominik wrote: > > On Nov 7, 2011, at 1:19 PM, Giovanni Ridolfi wrote: > > > Fabrizio Chiarello <fabrizio.chiarello@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 > Do you have any suggestion on how to implement the inherit of DEADLINE from parent and how to show them in the agenda? At least for me, having this feature working would repay the extra computation time required for the construction of the agenda. Thanks in advance, F. -- Fabrizio Chiarello <fabrizio.chiarello@ieee.org> Photonics and Electromagnetics Group Department of Information Engineering University of Padova, Italy For many people my software is something that you install and forget. I like to keep it that way. -- Wietse Venema ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: View inherited DEADLINEs in agenda 2011-11-07 14:29 ` Carsten Dominik 2011-11-07 19:46 ` Fabrizio Chiarello @ 2011-11-08 22:35 ` Brian van den Broek 2011-11-09 8:10 ` Carsten Dominik 1 sibling, 1 reply; 12+ messages in thread From: Brian van den Broek @ 2011-11-08 22:35 UTC (permalink / raw) To: Carsten Dominik; +Cc: emacs-orgmode, Fabrizio Chiarello On 7 November 2011 16:29, Carsten Dominik <carsten.dominik@gmail.com> wrote: > > On Nov 7, 2011, at 1:19 PM, Giovanni Ridolfi wrote: > >> Fabrizio Chiarello <fabrizio.chiarello@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 ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: View inherited DEADLINEs in agenda 2011-11-08 22:35 ` Brian van den Broek @ 2011-11-09 8:10 ` Carsten Dominik 2011-11-14 13:38 ` Fabrizio Chiarello 0 siblings, 1 reply; 12+ messages in thread From: Carsten Dominik @ 2011-11-09 8:10 UTC (permalink / raw) To: Brian van den Broek; +Cc: emacs-orgmode, Fabrizio Chiarello On 8.11.2011, at 23:35, Brian van den Broek wrote: > On 7 November 2011 16:29, Carsten Dominik <carsten.dominik@gmail.com> wrote: >> >> On Nov 7, 2011, at 1:19 PM, Giovanni Ridolfi wrote: >> >>> Fabrizio Chiarello <fabrizio.chiarello@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 ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: View inherited DEADLINEs in agenda 2011-11-09 8:10 ` Carsten Dominik @ 2011-11-14 13:38 ` Fabrizio Chiarello 2012-04-03 7:16 ` Bastien 0 siblings, 1 reply; 12+ messages in thread From: Fabrizio Chiarello @ 2011-11-14 13:38 UTC (permalink / raw) To: emacs-orgmode; +Cc: Brian van den Broek, Carsten Dominik On Wed, Nov 09, 2011 at 09:10:57AM +0100, Carsten Dominik wrote: > > On 8.11.2011, at 23:35, Brian van den Broek wrote: > > > On 7 November 2011 16:29, Carsten Dominik <carsten.dominik@gmail.com> wrote: > >> > >> On Nov 7, 2011, at 1:19 PM, Giovanni Ridolfi wrote: > >> > >>> Fabrizio Chiarello <fabrizio.chiarello@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 > I solved by adding the following block in the agenda: ;;; (setq org-agenda-custom-commands '( ... (" " "Agenda" ( ... (todo "TODO|CANCELLED|NEXT|STARTED|WAITING|HOLD" ((org-agenda-overriding-header "Inheritable DEADLINEs") (org-agenda-skip-function 'fc/skip-non-inheritable-deadlines))) )))) ;;; which shows the tasks without deadline that can inherit a deadline from one of the parents. Then with the following keys I can set the deadline of a task to that of the parent directly in the agenda. ;;; (add-hook 'org-agenda-mode-hook (lambda () (org-defkey org-agenda-mode-map "D" 'fc/org-agenda-inherit-deadline)) 'append) ;;; The rest of the functions are below ;;; (defun fc/has-inheritable-deadline-p () "Any task (without DEADLINE) that can inherit a DEADLINE" (let ((deadline (org-entry-get nil "DEADLINE")) (inheritable-deadline (org-entry-get-with-inheritance "DEADLINE"))) (if (org-not-nil deadline) nil (if (org-not-nil inheritable-deadline) t nil)))) (defun fc/skip-non-inheritable-deadlines () "Skip tasks that cannot inherit a DEADLINE" (let* ((next-headline (save-excursion (or (outline-next-heading) (point-max))))) (if (fc/has-inheritable-deadline-p) nil next-headline))) (defun fc/org-inherit-deadline () "Inherit a DEADLINE." (interactive) (let* ((deadline (org-entry-get-with-inheritance "DEADLINE"))) (if (and (org-not-nil deadline) (y-or-n-p (format "Inherit DEADLINE: <%s>? " deadline))) (org-deadline nil (org-time-string-to-time deadline))))) (defun fc/org-agenda-inherit-deadline (&optional arg) "Inherit a DEADLINE in agenda." (interactive "P") (let* ((marker (or (org-get-at-bol 'org-marker) (org-agenda-error))) (hdmarker (or (org-get-at-bol 'org-hd-marker) marker)) (pos (marker-position marker)) newhead) (org-with-remote-undo (marker-buffer marker) (with-current-buffer (marker-buffer marker) (widen) (goto-char pos) (org-show-context 'agenda) (org-show-entry) (org-cycle-hide-drawers 'children) (fc/org-inherit-deadline) (setq newhead (org-get-heading))) (org-agenda-change-all-lines newhead hdmarker)))) ;;; -- Fabrizio Chiarello <fabrizio.chiarello@ieee.org> Photonics and Electromagnetics Group Department of Information Engineering University of Padova, Italy Wisdom alone is true ambition's aim, wisdom is the source of virtue and of fame; obtained with labour, for mankind employed, and then, when most you share it, best enjoyed. -- Alfred North Whitehead ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: View inherited DEADLINEs in agenda 2011-11-14 13:38 ` Fabrizio Chiarello @ 2012-04-03 7:16 ` Bastien 2012-04-11 13:38 ` Vedang 0 siblings, 1 reply; 12+ messages in thread From: Bastien @ 2012-04-03 7:16 UTC (permalink / raw) To: Fabrizio Chiarello; +Cc: Brian van den Broek, emacs-orgmode, Carsten Dominik Hi Fabrizio, Fabrizio Chiarello <fabrizio.chiarello@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 ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: View inherited DEADLINEs in agenda 2012-04-03 7:16 ` Bastien @ 2012-04-11 13:38 ` Vedang 0 siblings, 0 replies; 12+ messages in thread From: Vedang @ 2012-04-11 13:38 UTC (permalink / raw) To: Bastien Cc: Brian van den Broek, emacs-orgmode, Fabrizio Chiarello, Carsten Dominik 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 <bzg@gnu.org> wrote: > > Hi Fabrizio, > > Fabrizio Chiarello <fabrizio.chiarello@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 ^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2012-04-11 13:38 UTC | newest] Thread overview: 12+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2011-11-07 12:03 View inherited DEADLINEs in agenda Fabrizio Chiarello 2011-11-07 12:19 ` Giovanni Ridolfi 2011-11-07 12:22 ` suvayu ali 2011-11-07 13:16 ` Fabrizio Chiarello 2011-11-07 13:23 ` Gustav Wikström 2011-11-07 14:29 ` Carsten Dominik 2011-11-07 19:46 ` Fabrizio Chiarello 2011-11-08 22:35 ` Brian van den Broek 2011-11-09 8:10 ` Carsten Dominik 2011-11-14 13:38 ` Fabrizio Chiarello 2012-04-03 7:16 ` Bastien 2012-04-11 13:38 ` Vedang
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).