emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Samuel Loury
Subject: Re: [O] `org-get-category' and `org-entry-get' do not return the same value
Date: Tue, 28 Apr 2015 08:52:46 +0200
User-agent: Notmuch/0.19 (http://notmuchmail.org) Emacs/24.4.1 (x86_64-pc-linux-gnu)

Dear Nicolas,
Nicolas Goaziou <address@hidden> writes:

> Samuel Loury <address@hidden> 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 <address@hidden>
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

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]