emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Eric Schulte" <schulte.eric@gmail.com>
To: Julien Fantin <julien.fantin@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: [org-babel] How to refer to a specific property when it is defined multiple times?
Date: Fri, 26 Mar 2010 10:34:39 -0600	[thread overview]
Message-ID: <87y6hfyrc0.fsf@gmail.com> (raw)
In-Reply-To: <e86166cb1003260854g6bde0358wc88664a51f56bbd4@mail.gmail.com> (Julien Fantin's message of "Fri, 26 Mar 2010 16:54:08 +0100")

Hi Julien,

Is the following alternative sufficient?

* heading A
:PROPERTIES:
:BUSY_PROPERTY: AAA
:END:
* heading B
:PROPERTIES:
:BUSY_PROPERTY: BBB
:END:

#+begin_src emacs-lisp  :var test=(org-entry-get nil "BUSY_PROPERTY" t)
test
#+end_src
#+results:
: BBB

#+begin_src emacs-lisp  :var test=(car (org-property-values "BUSY_PROPERTY"))
test
#+end_src

#+results:
: BBB

#+begin_src emacs-lisp  :var test=(cadr (org-property-values "BUSY_PROPERTY"))
test
#+end_src

#+results:
: AAA


Julien Fantin <julien.fantin@gmail.com> writes:

> Consider the following :
>
> * heading A
> :PROPERTIES:
> :BUSY_PROPERTY: AAA
> :END:
> * heading B
> :PROPERTIES:
> :BUSY_PROPERTY: BBB
> :END:
>
> #+begin_src emacs-lisp  :var test=(org-entry-get nil "BUSY_PROPERTY" t)
> test
> #+end_src
> #+results:
> : BBB
>
> #+begin_src emacs-lisp  :var test=(org-property-values "BUSY_PROPERTY")
> test
> #+end_src
> #+results:
> | BBB | AAA |
>
>
> Is there a way I can refer to my BUSY_PROPERTY, in the context of particular
> heading ?
> Has shown above, I can not get a reference to the heading it was defined in.
> Is there a way to deal with those namespacing conerns right now ?
>
> Note : This emacs-lisp evaluation in src headers has only been recently
> implemented by Eric schulte.
>
> cheers
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

      parent reply	other threads:[~2010-03-26 16:34 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-26 15:54 [org-babel] How to refer to a specific property when it is defined multiple times? Julien Fantin
2010-03-26 16:33 ` Dan Davison
2010-03-26 16:34 ` Eric Schulte [this message]

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=87y6hfyrc0.fsf@gmail.com \
    --to=schulte.eric@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=julien.fantin@gmail.com \
    /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).