all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Finding tasks without a specific property set
@ 2008-02-12  6:01 Bernt Hansen
  2008-02-12  9:27 ` Carsten Dominik
  0 siblings, 1 reply; 3+ messages in thread
From: Bernt Hansen @ 2008-02-12  6:01 UTC (permalink / raw)
  To: emacs-orgmode

Hi all,

I'm using properties to track estimated effort on tasks.  I have the
following setup for estimaged effort for tasks and use column view to
set the values normally.

,----[ .emacs settings for property Effort ]
| (setq org-global-properties '(("Effort_ALL" . "0 0:10 0:30 1:00 2:00 3:00 4:00 5:00 6:00 7:00 8:00")))
| (setq org-columns-default-format "%40ITEM(Task) %17Effort(Estimated Effort){:} %CLOCKSUM")
|
| (custom-set-variables
|  '(org-agenda-custom-commands (quote (("W" "Waiting Tasks" tags "/WAITING" nil) 
| 				      ("n" "Next Tasks" tags "/NEXT" nil) 
| 				      ("N" "Next Tasks - No Specified Duration" tags "-Effort=\"0:10\"-Effort=\"0:30\"-Effort=\"1:00\"-Effort=\"2:00\"-Effort=\"3:00\"-Effort=\"4:00\"-Effort=\"5:00\"-Effort=\"6:00\"-Effort=\"7:00\"-Effort=\"8:00\"/NEXT" nil)
| 				      ("h" "Next Home Tasks" tags "@home/NEXT" nil)
| 				      ("w" "Next Work Tasks" tags "@work/NEXT" nil)
| 				      ("E" "Errands To Run" tags "@errand/-DONE-CANCELLED" nil)
| 				      ("S" "Stuff To Do Someday" tags "/SOMEDAY" nil)))))
`----

One of the things I do regularly (as part of my weekly review) is find
NEXT tasks with no Effort property so I can use column view to add a
value for each task with no effort estimate.  I'm currently using a
custom agenda view (N) for this.

,----[ Tags search for NEXT tasks with no Effort property assigned ]
| Headlines with TAGS match: -Effort="0:10"-Effort="0:30"-Effort="1:00"-Effort="2:00"-Effort="3:00"-Effort="4:00"-Effort="5:00"-Effort="6:00"-Effort="7:00"-Effort="8:00"/NEXT
`----

I haven't found a better way to do this other than to list all possible
Effort property values in a tags search.  What I really want to match is
any NEXT task with no Effort property (or a Effort property value that
is blank)

Is there a way to do that?

I could just do a todo search for NEXT and go to column view and scan
down the list for blank entries... but my list of NEXT tasks is long
(currently 140).  Hmmm actually that isn't too bad and the NEXT todo
search is much faster than my "Next Tasks - No Specified Duration"
search which takes 6-10 seconds to execute.

Maybe I answered my own question :)

Regards,
Bernt

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Finding tasks without a specific property set
  2008-02-12  6:01 Finding tasks without a specific property set Bernt Hansen
@ 2008-02-12  9:27 ` Carsten Dominik
  2008-02-12 16:52   ` Bernt Hansen
  0 siblings, 1 reply; 3+ messages in thread
From: Carsten Dominik @ 2008-02-12  9:27 UTC (permalink / raw)
  To: Bernt Hansen; +Cc: emacs-orgmode

Hi Bernt,

On Feb 12, 2008, at 7:01 AM, Bernt Hansen wrote:

> Hi all,
>
> I'm using properties to track estimated effort on tasks.  I have the
> following setup for estimaged effort for tasks and use column view to
> set the values normally.
>
> ,----[ .emacs settings for property Effort ]
> | (setq org-global-properties '(("Effort_ALL" . "0 0:10 0:30 1:00  
> 2:00 3:00 4:00 5:00 6:00 7:00 8:00")))
> | (setq org-columns-default-format "%40ITEM(Task)  
> %17Effort(Estimated Effort){:} %CLOCKSUM")
> |
> | (custom-set-variables
> |  '(org-agenda-custom-commands (quote (("W" "Waiting Tasks" tags "/ 
> WAITING" nil)
> | 				      ("n" "Next Tasks" tags "/NEXT" nil)
> | 				      ("N" "Next Tasks - No Specified Duration" tags "-Effort= 
> \"0:10\"-Effort=\"0:30\"-Effort=\"1:00\"-Effort=\"2:00\"-Effort= 
> \"3:00\"-Effort=\"4:00\"-Effort=\"5:00\"-Effort=\"6:00\"-Effort= 
> \"7:00\"-Effort=\"8:00\"/NEXT" nil)
> | 				      ("h" "Next Home Tasks" tags "@home/NEXT" nil)
> | 				      ("w" "Next Work Tasks" tags "@work/NEXT" nil)
> | 				      ("E" "Errands To Run" tags "@errand/-DONE-CANCELLED" nil)
> | 				      ("S" "Stuff To Do Someday" tags "/SOMEDAY" nil)))))
> `----
>
> One of the things I do regularly (as part of my weekly review) is find
> NEXT tasks with no Effort property so I can use column view to add a
> value for each task with no effort estimate.  I'm currently using a
> custom agenda view (N) for this.
>
> ,----[ Tags search for NEXT tasks with no Effort property assigned ]
> | Headlines with TAGS match: -Effort="0:10"-Effort="0:30"- 
> Effort="1:00"-Effort="2:00"-Effort="3:00"-Effort="4:00"- 
> Effort="5:00"-Effort="6:00"-Effort="7:00"-Effort="8:00"/NEXT
> `----
>
> I haven't found a better way to do this other than to list all  
> possible
> Effort property values in a tags search.  What I really want to  
> match is
> any NEXT task with no Effort property (or a Effort property value that
> is blank)
>
> Is there a way to do that?


Yes there is: You can use a regular expression matching the empty  
string:

  Effort={^$}/NEXT

What also should work (but does not...) is

  Effort=""/NEXT

This will work in the next version, an I hope to document this with an  
example.

> I could just do a todo search for NEXT and go to column view and scan
> down the list for blank entries... but my list of NEXT tasks is long
> (currently 140).  Hmmm actually that isn't too bad and the NEXT todo
> search is much faster than my "Next Tasks - No Specified Duration"
> search which takes 6-10 seconds to execute.

That is really long.  One possible reason is that you might have  
turned on
property inheritance.  If this is on and you check a property that  
does not
exist locally, Org-mode has to go back all the way to the top level
for each headline it checks.  If you have tuned inheritance on, please
consider to restrict it to a few properties.

Since you are looking only for NEXT entries you can also speed things up
by requiring that the entry is a TODO.  You can do this by using
`tags-todo' instead of `todo' when defining the custom command, or by
writing the search as (note the "!" after the "/").

  Effort={^$}/!NEXT

I'd be interested what happens to your timing with these improvements.

Reasonably cryptic all this, I know.  This is what happens when you
add features with time instead of designing the full thing from the  
start.

> Maybe I answered my own question :)

and I hope I added another perspective.

- Carsten

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Finding tasks without a specific property set
  2008-02-12  9:27 ` Carsten Dominik
@ 2008-02-12 16:52   ` Bernt Hansen
  0 siblings, 0 replies; 3+ messages in thread
From: Bernt Hansen @ 2008-02-12 16:52 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: emacs-orgmode

Carsten Dominik <dominik@science.uva.nl> writes:

> Hi Bernt,

Hi :)

>
> On Feb 12, 2008, at 7:01 AM, Bernt Hansen wrote:
>> One of the things I do regularly (as part of my weekly review) is find
>> NEXT tasks with no Effort property so I can use column view to add a
>> value for each task with no effort estimate.  I'm currently using a
>> custom agenda view (N) for this.
>>
>> ,----[ Tags search for NEXT tasks with no Effort property assigned ]
>> | Headlines with TAGS match: -Effort="0:10"-Effort="0:30"- 
>> Effort="1:00"-Effort="2:00"-Effort="3:00"-Effort="4:00"- 
>> Effort="5:00"-Effort="6:00"-Effort="7:00"-Effort="8:00"/NEXT
>> `----
>>
>> I haven't found a better way to do this other than to list all
>> possible
>> Effort property values in a tags search.  What I really want to
>> match is
>> any NEXT task with no Effort property (or a Effort property value that
>> is blank)
>>
>> Is there a way to do that?
>
>
> Yes there is: You can use a regular expression matching the empty
> string:
>
>  Effort={^$}/NEXT
>
> What also should work (but does not...) is
>
>  Effort=""/NEXT
>
> This will work in the next version, an I hope to document this with an
> example.
>
>> I could just do a todo search for NEXT and go to column view and scan
>> down the list for blank entries... but my list of NEXT tasks is long
>> (currently 140).  Hmmm actually that isn't too bad and the NEXT todo
>> search is much faster than my "Next Tasks - No Specified Duration"
>> search which takes 6-10 seconds to execute.
>

> That is really long.  One possible reason is that you might have
> turned on
> property inheritance.  If this is on and you check a property that
> does not
> exist locally, Org-mode has to go back all the way to the top level
> for each headline it checks.  If you have tuned inheritance on, please
> consider to restrict it to a few properties.

Property inheritance is off.  I think it's probably due to the number of
lines in my org-files that are in org-agenda-files.  These org files
(and yes I archive them... :) currently have 10522 lines totalling
551623 bytes...

>
> Since you are looking only for NEXT entries you can also speed things up
> by requiring that the entry is a TODO.  You can do this by using
> `tags-todo' instead of `todo' when defining the custom command, or by
> writing the search as (note the "!" after the "/").
>
>  Effort={^$}/!NEXT
>

Thanks! That's much faster.

> I'd be interested what happens to your timing with these improvements.

Headlines with TAGS match: -Effort="0:10"-Effort="0:30"-Effort="1:00"-Effort="2:00"-Effort="3:00"-Effort="4:00"-Effort="5:00"-Effort="6:00"-Effort="7:00"-Effort="8:00"/NEXT

6-7 seconds
---

Headlines with TAGS match: Effort={^$}/NEXT

6-7 seconds
---

Headlines with TAGS match: -Effort="0:10"-Effort="0:30"-Effort="1:00"-Effort="2:00"-Effort="3:00"-Effort="4:00"-Effort="5:00"-Effort="6:00"-Effort="7:00"-Effort="8:00"/!NEXT

1-2 seconds
---

Headlines with TAGS match: Effort={^$}/!NEXT

1-2 seconds

I'll use the last one -- Thanks!


>
> Reasonably cryptic all this, I know.  This is what happens when you
> add features with time instead of designing the full thing from the
> start.

Yes... but that's why it's so useful -- development is mostly driven by
real world problems and needs and not some theoretical "Wouldn't it be
nice to have this cool feature" requests.

>
>> Maybe I answered my own question :)
>
> and I hope I added another perspective.

Yes thanks!

-Bernt

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-02-12 16:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-12  6:01 Finding tasks without a specific property set Bernt Hansen
2008-02-12  9:27 ` Carsten Dominik
2008-02-12 16:52   ` Bernt Hansen

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.