emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* CATEGORY in different levels
@ 2008-02-06  0:10 Sven Bretfeld
  2008-02-06  1:47 ` Bernt Hansen
  2008-02-06 15:43 ` Carsten Dominik
  0 siblings, 2 replies; 11+ messages in thread
From: Sven Bretfeld @ 2008-02-06  0:10 UTC (permalink / raw)
  To: emacs-org


[-- Attachment #1.1: Type: text/plain, Size: 2937 bytes --]

Hello to all

I still don't understand the use of properties. My problem is quite
easy, I think, but I can't figure it out in the documentation.

I have my "areas of responsibility" on the first level, the second
level represents projects, which are tagged with :PROJECT:. The third level
represents either the list of next action items (tagged with contexts)
or -- if the project is lager -- some milestones are interpolated:

* Teaching
#+CATEGORY: Teaching
** Sanskrit I (WS08)                        :PROJECT:
#+CATEGORY: Sanskrit I
*** NEXT Look for Introductions             :LIBRARY:
*** NEXT Borrow the chosen books            :LIBRARY:
*** NEXT Ask students for convenient date   :EMAIL:
** History of Indian Religion (WS08)        :PROJECT:
#CATEGORY: Indian Religion
*** Plan part on Buddhism                   :MILESTONE:
**** NEXT Look for Books                    :LIBRARY:
**** NEXT Chose readings for students       :OFFICE:
*** Plan part on Hinduism                   :MILESTONE:
**** NEXT Look for books                    :LIBRARY:
**** NEXT Invite guest-speaker              :PHONE:
* Misc Office
#+CATEGORY: Misc Office
** Proofread Sociology-Article              :PROJECT:
#+CATEGORY: Sociology-Article
*** NEXT Make a printout                    :COMPUTER:
** Install Emacs on every colleague's PC    :PROJECT:
#+CATEGORY: Bring joy to the world

This works quite good. I can produce agenda-views that show, for
example, each next action with LIBRARY context, while the #+CATEGORY
property yields the associated project's name:

,----
| Sanskrit:        NEXT Look for books        :LIBRARY:
| Sanskrit:        NEXT Borrow chosen books   :LIBRARY:
| Indian Religion: NEXT Look for books        :LIBRARY:
`----

THE PROBLEM:

When viewing projects with C-c C-a P or stuck projects with C-c C-a #
the first column is wrong, because the #+CATEGORY property has been
changed by a preceding project. For example, the project "Install
Emacs on every colleague's PC" is stuck, because it doesn't contain
any TODOs (you see how urgent it is to help me). So, I would like it
to appear in the stuck-projects-view or in the general projects' view
as:

,----
| Misc Office:  Install Emacs on every colleague's PC  :PROJECT:
`----

Instead it reads:

,----
| Sociology-Article: Install Emacs on every colleague's PC :PROJECT:
`----

I've tried to mark my projects with :CATEGORY: since the documentation
says:

,----
| If you would like to have a special CATEGORY for a single entry or a
| (sub)tree, give the entry a :CATEGORY: property with the location as
| the value.
`----

But the problem remains. 

What have I misunderstood? In other words, how can I set the category
for my projects (2nd level with sub-trees) while keeping the category
of the "areas of responsibility" (1st level) intact over the whole
tree?

Thanks for help

Sven



[-- Attachment #1.2: Type: application/pgp-signature, Size: 188 bytes --]

[-- Attachment #2: Type: text/plain, Size: 204 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

* Re: CATEGORY in different levels
  2008-02-06  0:10 CATEGORY in different levels Sven Bretfeld
@ 2008-02-06  1:47 ` Bernt Hansen
  2008-02-06  8:44   ` Sven Bretfeld
  2008-02-06 10:02   ` Sven Bretfeld
  2008-02-06 15:43 ` Carsten Dominik
  1 sibling, 2 replies; 11+ messages in thread
From: Bernt Hansen @ 2008-02-06  1:47 UTC (permalink / raw)
  To: Sven Bretfeld; +Cc: emacs-org

Sven Bretfeld <sven.bretfeld@gmx.ch> writes:

> I've tried to mark my projects with :CATEGORY: since the documentation
> says:
>
> ,----
> | If you would like to have a special CATEGORY for a single entry or a
> | (sub)tree, give the entry a :CATEGORY: property with the location as
> | the value.
> `----
>
> But the problem remains. 
>
> What have I misunderstood? In other words, how can I set the category
> for my projects (2nd level with sub-trees) while keeping the category
> of the "areas of responsibility" (1st level) intact over the whole
> tree?
>

Try marking your projects with a property category... like this:

* Finances					:@home:
  :PROPERTIES:
    :CATEGORY: Finance
    :ARCHIVE: %s_archive::* Finances
  :END:

* Health					:@home:
  :PROPERTIES:
    :CATEGORY: Health
    :ARCHIVE: %s_archive::* Health
  :END:

HTH,

Bernt

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

* Re: CATEGORY in different levels
  2008-02-06  1:47 ` Bernt Hansen
@ 2008-02-06  8:44   ` Sven Bretfeld
  2008-02-06 10:02   ` Sven Bretfeld
  1 sibling, 0 replies; 11+ messages in thread
From: Sven Bretfeld @ 2008-02-06  8:44 UTC (permalink / raw)
  To: emacs-org


[-- Attachment #1.1: Type: text/plain, Size: 1339 bytes --]

Hi Bernt

Bernt Hansen <bernt@norang.ca> writes:

> Sven Bretfeld <sven.bretfeld@gmx.ch> writes:

>> What have I misunderstood? In other words, how can I set the category
>> for my projects (2nd level with sub-trees) while keeping the category
>> of the "areas of responsibility" (1st level) intact over the whole
>> tree?
>>
>
> Try marking your projects with a property category... like this:
>
> * Finances					:@home:
>   :PROPERTIES:
>     :CATEGORY: Finance
>     :ARCHIVE: %s_archive::* Finances
>   :END:
>
> * Health					:@home:
>   :PROPERTIES:
>     :CATEGORY: Health
>     :ARCHIVE: %s_archive::* Health
>   :END:

I've tried, but it's not working either. I tried it this way:

* Teaching
#+CATEGORY: Teaching
** Sanskrit I (WS08)               :PROJECT:
   :PROPERTIES:
   :CATEGORY: Sanskrit
   :END:
*** NEXT Find Books                :LIBRARY:

Todos are displayed correctly: 

,----
| Sanskrit: NEXT Find Books        :LIBRARY:
`----

But projects wrongly:

,----
| Sanskrit I:  Sanskrit I           :PROJECT:
`----

The same, when I change the #+CATEGORY: of the first level item into a
property of the same kind:

:PROPERTIES:
:CATEGORY: Teaching
:END:

Strange, isn't it? Is it working for you? Then, I'd have a wrong
customization maybe?

Greetings

Sven


[-- Attachment #1.2: Type: application/pgp-signature, Size: 188 bytes --]

[-- Attachment #2: Type: text/plain, Size: 204 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

* Re: CATEGORY in different levels
  2008-02-06  1:47 ` Bernt Hansen
  2008-02-06  8:44   ` Sven Bretfeld
@ 2008-02-06 10:02   ` Sven Bretfeld
  2008-02-06 13:45     ` Bernt Hansen
  1 sibling, 1 reply; 11+ messages in thread
From: Sven Bretfeld @ 2008-02-06 10:02 UTC (permalink / raw)
  To: emacs-org


[-- Attachment #1.1: Type: text/plain, Size: 1337 bytes --]

Hi Bernt

Bernt Hansen <bernt@norang.ca> writes:

> Sven Bretfeld <sven.bretfeld@gmx.ch> writes:

>> What have I misunderstood? In other words, how can I set the category
>> for my projects (2nd level with sub-trees) while keeping the category
>> of the "areas of responsibility" (1st level) intact over the whole
>> tree?
>>
>
> Try marking your projects with a property category... like this:
>
> * Finances					:@home:
>   :PROPERTIES:
>     :CATEGORY: Finance
>     :ARCHIVE: %s_archive::* Finances
>   :END:
>
> * Health					:@home:
>   :PROPERTIES:
>     :CATEGORY: Health
>     :ARCHIVE: %s_archive::* Health
>   :END:

I've tried, but it's not working either. I tried it this way:

* Teaching
#+CATEGORY: Teaching
** Sanskrit I (WS08)               :PROJECT:
   :PROPERTIES:
   :CATEGORY: Sanskrit
   :END:
*** NEXT Find Books                :LIBRARY:

Todos are displayed correctly: 

,----
| Sanskrit: NEXT Find Books        :LIBRARY:
`----

But projects wrongly:

,----
| Sanskrit I:  Sanskrit I           :PROJECT:
`----

The same, when I change the #+CATEGORY: of the first level item into a
property of the same kind:

:PROPERTIES:
:CATEGORY: Teaching
:END:

Strange, isn't it? Is it working for you? Then, I'd have a wrong
customization maybe?

Greetings

Sven

[-- Attachment #1.2: Type: application/pgp-signature, Size: 188 bytes --]

[-- Attachment #2: Type: text/plain, Size: 204 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

* Re: CATEGORY in different levels
  2008-02-06 10:02   ` Sven Bretfeld
@ 2008-02-06 13:45     ` Bernt Hansen
  0 siblings, 0 replies; 11+ messages in thread
From: Bernt Hansen @ 2008-02-06 13:45 UTC (permalink / raw)
  To: Sven Bretfeld; +Cc: emacs-org

Hi Sven,

Sven Bretfeld <sven.bretfeld@gmx.ch> writes:

> I've tried, but it's not working either. I tried it this way:
>
> * Teaching
> #+CATEGORY: Teaching
> ** Sanskrit I (WS08)               :PROJECT:
>    :PROPERTIES:
>    :CATEGORY: Sanskrit
>    :END:
> *** NEXT Find Books                :LIBRARY:
>
> Todos are displayed correctly: 
>
> ,----
> | Sanskrit: NEXT Find Books        :LIBRARY:
> `----
>
> But projects wrongly:
>
> ,----
> | Sanskrit I:  Sanskrit I           :PROJECT:
> `----
>
> The same, when I change the #+CATEGORY: of the first level item into a
> property of the same kind:
>
> :PROPERTIES:
> :CATEGORY: Teaching
> :END:
>
> Strange, isn't it? Is it working for you? Then, I'd have a wrong
> customization maybe?

As far as I can tell it's working fine for me.  Maybe this is related to
Emacs 23.

I'm using 

 - Org-mode version 5.20
 - GNU Emacs 22.1.1 (i486-pc-linux-gnu, X toolkit, Xaw3d scroll bars) of 2007-11-03 on pacem, modified by Debian

I haven't done any customizations for properties in my .emacs.

-Bernt

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

* Re: CATEGORY in different levels
  2008-02-06  0:10 CATEGORY in different levels Sven Bretfeld
  2008-02-06  1:47 ` Bernt Hansen
@ 2008-02-06 15:43 ` Carsten Dominik
  2008-02-06 22:40   ` Sven Bretfeld
  1 sibling, 1 reply; 11+ messages in thread
From: Carsten Dominik @ 2008-02-06 15:43 UTC (permalink / raw)
  To: Sven Bretfeld; +Cc: emacs-org

Hi Sven,

#+CATEGORY applies to the lines *below* it, independent of
outline tree structure.  That is why you are getting
"Sociology-Article" for your "Emacs installation task: it
is the nearest #+CATEGORY line *above* this headline.

#+CATEGORY is only kept for backward compatibility, you probably
should not use it for changing the category in the middle
of a file, much less in the middle of a complex tree.

Properties give much more consistent results.  The :CATEGORY: property
applies to the entry headline above it, and to the entire tree below
it (unless locally overwritten by another property).

Everything works fine if I change your example to:

* Teaching
  :PROPERTIES:
  :CATEGORY: Teaching
  :END:
** Sanskrit I (WS08)                        :PROJECT:
   :PROPERTIES:
   :CATEGORY: Sanscrit I
   :END:
*** NEXT Look for Introductions             :LIBRARY:
*** NEXT Borrow the chosen books            :LIBRARY:
*** NEXT Ask students for convenient date   :EMAIL:
** History of Indian Religion (WS08)        :PROJECT:
   :PROPERTIES:
   :CATEGORY: Indian Religion
   :END:
*** Plan part on Buddhism                   :MILESTONE:
**** NEXT Look for Books                    :LIBRARY:
**** NEXT Chose readings for students       :OFFICE:
*** Plan part on Hinduism                   :MILESTONE:
**** NEXT Look for books                    :LIBRARY:
**** NEXT Invite guest-speaker              :PHONE:
* Misc Office
  :PROPERTIES:
  :CATEGORY: Misc Office
  :END:
** Proofread Sociology-Article              :PROJECT:
  :PROPERTIES:
  :CATEGORY: Misc Office
  :END:
*** NEXT Make a printout                    :COMPUTER:
** Install Emacs on every colleague's PC    :PROJECT:

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

* Re: CATEGORY in different levels
  2008-02-06 15:43 ` Carsten Dominik
@ 2008-02-06 22:40   ` Sven Bretfeld
  2008-02-06 23:15     ` Jost Burkardt
  0 siblings, 1 reply; 11+ messages in thread
From: Sven Bretfeld @ 2008-02-06 22:40 UTC (permalink / raw)
  To: emacs-org


[-- Attachment #1.1: Type: text/plain, Size: 1203 bytes --]

Hi Carsten

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

> Properties give much more consistent results.  The :CATEGORY: property
> applies to the entry headline above it, and to the entire tree below
> it (unless locally overwritten by another property).

Hm. Definitely not working. I made it quite secure taking your file
below and erased every configuration except the pure (require
'org-install). 

> Everything works fine if I change your example to:
>
> * Teaching
>  :PROPERTIES:
>  :CATEGORY: Teaching
>  :END:
> ** Sanskrit I (WS08)                        :PROJECT:
>   :PROPERTIES:
>   :CATEGORY: Sanscrit I
>   :END:
> *** NEXT Look for Introductions             :LIBRARY:
> *** NEXT Borrow the chosen books            :LIBRARY:
> *** NEXT Ask students for convenient date   :EMAIL:

Showing special TODO word NEXT works fine. But making a TAGS query for
PROJECT ends up like this:

C-cam RET PROJECT RET
,----
| Sanscrit I:   Sanskrit I    :PROJECT:
`----

Instead of the wanted:

,----
| Teaching:     Sanskrit I    :PROJECT:
`----

Is there a misunderstanding or really a strange phenomenon on my
computers? 

Thanks for your help

Sven

[-- Attachment #1.2: Type: application/pgp-signature, Size: 188 bytes --]

[-- Attachment #2: Type: text/plain, Size: 204 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

* Re: CATEGORY in different levels
  2008-02-06 22:40   ` Sven Bretfeld
@ 2008-02-06 23:15     ` Jost Burkardt
  2008-02-06 23:31       ` Sven Bretfeld
  0 siblings, 1 reply; 11+ messages in thread
From: Jost Burkardt @ 2008-02-06 23:15 UTC (permalink / raw)
  To: Sven Bretfeld; +Cc: emacs-org

Hi Sven,

Sven Bretfeld <sven.bretfeld@gmx.ch> writes:

> Hi Carsten
>
> Carsten Dominik <dominik@science.uva.nl> writes:
>
>> Properties give much more consistent results.  The :CATEGORY: property
>> applies to the entry headline above it, and to the entire tree below
>> it (unless locally overwritten by another property).
>
> Hm. Definitely not working. I made it quite secure taking your file
> below and erased every configuration except the pure (require
> 'org-install). 

Sorry to correct you, but the result is correct. As Carsten said: 

The :CATEGORY: property applies to the entry headline _above_ it, and to
the entire tree below it

So in your example 

>> * Teaching
>>  :PROPERTIES:
>>  :CATEGORY: Teaching
>>  :END:
>> ** Sanskrit I (WS08)                        :PROJECT:
>>   :PROPERTIES:
>>   :CATEGORY: Sanscrit I
>>   :END:

the ":CATEGORY: Sanscrit I" applies to the entry _above_, i.e.

** Sanskrit I (WS08) 

and  the  ":CATEGORY: Teaching" is overridden. The TODO 
entries in your file are _below_  ":CATEGORY: Sanscrit I" 
so they will show up fine. 

Think of the PROPERTIES as an attribute of the entry above.

--
 Jost

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

* Re: CATEGORY in different levels
  2008-02-06 23:15     ` Jost Burkardt
@ 2008-02-06 23:31       ` Sven Bretfeld
  2008-02-07  7:32         ` Carsten Dominik
  0 siblings, 1 reply; 11+ messages in thread
From: Sven Bretfeld @ 2008-02-06 23:31 UTC (permalink / raw)
  To: emacs-org


[-- Attachment #1.1: Type: text/plain, Size: 1239 bytes --]

Hi Jost

Jost Burkardt <jost.burkardt@web.de> writes:

> Sorry to correct you, but the result is correct. As Carsten said: 
>
> The :CATEGORY: property applies to the entry headline _above_ it, and to
> the entire tree below it
>
> So in your example 
>
>>> * Teaching
>>>  :PROPERTIES:
>>>  :CATEGORY: Teaching
>>>  :END:
>>> ** Sanskrit I (WS08)                        :PROJECT:
>>>   :PROPERTIES:
>>>   :CATEGORY: Sanscrit I
>>>   :END:
>
> the ":CATEGORY: Sanscrit I" applies to the entry _above_, i.e.
>
> ** Sanskrit I (WS08) 
>
> and  the  ":CATEGORY: Teaching" is overridden. The TODO 
> entries in your file are _below_  ":CATEGORY: Sanscrit I" 
> so they will show up fine. 
>
> Think of the PROPERTIES as an attribute of the entry above.

Ok, I understand now. Thanks for explaining. 

What I want to do seems quite simple and natural to me. What would be
the org-way to get my desired output? Can I use two different property
keywords, one for areas and one for projects? How do other people do
it? 

I could, of course, simply skip the property for the 1st level, but
this would always result in a corrupt agenda view for projects. Not a
catastrophe, but not nice.

Greetings

Sven

[-- Attachment #1.2: Type: application/pgp-signature, Size: 188 bytes --]

[-- Attachment #2: Type: text/plain, Size: 204 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

* Re: Re: CATEGORY in different levels
  2008-02-06 23:31       ` Sven Bretfeld
@ 2008-02-07  7:32         ` Carsten Dominik
  2008-02-24 20:39           ` Sven Bretfeld
  0 siblings, 1 reply; 11+ messages in thread
From: Carsten Dominik @ 2008-02-07  7:32 UTC (permalink / raw)
  To: Sven Bretfeld; +Cc: emacs-org


On Feb 7, 2008, at 12:31 AM, Sven Bretfeld wrote:

> Hi Jost
>
> Jost Burkardt <jost.burkardt@web.de> writes:
>
>> Sorry to correct you, but the result is correct. As Carsten said:
>>
>> The :CATEGORY: property applies to the entry headline _above_ it,  
>> and to
>> the entire tree below it
>>
>> So in your example
>>
>>>> * Teaching
>>>> :PROPERTIES:
>>>> :CATEGORY: Teaching
>>>> :END:
>>>> ** Sanskrit I (WS08)                        :PROJECT:
>>>>  :PROPERTIES:
>>>>  :CATEGORY: Sanscrit I
>>>>  :END:
>>
>> the ":CATEGORY: Sanscrit I" applies to the entry _above_, i.e.
>>
>> ** Sanskrit I (WS08)
>>
>> and  the  ":CATEGORY: Teaching" is overridden. The TODO
>> entries in your file are _below_  ":CATEGORY: Sanscrit I"
>> so they will show up fine.
>>
>> Think of the PROPERTIES as an attribute of the entry above.
>
> Ok, I understand now. Thanks for explaining.
>
> What I want to do seems quite simple and natural to me. What would be
> the org-way to get my desired output? Can I use two different property
> keywords, one for areas and one for projects? How do other people do
> it?


There are three ways to do what you want.

1. Put a CATEGORY property into every child of "Sanscrit I"
2. Work around it with a "Teach/Sanscrit I" category
2. Change what you *want* by realizing that it is actually a good
    convention what we have right now.

- Carsten

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

* Re: Re: CATEGORY in different levels
  2008-02-07  7:32         ` Carsten Dominik
@ 2008-02-24 20:39           ` Sven Bretfeld
  0 siblings, 0 replies; 11+ messages in thread
From: Sven Bretfeld @ 2008-02-24 20:39 UTC (permalink / raw)
  To: emacs-org


[-- Attachment #1.1: Type: text/plain, Size: 158 bytes --]

Hello to all 

I have been away for two weeks, therefore my late answer. Thanks for
your suggestions. It's working quite well now.

Greetings

Sven


[-- Attachment #1.2: Type: application/pgp-signature, Size: 188 bytes --]

[-- Attachment #2: Type: text/plain, Size: 204 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

end of thread, other threads:[~2008-02-24 20:39 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-06  0:10 CATEGORY in different levels Sven Bretfeld
2008-02-06  1:47 ` Bernt Hansen
2008-02-06  8:44   ` Sven Bretfeld
2008-02-06 10:02   ` Sven Bretfeld
2008-02-06 13:45     ` Bernt Hansen
2008-02-06 15:43 ` Carsten Dominik
2008-02-06 22:40   ` Sven Bretfeld
2008-02-06 23:15     ` Jost Burkardt
2008-02-06 23:31       ` Sven Bretfeld
2008-02-07  7:32         ` Carsten Dominik
2008-02-24 20:39           ` Sven Bretfeld

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