emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Possible bug with tag inheritance
@ 2009-04-24 10:43 Cameron Horsburgh
  2009-04-24 12:45 ` Bernt Hansen
  2009-04-24 13:54 ` Carsten Dominik
  0 siblings, 2 replies; 10+ messages in thread
From: Cameron Horsburgh @ 2009-04-24 10:43 UTC (permalink / raw)
  To: emacs-orgmode

Hi folks,

Today I stumbled across an instance where tag inheritance doesn't seem
to work as I expected it to.

I'm using GNU Emacs 23.0.92.1 (i486-pc-linux-gnu, GTK+ Version 2.14.7)
of 2009-04-12 on elegiac, modified by Debian, and Org-mode version
6.26trans.

Let's say I have an org file that records all the information for a
particular part of my life. Different parts of the file record
meetings, track projects and record notes and other
information. Here's what it might look like:



* Meetings
** Lunch with John						 :Restaurant:
   <2009-04-27 Mon 12:30>
** Meeting with Fred						     :Office:
   <2009-04-27 Mon 13:00>
* Projects
** Find Higgs Boson						 :Laboratory:
   DEADLINE: <2009-04-27 Mon>
** Achieve World domination				  :Office:Laboratory:
   SCHEDULED: <2009-04-28 Tue>
** Cook dinner							    :Kitchen:
* Notes								       :Info:
** Mary's phone numbers
   - 1234-5678
   - 0412-345-678
** Jenny's web page
   - [[http://www.somewebpage.com][Jenny's web page]]

I have customised org-stuck-projects[fn:1] to ignore entries tagged
with the tag `Info'. org-use-tag-inheritance is set to `t'.

If I hit C-a # to list stuck projects I would only expect to see the
entry about cooking dinner listed. The `Notes' headline should be
ignored, as should the notes about Mary's phone number and Jenny's web
page, because they inherit the `Info' tag.

In practice, the `Notes' headline is ignored as expected. However, the
children are listed as stuck projects.

After all this I have realised it's probably more appropriate to use
properties rather than tags to do this sort of thing. Still, the
behaviour puzzles me a bit, so I thought it was worth asking about.

Is this behaviour incorrect? Or am I expecting the wrong thing?

* Footnotes

[fn:1] I had some trouble customising this variable in the usual way,
because the explanation at the end of the customize buffer somehow got
included in the sexp recorded in my .emacs. I deleted that line, reset
the customize buffer and started again, but with exactly the same
result. 


-- 

Cameron Horsburgh

Blog: http://spiritcry.wordpress.com/

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

* Re: Possible bug with tag inheritance
  2009-04-24 10:43 Possible bug with tag inheritance Cameron Horsburgh
@ 2009-04-24 12:45 ` Bernt Hansen
  2009-04-24 13:08   ` Cameron Horsburgh
  2009-04-24 13:54 ` Carsten Dominik
  1 sibling, 1 reply; 10+ messages in thread
From: Bernt Hansen @ 2009-04-24 12:45 UTC (permalink / raw)
  To: Cameron Horsburgh; +Cc: emacs-orgmode

Cameron Horsburgh <cammo@netcall.com.au> writes:

> Today I stumbled across an instance where tag inheritance doesn't seem
> to work as I expected it to.
>
> I'm using GNU Emacs 23.0.92.1 (i486-pc-linux-gnu, GTK+ Version 2.14.7)
> of 2009-04-12 on elegiac, modified by Debian, and Org-mode version
> 6.26trans.
>
> Let's say I have an org file that records all the information for a
> particular part of my life. Different parts of the file record
> meetings, track projects and record notes and other
> information. Here's what it might look like:
>
>
>
> * Meetings
> ** Lunch with John						 :Restaurant:
>    <2009-04-27 Mon 12:30>
> ** Meeting with Fred						     :Office:
>    <2009-04-27 Mon 13:00>
> * Projects
> ** Find Higgs Boson						 :Laboratory:
>    DEADLINE: <2009-04-27 Mon>
> ** Achieve World domination				  :Office:Laboratory:
>    SCHEDULED: <2009-04-28 Tue>
> ** Cook dinner							    :Kitchen:
> * Notes								       :Info:
> ** Mary's phone numbers
>    - 1234-5678
>    - 0412-345-678
> ** Jenny's web page
>    - [[http://www.somewebpage.com][Jenny's web page]]
>
> I have customised org-stuck-projects[fn:1] to ignore entries tagged
> with the tag `Info'. org-use-tag-inheritance is set to `t'.
>
> If I hit C-a # to list stuck projects I would only expect to see the
> entry about cooking dinner listed. The `Notes' headline should be
> ignored, as should the notes about Mary's phone number and Jenny's web
> page, because they inherit the `Info' tag.
>
> In practice, the `Notes' headline is ignored as expected. However, the
> children are listed as stuck projects.
>
> After all this I have realised it's probably more appropriate to use
> properties rather than tags to do this sort of thing. Still, the
> behaviour puzzles me a bit, so I thought it was worth asking about.
>
> Is this behaviour incorrect? Or am I expecting the wrong thing?
>
> * Footnotes
>
> [fn:1] I had some trouble customising this variable in the usual way,
> because the explanation at the end of the customize buffer somehow got
> included in the sexp recorded in my .emacs. I deleted that line, reset
> the customize buffer and started again, but with exactly the same
> result. 

Hi Cameron,

I think we need more information to help.  Could you show us what your
value of org-stuck-projects is?

-Bernt

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

* Re: Possible bug with tag inheritance
  2009-04-24 12:45 ` Bernt Hansen
@ 2009-04-24 13:08   ` Cameron Horsburgh
  2009-04-24 13:24     ` Bernt Hansen
  0 siblings, 1 reply; 10+ messages in thread
From: Cameron Horsburgh @ 2009-04-24 13:08 UTC (permalink / raw)
  To: Bernt Hansen; +Cc: emacs-orgmode

On Fri, Apr 24, 2009 at 08:45:17AM -0400, Bernt Hansen wrote:
> Cameron Horsburgh <cammo@netcall.com.au> writes:
> 
> > [fn:1] I had some trouble customising this variable in the usual way,
> > because the explanation at the end of the customize buffer somehow got
> > included in the sexp recorded in my .emacs. I deleted that line, reset
> > the customize buffer and started again, but with exactly the same
> > result. 
> 
> Hi Cameron,
> 
> I think we need more information to help.  Could you show us what your
> value of org-stuck-projects is?

Sure. 

 '(org-stuck-projects (quote ("+LEVEL=2/-DONE" ("TODO" "NEXT" "NEXTACTION") ("Info") "
   [State]: EDITED, shown value does not take effect until you set or save it.")))

This is the latest version of it. An earlier attempt also listed the
explanation of the way stuck projects are identified.

-- 

Cameron Horsburgh

Blog: http://spiritcry.wordpress.com/

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

* Re: Possible bug with tag inheritance
  2009-04-24 13:08   ` Cameron Horsburgh
@ 2009-04-24 13:24     ` Bernt Hansen
  2009-04-24 18:02       ` Cameron Horsburgh
  0 siblings, 1 reply; 10+ messages in thread
From: Bernt Hansen @ 2009-04-24 13:24 UTC (permalink / raw)
  To: Cameron Horsburgh; +Cc: emacs-orgmode

Cameron Horsburgh <cammo@netcall.com.au> writes:

> On Fri, Apr 24, 2009 at 08:45:17AM -0400, Bernt Hansen wrote:
>> I think we need more information to help.  Could you show us what your
>> value of org-stuck-projects is?
>
> Sure. 
>
>  '(org-stuck-projects (quote ("+LEVEL=2/-DONE" ("TODO" "NEXT" "NEXTACTION") ("Info") "
>    [State]: EDITED, shown value does not take effect until you set or save it.")))
>

I think that's a little messed up.  Can you post what C-h v
org-stuck-projects displays (or cut and paste the value out of your
custom file?  The [State]: EDITED, ... stuff shouldn't be part of the
value.

-Bernt

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

* Re: Possible bug with tag inheritance
  2009-04-24 10:43 Possible bug with tag inheritance Cameron Horsburgh
  2009-04-24 12:45 ` Bernt Hansen
@ 2009-04-24 13:54 ` Carsten Dominik
  2009-04-25 19:14   ` Cameron Horsburgh
  1 sibling, 1 reply; 10+ messages in thread
From: Carsten Dominik @ 2009-04-24 13:54 UTC (permalink / raw)
  To: Cameron Horsburgh; +Cc: emacs-orgmode


On Apr 24, 2009, at 12:43 PM, Cameron Horsburgh wrote:

> Hi folks,
>
> Today I stumbled across an instance where tag inheritance doesn't seem
> to work as I expected it to.
>
> I'm using GNU Emacs 23.0.92.1 (i486-pc-linux-gnu, GTK+ Version 2.14.7)
> of 2009-04-12 on elegiac, modified by Debian, and Org-mode version
> 6.26trans.
>
> Let's say I have an org file that records all the information for a
> particular part of my life. Different parts of the file record
> meetings, track projects and record notes and other
> information. Here's what it might look like:
>
>
>
> * Meetings
> ** Lunch with John						 :Restaurant:
>   <2009-04-27 Mon 12:30>
> ** Meeting with Fred						     :Office:
>   <2009-04-27 Mon 13:00>
> * Projects
> ** Find Higgs Boson						 :Laboratory:
>   DEADLINE: <2009-04-27 Mon>
> ** Achieve World domination				  :Office:Laboratory:
>   SCHEDULED: <2009-04-28 Tue>
> ** Cook dinner							    :Kitchen:
> * Notes								       :Info:
> ** Mary's phone numbers
>   - 1234-5678
>   - 0412-345-678
> ** Jenny's web page
>   - [[http://www.somewebpage.com][Jenny's web page]]
>
> I have customised org-stuck-projects[fn:1] to ignore entries tagged
> with the tag `Info'. org-use-tag-inheritance is set to `t'.
>
> If I hit C-a # to list stuck projects I would only expect to see the
> entry about cooking dinner listed. The `Notes' headline should be
> ignored, as should the notes about Mary's phone number and Jenny's web
> page, because they inherit the `Info' tag.
>
> In practice, the `Notes' headline is ignored as expected. However, the
> children are listed as stuck projects.
>
> After all this I have realised it's probably more appropriate to use
> properties rather than tags to do this sort of thing. Still, the
> behaviour puzzles me a bit, so I thought it was worth asking about.
>
> Is this behaviour incorrect? Or am I expecting the wrong thing?


The tags in org-stuck-projects must be present explicitly in the  
subtree, because the subtree is searched with a regula expression that  
does not know about inheritance.

However, you can include this into your definition of a project:

(setq org-stuck-projects
    (quote ("+LEVEL=2-Info/-DONE" ("TODO" "NEXT" "NEXTACTION") nil "")))

HTH


>
> * Footnotes
>
> [fn:1] I had some trouble customising this variable in the usual way,
> because the explanation at the end of the customize buffer somehow got
> included in the sexp recorded in my .emacs. I deleted that line, reset
> the customize buffer and started again, but with exactly the same
> result.

There seems to be a bug in customize.  Can anyone please submit a but  
report to Emacs, after verifying that this still occurs in the latest  
update of emacs 23?

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

* Re: Possible bug with tag inheritance
  2009-04-24 13:24     ` Bernt Hansen
@ 2009-04-24 18:02       ` Cameron Horsburgh
  2009-04-24 18:12         ` Bernt Hansen
  0 siblings, 1 reply; 10+ messages in thread
From: Cameron Horsburgh @ 2009-04-24 18:02 UTC (permalink / raw)
  To: Bernt Hansen; +Cc: emacs-orgmode

On Fri, Apr 24, 2009 at 09:24:10AM -0400, Bernt Hansen wrote:
> Cameron Horsburgh <cammo@netcall.com.au> writes:
> 
> > On Fri, Apr 24, 2009 at 08:45:17AM -0400, Bernt Hansen wrote:
> >> I think we need more information to help.  Could you show us what your
> >> value of org-stuck-projects is?
> >
> > Sure. 
> >
> >  '(org-stuck-projects (quote ("+LEVEL=2/-DONE" ("TODO" "NEXT" "NEXTACTION") ("Info") "
> >    [State]: EDITED, shown value does not take effect until you set or save it.")))
> >
> 
> I think that's a little messed up.  Can you post what C-h v
> org-stuck-projects displays (or cut and paste the value out of your
> custom file?  The [State]: EDITED, ... stuff shouldn't be part of the
> value.

That's cut straight from my .emacs. The first few lines of C-h v tell me:

org-stuck-projects is a variable defined in `org-agenda.el'.
Its value is 
("+LEVEL=2/-DONE"
 ("TODO" "NEXT" "NEXTACTION")
 ("Info")
 "\n   [State]: EDITED, shown value does not take effect until you set or save it.")



> 
> -Bernt
> 

-- 

Cameron Horsburgh

Blog: http://spiritcry.wordpress.com/

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

* Re: Possible bug with tag inheritance
  2009-04-24 18:02       ` Cameron Horsburgh
@ 2009-04-24 18:12         ` Bernt Hansen
  2009-04-25 18:54           ` Cameron Horsburgh
  0 siblings, 1 reply; 10+ messages in thread
From: Bernt Hansen @ 2009-04-24 18:12 UTC (permalink / raw)
  To: Cameron Horsburgh; +Cc: emacs-orgmode

Cameron Horsburgh <cammo@netcall.com.au> writes:

> On Fri, Apr 24, 2009 at 09:24:10AM -0400, Bernt Hansen wrote:
>> Cameron Horsburgh <cammo@netcall.com.au> writes:
>> 
>> > On Fri, Apr 24, 2009 at 08:45:17AM -0400, Bernt Hansen wrote:
>> >> I think we need more information to help.  Could you show us what your
>> >> value of org-stuck-projects is?
>> >
>> > Sure. 
>> >
>> >  '(org-stuck-projects (quote ("+LEVEL=2/-DONE" ("TODO" "NEXT" "NEXTACTION") ("Info") "
>> >    [State]: EDITED, shown value does not take effect until you set or save it.")))
>> >
>> 
>> I think that's a little messed up.  Can you post what C-h v
>> org-stuck-projects displays (or cut and paste the value out of your
>> custom file?  The [State]: EDITED, ... stuff shouldn't be part of the
>> value.
>
> That's cut straight from my .emacs. The first few lines of C-h v tell me:
>
> org-stuck-projects is a variable defined in `org-agenda.el'.
> Its value is 
> ("+LEVEL=2/-DONE"
>  ("TODO" "NEXT" "NEXTACTION")
>  ("Info")
>  "\n   [State]: EDITED, shown value does not take effect until you set or save it.")

Okay.  That string is used for regexp matching and probably should not
be there.

  - If this regexp -> "\n   [State]: ...it." matches anywhere in the
    subtree then the project is not stuck.

That's probably not what you want even if matching that exactly string
is unlikely.  If you click on the _customize_ link you'll see what each
value is used for.  You probably just want an empty string there.

Carsten mentioned that inherited tags are not considers for stuck
project matching during the search and you should probably try his
suggestion to see if it works better for your scenario.

-Bernt

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

* Re: Possible bug with tag inheritance
  2009-04-24 18:12         ` Bernt Hansen
@ 2009-04-25 18:54           ` Cameron Horsburgh
  0 siblings, 0 replies; 10+ messages in thread
From: Cameron Horsburgh @ 2009-04-25 18:54 UTC (permalink / raw)
  To: Bernt Hansen; +Cc: emacs-orgmode

On Fri, Apr 24, 2009 at 02:12:11PM -0400, Bernt Hansen wrote:
> Cameron Horsburgh <cammo@netcall.com.au> writes:
> 
> > On Fri, Apr 24, 2009 at 09:24:10AM -0400, Bernt Hansen wrote:
> >> Cameron Horsburgh <cammo@netcall.com.au> writes:
> >> 
> >> > On Fri, Apr 24, 2009 at 08:45:17AM -0400, Bernt Hansen wrote:
> >> >> I think we need more information to help.  Could you show us what your
> >> >> value of org-stuck-projects is?
> >> >
> >> > Sure. 
> >> >
> >> >  '(org-stuck-projects (quote ("+LEVEL=2/-DONE" ("TODO" "NEXT" "NEXTACTION") ("Info") "
> >> >    [State]: EDITED, shown value does not take effect until you set or save it.")))
> >> >
> >> 
> >> I think that's a little messed up.  Can you post what C-h v
> >> org-stuck-projects displays (or cut and paste the value out of your
> >> custom file?  The [State]: EDITED, ... stuff shouldn't be part of the
> >> value.
> >
> > That's cut straight from my .emacs. The first few lines of C-h v tell me:
> >
> > org-stuck-projects is a variable defined in `org-agenda.el'.
> > Its value is 
> > ("+LEVEL=2/-DONE"
> >  ("TODO" "NEXT" "NEXTACTION")
> >  ("Info")
> >  "\n   [State]: EDITED, shown value does not take effect until you set or save it.")
> 
> Okay.  That string is used for regexp matching and probably should not
> be there.

True! But there it is...

> 
>   - If this regexp -> "\n   [State]: ...it." matches anywhere in the
>     subtree then the project is not stuck.
> 
> That's probably not what you want even if matching that exactly string
> is unlikely.  If you click on the _customize_ link you'll see what each
> value is used for.  You probably just want an empty string there.

Yes, I got that. I've adjusted the string manually.

> Carsten mentioned that inherited tags are not considers for stuck
> project matching during the search and you should probably try his
> suggestion to see if it works better for your scenario.
> 

I haven't had a chance to play around with this yet. As I said in my
original mail, though, it's probably more correct to use PROPERTIES to
mark something as information. org-stuck-projects seems to be able to
read PROPERTIES, so I'll fiddle around with that and see how I go.

Thanks for your help,

-- 

Cameron Horsburgh

Blog: http://spiritcry.wordpress.com/

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

* Re: Possible bug with tag inheritance
  2009-04-24 13:54 ` Carsten Dominik
@ 2009-04-25 19:14   ` Cameron Horsburgh
  2009-04-25 20:55     ` Bernt Hansen
  0 siblings, 1 reply; 10+ messages in thread
From: Cameron Horsburgh @ 2009-04-25 19:14 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: emacs-orgmode

On Fri, Apr 24, 2009 at 03:54:29PM +0200, Carsten Dominik wrote:

> On Apr 24, 2009, at 12:43 PM, Cameron Horsburgh wrote:
>
>> I have customised org-stuck-projects[fn:1] to ignore entries tagged
>> with the tag `Info'. org-use-tag-inheritance is set to `t'.
>>
>> If I hit C-a # to list stuck projects I would only expect to see the
>> entry about cooking dinner listed. The `Notes' headline should be
>> ignored, as should the notes about Mary's phone number and Jenny's web
>> page, because they inherit the `Info' tag.
>>
>> In practice, the `Notes' headline is ignored as expected. However, the
>> children are listed as stuck projects.
>>
>> After all this I have realised it's probably more appropriate to use
>> properties rather than tags to do this sort of thing. Still, the
>> behaviour puzzles me a bit, so I thought it was worth asking about.
>>
>> Is this behaviour incorrect? Or am I expecting the wrong thing?
>
>
> The tags in org-stuck-projects must be present explicitly in the  
> subtree, because the subtree is searched with a regula expression that  
> does not know about inheritance.

I thought this might be the case. May I suggest a note be made to the
documentation of org-stuck-projects?
>
> However, you can include this into your definition of a project:
>
> (setq org-stuck-projects
>    (quote ("+LEVEL=2-Info/-DONE" ("TODO" "NEXT" "NEXTACTION") nil "")))
>
> HTH
>
>
>>
>> * Footnotes
>>
>> [fn:1] I had some trouble customising this variable in the usual way,
>> because the explanation at the end of the customize buffer somehow got
>> included in the sexp recorded in my .emacs. I deleted that line, reset
>> the customize buffer and started again, but with exactly the same
>> result.
>
> There seems to be a bug in customize.  Can anyone please submit a but  
> report to Emacs, after verifying that this still occurs in the latest  
> update of emacs 23?
>

I'll have a play with some other customized buffers and see what
happens. If it happens elsewhere I'll send a report.


-- 

Cameron Horsburgh

Blog: http://spiritcry.wordpress.com/

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

* Re: Possible bug with tag inheritance
  2009-04-25 19:14   ` Cameron Horsburgh
@ 2009-04-25 20:55     ` Bernt Hansen
  0 siblings, 0 replies; 10+ messages in thread
From: Bernt Hansen @ 2009-04-25 20:55 UTC (permalink / raw)
  To: Cameron Horsburgh; +Cc: emacs-orgmode

Cameron Horsburgh <cammo@netcall.com.au> writes:

> On Fri, Apr 24, 2009 at 03:54:29PM +0200, Carsten Dominik wrote:
>
>> The tags in org-stuck-projects must be present explicitly in the  
>> subtree, because the subtree is searched with a regula expression that  
>> does not know about inheritance.
>
> I thought this might be the case. May I suggest a note be made to the
> documentation of org-stuck-projects?

Carsten did that yesterday fin commit
   f4f1d5c (Stuck projects: Improve docstring of org-stuck-projects)

-Bernt

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

end of thread, other threads:[~2009-04-25 20:55 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-04-24 10:43 Possible bug with tag inheritance Cameron Horsburgh
2009-04-24 12:45 ` Bernt Hansen
2009-04-24 13:08   ` Cameron Horsburgh
2009-04-24 13:24     ` Bernt Hansen
2009-04-24 18:02       ` Cameron Horsburgh
2009-04-24 18:12         ` Bernt Hansen
2009-04-25 18:54           ` Cameron Horsburgh
2009-04-24 13:54 ` Carsten Dominik
2009-04-25 19:14   ` Cameron Horsburgh
2009-04-25 20:55     ` Bernt Hansen

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).