Re: [O] `org-get-category' and `org-entry-get' do not return the same value

2015-04-27 Thread Samuel Loury
Dear Nicolas,
Nicolas Goaziou  writes:

> Samuel Loury  writes:
>
>> I use the version cd6fa4c15e8e35afa6beb9e89ad3723fb82df091 (git sha) of
>> org-mode.
>>
>> Let's say I have a file looking like this:
>>
>> #+CATEGORY: c
>> * foo
>>   :PROPERTIES:
>>   :CATEGORY: a
>>   :END:
>> ** bar
>>:PROPERTIES:
>>:CREATED:  [2015-01-30 Fri 08:37]
>>:END:
>>
>> With the point on bar, `org-get-category' returns "a" while
>> (org-entry-get (point) "CATEGORY" t) returns "c". Notice that it returns
>> "c" even if the third argument is INHERIT.
>
> This should be fixed. Thank you.

Thank you for taking the time to fix the problem.

I just fetched the last version of the sources and realized the CATEGORY
handling still strange. The CATEGORY keyword is taken into account only
at the upper level in the headline hierarchy.

I will illustrate the in the same example as above with a small
modification:

--8<---cut here---start->8---
#+CATEGORY: c
* foo
  :PROPERTIES:
  :CATEGORY: a
  :END:
** bar
   :PROPERTIES:
   :CATEGORY: b
   :END:

--8<---cut here---end--->8---

`org-get-category' in the bar headline returns 'a', while I would expect
it to return 'b'.

I realized that this change was introduced in the following commit:

--8<---cut here---start->8---
commit 80bccca4e249cbb5812963863ccffbdcf4b25edd
Author: Nicolas Goaziou 
Date:   Tue Mar 31 16:22:10 2015 +0200

Fix `org-refresh-category-properties'

* lisp/org.el (org-refresh-category-properties): Ignore false
  positives when setting category.  Also, deprecate old CATEGORY
  keyword behaviour: new keywords override old ones.
--8<---cut here---end--->8---

Most of my work flow with org-mode relies on this old behavior.

I searched through the sources, the git history and the mailing list to
find out why this behavior was changed but found nothing.

I don't understand why one would want to remove this behavior. Does it
raise a technical issue?

-- 
Konubinix
GPG Key: 7439106A
Fingerprint: 5993 BE7A DA65 E2D9 06CE  5C36 75D2 3CED 7439 106A


signature.asc
Description: PGP signature


Re: [O] `org-get-category' and `org-entry-get' do not return the same value

2015-01-30 Thread Nicolas Goaziou
Hello,

Samuel Loury  writes:

> I use the version cd6fa4c15e8e35afa6beb9e89ad3723fb82df091 (git sha) of
> org-mode.
>
> Let's say I have a file looking like this:
>
> #+CATEGORY: c
> * foo
>   :PROPERTIES:
>   :CATEGORY: a
>   :END:
> ** bar
>:PROPERTIES:
>:CREATED:  [2015-01-30 Fri 08:37]
>:END:
>
> With the point on bar, `org-get-category' returns "a" while
> (org-entry-get (point) "CATEGORY" t) returns "c". Notice that it returns
> "c" even if the third argument is INHERIT.

This should be fixed. Thank you.


Regards,

-- 
Nicolas Goaziou



[O] `org-get-category' and `org-entry-get' do not return the same value

2015-01-29 Thread Samuel Loury
Hi,

I use the version cd6fa4c15e8e35afa6beb9e89ad3723fb82df091 (git sha) of
org-mode.

Let's say I have a file looking like this:

--8<---cut here---start->8---
#+CATEGORY: c
* foo
  :PROPERTIES:
  :CATEGORY: a
  :END:
** bar
   :PROPERTIES:
   :CREATED:  [2015-01-30 Fri 08:37]
   :END:
--8<---cut here---end--->8---

With the point on bar, `org-get-category' returns "a" while
(org-entry-get (point) "CATEGORY" t) returns "c". Notice that it returns
"c" even if the third argument is INHERIT.

This causes the strange behavior that I cannot set interactively the
CATEGORY property value to "c" with C-x C-c p.

The behavior is again more strange in the agenda, where the bar entry is
correctly shown with the CATEGORY "a" and trying to change it with
--8<---cut here---start->8---
C-x C-c p CATEGORY c
--8<---cut here---end--->8---
does nothing.

Is there a new way to interactively edit the CATEGORY or should
`org-set-property' tackle the special case of CATEGORY?

Best regards,
-- 
Konubinix
GPG Key: 7439106A
Fingerprint: 5993 BE7A DA65 E2D9 06CE  5C36 75D2 3CED 7439 106A


signature.asc
Description: PGP signature