emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Ilya Shlyakhter <ilya_shl@alum.mit.edu>
To: Bastien <bzg@gnu.org>, Achim Gratz <Stromeko@nexgo.de>
Cc: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: Re: [PATCH] Fixed bug in org-entry-get-with-inheritance
Date: Tue, 18 Mar 2014 11:38:18 -0400	[thread overview]
Message-ID: <CACfYvRZ+UpoWtJxOMgRKkV6smuHNtOa_xEB76_jAks9CcvSg_g@mail.gmail.com> (raw)
In-Reply-To: <877g7rh73h.fsf@bzg.ath.cx>

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 <bzg@gnu.org> wrote:
> Bastien <bzg@gnu.org> writes:
>
>> Ilya Shlyakhter <ilya_shl@alum.mit.edu> 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

  reply	other threads:[~2014-03-18 15:38 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-07  6:28 [PATCH] Fixed bug in org-entry-get-with-inheritance Ilya Shlyakhter
2014-03-14 11:16 ` Bastien
2014-03-17 18:25   ` Achim Gratz
2014-03-17 19:08     ` Bastien
2014-03-17 19:20       ` Achim Gratz
2014-03-17 19:33         ` Bastien
2014-03-17 19:49           ` Achim Gratz
2014-03-17 20:35             ` Bastien
2014-03-17 20:51               ` Achim Gratz
2014-03-17 20:56                 ` Bastien
2014-03-17 21:30               ` Ilya Shlyakhter
2014-03-17 21:43                 ` Achim Gratz
2014-03-17 22:06                   ` Ilya Shlyakhter
2014-03-17 22:13                     ` Bastien
2014-03-18 12:01                       ` Bastien
2014-03-18 15:14                       ` Bastien
2014-03-18 15:38                         ` Ilya Shlyakhter [this message]
2014-03-18 17:23                         ` Achim Gratz
2014-03-18 18:27                           ` Bastien

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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  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=CACfYvRZ+UpoWtJxOMgRKkV6smuHNtOa_xEB76_jAks9CcvSg_g@mail.gmail.com \
    --to=ilya_shl@alum.mit.edu \
    --cc=Stromeko@nexgo.de \
    --cc=bzg@gnu.org \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* 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

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

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