From mboxrd@z Thu Jan 1 00:00:00 1970 From: Samuel Loury Subject: Re: `org-get-category' and `org-entry-get' do not return the same value Date: Tue, 28 Apr 2015 08:52:46 +0200 Message-ID: <874mo0g2wx.fsf@konixwork.incubateur.ens-lyon.fr> References: <87386sitvl.fsf@konixwork.incubateur.ens-lyon.fr> <87egqcr6hb.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:57188) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YmzO7-0004D3-D7 for emacs-orgmode@gnu.org; Tue, 28 Apr 2015 02:53:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YmzO3-0001fP-3Q for emacs-orgmode@gnu.org; Tue, 28 Apr 2015 02:52:59 -0400 Received: from mail-wi0-x235.google.com ([2a00:1450:400c:c05::235]:37114) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YmzO2-0001fI-SU for emacs-orgmode@gnu.org; Tue, 28 Apr 2015 02:52:55 -0400 Received: by widdi4 with SMTP id di4so16860575wid.0 for ; Mon, 27 Apr 2015 23:52:53 -0700 (PDT) In-Reply-To: <87egqcr6hb.fsf@nicolasgoaziou.fr> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Nicolas Goaziou Cc: OrgMode ML --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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=C2=A0(point)=C2=A0"CATEGORY"=C2=A0t) 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: =2D-8<---------------cut here---------------start------------->8--- #+CATEGORY: c * foo :PROPERTIES: :CATEGORY: a :END: ** bar :PROPERTIES: :CATEGORY: b :END: =2D-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: =2D-8<---------------cut here---------------start------------->8--- commit 80bccca4e249cbb5812963863ccffbdcf4b25edd Author: Nicolas Goaziou Date: Tue Mar 31 16:22:10 2015 +0200 Fix `org-refresh-category-properties' =20=20=20=20 * lisp/org.el (org-refresh-category-properties): Ignore false positives when setting category. Also, deprecate old CATEGORY keyword behaviour: new keywords override old ones. =2D-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? =2D-=20 Konubinix GPG Key : 7439106A Fingerprint: 5993 BE7A DA65 E2D9 06CE 5C36 75D2 3CED 7439 106A --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJVPy4/AAoJEHXSPO10ORBq/PcH/AnZOMe1E0KLy/+iKvbzvhHK jTZkObpxRLhcy1DQ9WBk9BMGBsj/1YGaOs0FCd2wyia1CfKTVBLPg22g/3pXazIj TO47M6iaWoSlz91rtsx1auNupP9hypP7oempaAUN8i9cFL9ZauW1DYySHGBNmmk3 GrIscrOUhxgc9OtF5Hv0GqlEHQ1cyMiw1s+pBnCrp+8ftlh8Q+HcxWwFycR7MzdD BrJ/HkHn6E9Fl3oj4qeTlZup2y2kzcsvMislIPJjt1aNnVgrmXMbJsQHNeStyEQ7 ZanYQOi2QL97fB9PqCsZHSoeoZz1fr2iYWO/HmwzdOTBl4/fxaf1uf7F5XBL0zs= =F+fa -----END PGP SIGNATURE----- --=-=-=--