From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Berry, Charles" Subject: Re: Have :var reference a value Date: Sun, 8 Dec 2019 18:18:32 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:43518) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ie18x-0005d6-JM for emacs-orgmode@gnu.org; Sun, 08 Dec 2019 13:18:57 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ie18v-0001kr-PZ for emacs-orgmode@gnu.org; Sun, 08 Dec 2019 13:18:54 -0500 Received: from mx0b-00395d01.pphosted.com ([148.163.137.170]:2162) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ie18v-0001bT-1k for emacs-orgmode@gnu.org; Sun, 08 Dec 2019 13:18:53 -0500 In-Reply-To: Content-Language: en-US Content-ID: <9E94B37480B66744B087866170312F09@AD.UCSD.EDU> 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: "gmauer@gmail.com" Cc: emacs-orgmode > On Dec 8, 2019, at 8:52 AM, George Mauer wrote: >=20 > I'm playing around with learning racket in an org buffer and I have a bun= ch of blocks that look like this >=20 > #+begin_src racket :var value=3D"abbracadaabra" > ...do stuff with value... > #+end_src >=20 >=20 > #+begin_src racket :var value=3D"abbracadaabra" > ...do other stuff with value... > #+end_src >=20 > Is there a way to move the "abbracadaabra" string into a single location = so that I can just pull the var from that? I know I can put it in a table o= r a list, but how about into a single value? Make it a property: #+PROPERTY: magic abbracadabra #+begin_src emacs-lisp :var value=3D(org-entry-get (point) "magic" t) value #+end_src #+RESULTS: : abbracadabra When you add/change a property like this be sure to update (C-c C-c on the= PROPERTY line or save, close, open the file). For a long string, you might put it in a src block and then use :var value= =3Dblock-name() to get it. HTH, Chuck=