emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Fix to property inheritance
@ 2012-12-16  6:24 Bill Wishon
  2012-12-24  0:45 ` Bastien
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Bill Wishon @ 2012-12-16  6:24 UTC (permalink / raw)
  To: emacs-orgmode


[-- Attachment #1.1: Type: text/plain, Size: 736 bytes --]

This is my first major org-mode contribution, and I'm new to git, so if
there is something I haven't got quite right in terms of how to contribute
please advise.

org-entry-get with inherit set didn't work for sub-heading additions or
overrides to properties found in parent headings as of Org-mode version
7.9.2 (release_7.9.2-738-g442b2a-git @ org-loaddefs.el can not be found!).

An example test org-mode file is attached (modified from the
testing/examples directory and also updated in my git repository).

My public git repository info is: git clone git@bitbucket.org:
mrvwman/wishon-org-mode.git
branch name: fix-property-inheritance

I've submitted my request to assign@gnu.org, but have not yet received a
reply.

Best,
~>Bill

[-- Attachment #1.2: Type: text/html, Size: 950 bytes --]

[-- Attachment #2: my-property-inheritance.org --]
[-- Type: application/octet-stream, Size: 1446 bytes --]

#+property: var  foo=1
#+property: var+ bar=2

#+begin_src emacs-lisp
  (+ foo bar)
#+end_src

#+begin_src emacs-lisp
  (org-entry-get (point) "var" t)
#+end_src

* overwriting a file-wide property
  :PROPERTIES:
  :var:      foo=7
  :END:

#+begin_src emacs-lisp
  foo
#+end_src

#+begin_src emacs-lisp
  (org-entry-get (point) "var" t)
#+end_src
* appending to a file-wide property
  :PROPERTIES:
  :var+:      baz=3
  :END:

#+begin_src emacs-lisp
  (+ foo bar baz)
#+end_src

#+begin_src emacs-lisp
  (org-entry-get (point) "var" t)
#+end_src
* hierarchy test
:PROPERTIES:
:var+: boo=2.5
:END:
** appending to a parent property
  :PROPERTIES:
  :var+:      baz=3
  :END:

The result should be 8.5
with Org-mode version 7.9.2 the result is that boo is undefined.
#+begin_src emacs-lisp
  (+ foo bar boo baz)
#+end_src

The result should be "foo=1 bar=2 boo=2.5 baz=3"
with Org-mode version 7.9.2 the result is "foo=1 bar=2 baz=3"
#+begin_src emacs-lisp
  (org-entry-get (point) "var" t)
#+end_src

** resetting a parent property
  :PROPERTIES:
  :var+:       nil
  :END:
The result should be "nil"
with Org-mode version 7.9.2 the result is an error
#+begin_src emacs-lisp
  (org-entry-get (point) "var" t t)
#+end_src

*** setting a new property value
:PROPERTIES:
:var+: bat=4
:END:
The result should be "bat=4"
with Org-mode version 7.9.2 the result is "foo=1 bar=2 bat=4"
#+begin_src emacs-lisp
  (org-entry-get (point) "var" t)
#+end_src


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2013-01-07 20:10 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-16  6:24 Fix to property inheritance Bill Wishon
2012-12-24  0:45 ` Bastien
2012-12-25  3:28 ` Bastien
2012-12-26  1:00   ` Bill Wishon
2012-12-30 10:39     ` Bastien
2013-01-07 17:35 ` Bastien
2013-01-07 19:57   ` Bill Wishon
2013-01-07 20:10     ` Bastien

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