emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] passing entry property to a source code block?


From: Charles C. Berry
Subject: Re: [O] passing entry property to a source code block?
Date: Fri, 2 Dec 2016 08:47:32 -0800
User-agent: Alpine 2.20 (OSX 67 2015-01-07)

On Fri, 2 Dec 2016, Piter wrote:

Hi everybody.

I would like to get a property of org-mode entry and pass it as a string variable to a python source code.

Is it possible to do? I have been looking into attach screensshot code but since my elisp experience is very limited I can not figure it out.

Any tips about it? may be I can use inline ellisp function in python source header?


That's about right:


# Refresh the `property' line with C-c C-c the first time you use it.

#+PROPERTY: my-string "Hello everyone!"

#+header: :var ms=(org-entry-get (point) "my-string" t)
#+BEGIN_SRC python :results output
print ms
#+END_SRC

#+RESULTS:
: "Hello everyone!"

HTH,

Chuck

p.s. do not forget to




reply via email to

[Prev in Thread] Current Thread [Next in Thread]