emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Samuel Loury <konubinix@gmail.com>
To: Nicolas Goaziou <mail@nicolasgoaziou.fr>
Cc: OrgMode ML <emacs-orgmode@gnu.org>
Subject: Re: `org-get-category' and `org-entry-get' do not return the same value
Date: Tue, 28 Apr 2015 08:52:46 +0200	[thread overview]
Message-ID: <874mo0g2wx.fsf@konixwork.incubateur.ens-lyon.fr> (raw)
In-Reply-To: <87egqcr6hb.fsf@nicolasgoaziou.fr>

[-- Attachment #1: Type: text/plain, Size: 2336 bytes --]

Dear Nicolas,
Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:

> Samuel Loury <konubinix@gmail.com> writes:
>> I use the version cd6fa4c15e8e35afa6beb9e89ad3723fb82df091 (git sha) of
>> org-mode.
>> Let's say I have a file looking like this:
>> #+CATEGORY: c
>> * foo
>>   :CATEGORY: a
>>   :END:
>> ** bar
>>    :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

--8<---------------cut here---------------start------------->8---
* foo
** bar

--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 <mail@nicolasgoaziou.fr>
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?

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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 472 bytes --]

  reply	other threads:[~2015-04-28  6:53 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-30  7:56 `org-get-category' and `org-entry-get' do not return the same value Samuel Loury
2015-01-30  8:57 ` Nicolas Goaziou
2015-04-28  6:52   ` Samuel Loury [this message]
2015-04-28  7:02     ` [PATCH] Fix `org-refresh-category-properties' (was: `org-get-category' and `org-entry-get' do not return the same value) Samuel Loury
2015-04-28  7:42       ` [PATCH] Fix `org-refresh-category-properties' Nicolas Goaziou
2015-04-28  8:14         ` Samuel Loury

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=874mo0g2wx.fsf@konixwork.incubateur.ens-lyon.fr \
    --to=konubinix@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=mail@nicolasgoaziou.fr \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox


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