From: Bill Wishon <bill@wishon.org>
To: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: Fix to property inheritance
Date: Sat, 15 Dec 2012 22:24:30 -0800 [thread overview]
Message-ID: <CAP2uJAsiGkezGx6YnVFPcrWVOv2ChsKBH0zkcD+pA=hspSyh1A@mail.gmail.com> (raw)
[-- 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
next reply other threads:[~2012-12-16 6:24 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-16 6:24 Bill Wishon [this message]
2012-12-24 0:45 ` Fix to property inheritance 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
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='CAP2uJAsiGkezGx6YnVFPcrWVOv2ChsKBH0zkcD+pA=hspSyh1A@mail.gmail.com' \
--to=bill@wishon.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).