From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ilya Shlyakhter Subject: Re: [PATCH] Fixed bug in org-entry-get-with-inheritance Date: Tue, 18 Mar 2014 11:38:18 -0400 Message-ID: References: <87bnx9qbcq.fsf@bzg.ath.cx> <87vbvcptqt.fsf@Rainer.invalid> <87ob14d4o7.fsf@bzg.ath.cx> <87r460pr8d.fsf@Rainer.invalid> <87ha6wd3hg.fsf@bzg.ath.cx> <87mwgoppvf.fsf@Rainer.invalid> <87mwgopnrf.fsf@bzg.ath.cx> <87eh20pkkt.fsf@Rainer.invalid> <532771CF.7010409@alum.mit.edu> <878us8pj83.fsf@bzg.ath.cx> <877g7rh73h.fsf@bzg.ath.cx> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:38042) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WPw6D-0003wG-8Y for emacs-orgmode@gnu.org; Tue, 18 Mar 2014 11:38:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WPw6B-0001Xw-5W for emacs-orgmode@gnu.org; Tue, 18 Mar 2014 11:38:41 -0400 In-Reply-To: <877g7rh73h.fsf@bzg.ath.cx> 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: Bastien , Achim Gratz Cc: emacs-orgmode Thanks Bastien. Property API documentation could be made more precise in some places. >From the documentation of org-entry-get (both the docstring and the Org manual), it would seem that unless the inherit argument is non-nil, file-wide and system-wide property settings should not be checked at all? The Org manual seems especially clear: "By default, this only looks at properties defined locally in the entry." Logically, it makes sense to think of file-wide properties as being on an implicit "level 0" headline under which all headlines in the file are grouped, and system-wide properties as being on an implicit "level -1" headline under which all level-0 headlines are grouped. But, existing code and Org files might rely on org-entry-get without inheritance considering file-wide and system-wide properties? Documentation of the variable org-use-property-inheritance also can be read to mean that it controls the inheritance of file-wide and system-wide properties, though currently it does not ("When nil, only the properties directly given in the current entry count.") For org-entry-properties, it says "Get all properties of the entry" -- but it returns only properties explicitly defined at the entry, not anything inherited from up the hierarchy or file-wide or system-wide, right? It also says, "Keys may occur multiple times if the property key was used several times." -- but the manual also says that "a property can only have one entry per Drawer". Also, #+PROPERTY: lines have an effect no matter where they are in the file, but what happens when several of them set the same property isn't fully specified; I assume they're processed top-to-bottom, and later settings overwrite earlier ones, just as later prop+ settings append to earlier ones? (So in this sense it does matter where in the file a #+PROPERTY line is). It might also be useful to clarify that even if a subtree is archived, global property settings in that subtree continue to have an effect (because they aren't really in a subtree). Manual says that #+PROPERTY lines specify "properties that can be inherited by any entry in a file"; more precise would be that they specify "property settings inherited by every entry"? Likewise for the variable org-global-properties. On Tue, Mar 18, 2014 at 11:14 AM, Bastien wrote: > Bastien writes: > >> Ilya Shlyakhter writes: >> >>> When I open emacs with this file, move to the emacs-lisp block, and >>> evaluate it, I get "aaa". >> >> I can reproduce your problem now, I'm on it, and the problem is real, >> but I need to make sure all tests pass fine before fixing this. > > Okay, so I committed a different fix in maint and master. > > Please test it and let me know. > > Thanks, > > PS: You may want to read the commit message: > http://orgmode.org/cgit.cgi/org-mode.git/commit/?id=42ee862d > > -- > Bastien