emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Categories in tags-TODO agendas
@ 2006-05-24 20:21 Daniel J. Sinder
  2006-05-25  4:01 ` Carsten Dominik
  0 siblings, 1 reply; 3+ messages in thread
From: Daniel J. Sinder @ 2006-05-24 20:21 UTC (permalink / raw)
  To: emacs-orgmode

I'm using org-mode for GTD, and I also use tags for GTD context.  I
put TODO entries under headlines for their respective projects and
use a tag for each project which is inherited by it's next
actions/TODOs.  I have 3 main org files for GTD:  work, meetings,
personal -- each with #+CATEGORY labels by the same name.  A few
weeks back I requested a customization option for tag-specific
TODO-only agendas, which Carsten promptly implemented --  thanks
Carsten.  Now I have customized commands to generate agenda buffers
by project or context, which works like a charm.

I've recently encountered one bug and one inconsistency (I'm up to
date with 4.33).

Here's the bug:  After generating the first weekly agenda and
quitting it, subsequent tag-search agendas result in the same
CATEGORY label on all entries regardless of the CATEGORY label on
the file that produced the entry.  Subsequent weekly agendas still
show the correct categories however.  (It's not obvious to me if
there's any consistency as to *which* file's category is selected
for the tag searches.)

And the inconsistency has to do with how tag inheritance is handled
in tag searches.  Suppose I have in one of my org files:
  * Projects
  ** Resolve inconsistency with org-mode tag searches :OrgMode:
  *** TODO Post to emacs-orgmode list :Email:
  *** TODO Write a patch for org-mode tag searches :Computer:

If I do a tag query for "OrgMode" (C-c a m OrgMode), I get
  WORK:     Resolve inconsistency with org-mode tag searches :OrgMode"
(that is, the TODO items do not inherit the OrgMode tag).

However, if I do a TODO-only tag query for "OrgMode" (C-c a M
OrgMode), I get both sub-headlines:
  WORK:       ..TODO Post to emacs-orgmode list         :Email:
  WORK:       ..TODO Write patch for org-mode tag searches :Computer

I think these two should behave more alike with regard to tag
inheritance.  I personally prefer the latter approach, wherein
inherited tags are included in the results.

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

* Re: Categories in tags-TODO agendas
  2006-05-24 20:21 Categories in tags-TODO agendas Daniel J. Sinder
@ 2006-05-25  4:01 ` Carsten Dominik
  2006-05-25 17:56   ` Daniel J. Sinder
  0 siblings, 1 reply; 3+ messages in thread
From: Carsten Dominik @ 2006-05-25  4:01 UTC (permalink / raw)
  To: Daniel J. Sinder; +Cc: emacs-orgmode

Hi Daniel

On May 24, 2006, at 22:21, Daniel J. Sinder wrote:
>
> I've recently encountered one bug and one inconsistency (I'm up to
> date with 4.33).
>
> Here's the bug:  After generating the first weekly agenda and
> quitting it, subsequent tag-search agendas result in the same
> CATEGORY label on all entries regardless of the CATEGORY label on
> the file that produced the entry.  Subsequent weekly agendas still
> show the correct categories however.  (It's not obvious to me if
> there's any consistency as to *which* file's category is selected
> for the tag searches.)


I guess this should be the last file in the org-agenda-file-list?

Please try the following patch which should fix this bug, thank you for 
the report!

--- org.el.orig	Wed May 24 11:39:48 2006
+++ org.el	Thu May 25 00:00:30 2006
@@ -7596,6 +7561,8 @@
  	  (with-current-buffer buffer
  	    (unless (eq major-mode 'org-mode)
  	      (error "Agenda file %s is not in `org-mode'" file))
+	    ;; FIXME: check if adding this solves the category problem
+	    (setq org-category-table (org-get-category-table))
  	    (save-excursion
  	      (save-restriction
  		(if org-respect-restriction

>
> And the inconsistency has to do with how tag inheritance is handled
> in tag searches.  Suppose I have in one of my org files:
>   * Projects
>   ** Resolve inconsistency with org-mode tag searches :OrgMode:
>   *** TODO Post to emacs-orgmode list :Email:
>   *** TODO Write a patch for org-mode tag searches :Computer:
>
> If I do a tag query for "OrgMode" (C-c a m OrgMode), I get
>   WORK:     Resolve inconsistency with org-mode tag searches :OrgMode"
> (that is, the TODO items do not inherit the OrgMode tag).
>
> However, if I do a TODO-only tag query for "OrgMode" (C-c a M
> OrgMode), I get both sub-headlines:
>   WORK:       ..TODO Post to emacs-orgmode list         :Email:
>   WORK:       ..TODO Write patch for org-mode tag searches :Computer
>
> I think these two should behave more alike with regard to tag
> inheritance.  I personally prefer the latter approach, wherein
> inherited tags are included in the results.

Please take a look at the variable org-tags-match-list-sublevels.

- Carsten

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

* Re: Categories in tags-TODO agendas
  2006-05-25  4:01 ` Carsten Dominik
@ 2006-05-25 17:56   ` Daniel J. Sinder
  0 siblings, 0 replies; 3+ messages in thread
From: Daniel J. Sinder @ 2006-05-25 17:56 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: emacs-orgmode

The patch did the trick, and I now see the need for the different
inheritance behaviors.

Thanks,
Dan

--
** TODO Learn Emacs Lisp


Carsten Dominik wrote:
> Hi Daniel
> 
> On May 24, 2006, at 22:21, Daniel J. Sinder wrote:
> 
>>
>> I've recently encountered one bug and one inconsistency (I'm up to
>> date with 4.33).
>>
>> Here's the bug:  After generating the first weekly agenda and
>> quitting it, subsequent tag-search agendas result in the same
>> CATEGORY label on all entries regardless of the CATEGORY label on
>> the file that produced the entry.  Subsequent weekly agendas still
>> show the correct categories however.  (It's not obvious to me if
>> there's any consistency as to *which* file's category is selected
>> for the tag searches.)
> 
> 
> 
> I guess this should be the last file in the org-agenda-file-list?
> 
> Please try the following patch which should fix this bug, thank you for
> the report!
> 
> --- org.el.orig    Wed May 24 11:39:48 2006
> +++ org.el    Thu May 25 00:00:30 2006
> @@ -7596,6 +7561,8 @@
>        (with-current-buffer buffer
>          (unless (eq major-mode 'org-mode)
>            (error "Agenda file %s is not in `org-mode'" file))
> +        ;; FIXME: check if adding this solves the category problem
> +        (setq org-category-table (org-get-category-table))
>          (save-excursion
>            (save-restriction
>          (if org-respect-restriction
> 
>>
>> And the inconsistency has to do with how tag inheritance is handled
>> in tag searches.  Suppose I have in one of my org files:
>>   * Projects
>>   ** Resolve inconsistency with org-mode tag searches :OrgMode:
>>   *** TODO Post to emacs-orgmode list :Email:
>>   *** TODO Write a patch for org-mode tag searches :Computer:
>>
>> If I do a tag query for "OrgMode" (C-c a m OrgMode), I get
>>   WORK:     Resolve inconsistency with org-mode tag searches :OrgMode"
>> (that is, the TODO items do not inherit the OrgMode tag).
>>
>> However, if I do a TODO-only tag query for "OrgMode" (C-c a M
>> OrgMode), I get both sub-headlines:
>>   WORK:       ..TODO Post to emacs-orgmode list         :Email:
>>   WORK:       ..TODO Write patch for org-mode tag searches :Computer
>>
>> I think these two should behave more alike with regard to tag
>> inheritance.  I personally prefer the latter approach, wherein
>> inherited tags are included in the results.
> 
> 
> Please take a look at the variable org-tags-match-list-sublevels.
> 
> - Carsten
> 

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

end of thread, other threads:[~2006-05-25 17:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-05-24 20:21 Categories in tags-TODO agendas Daniel J. Sinder
2006-05-25  4:01 ` Carsten Dominik
2006-05-25 17:56   ` Daniel J. Sinder

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