From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Charles C. Berry" Subject: Re: passing entry property to a source code block? Date: Fri, 2 Dec 2016 08:47:32 -0800 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:47022) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cCqzx-00029Y-TA for emacs-orgmode@gnu.org; Fri, 02 Dec 2016 11:47:48 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cCqzu-0008Ke-QO for emacs-orgmode@gnu.org; Fri, 02 Dec 2016 11:47:45 -0500 Received: from iport-acv5-out.ucsd.edu ([132.239.0.10]:64815) by eggs.gnu.org with esmtps (TLS1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.71) (envelope-from ) id 1cCqzu-0008KK-Dx for emacs-orgmode@gnu.org; Fri, 02 Dec 2016 11:47:42 -0500 In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Piter Cc: emacs-orgmode@gnu.org 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