From mboxrd@z Thu Jan 1 00:00:00 1970 From: tsd@tsdye.com (Thomas S. Dye) Subject: Re: Org-Babel concise named scalar variables Date: Wed, 16 Apr 2014 06:55:59 -1000 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:53457) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WaT9C-0003aC-TO for emacs-orgmode@gnu.org; Wed, 16 Apr 2014 12:57:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WaT96-00030o-RZ for emacs-orgmode@gnu.org; Wed, 16 Apr 2014 12:57:18 -0400 Received: from gproxy5-pub.mail.unifiedlayer.com ([67.222.38.55]:52150) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1WaT96-0002zc-Cb for emacs-orgmode@gnu.org; Wed, 16 Apr 2014 12:57:12 -0400 In-Reply-To: (William Kunkel's message of "Wed, 16 Apr 2014 00:23:12 -0400") 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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: William Kunkel Cc: emacs-orgmode@gnu.org Aloha Will, You can set system-wide header arguments or set default values for a buffer or heading. See the Org mode manual, Section 14.8.1, Using header arguments. hth, Tom William Kunkel writes: > I'm just getting started using Org Babel and I've run into a bit of an > annoyance that I can't seem to find an answer to in the Org Babel docs. I > find myself wanting to use one variable in multiple code blocks, for > example, the path to a file. Org Babel provides several mechanisms for > including array/list types, via tables and lists with a #+NAME line before > them. However the only mechanism it provides for single variables is #+NAME > before example blocks, which just seem clunky for something as trivial as a > file path or numeric variable. Is there a more concise way to do simple > variables, or am I stuck with the named example blocks? > > Thanks, > Will > I'm just getting started using Org Babel and I've run into a bit of an > annoyance that I can't seem to find an answer to in the Org Babel > docs. I find myself wanting to use one variable in multiple code > blocks, for example, the path to a file. Org Babel provides several > mechanisms for including array/list types, via tables and lists with a > #+NAME line before them. However the only mechanism it provides for > single variables is #+NAME before example blocks, which just seem > clunky for something as trivial as a file path or numeric variable. Is > there a more concise way to do simple variables, or am I stuck with > the named example blocks? > > Thanks, > Will > -- Thomas S. Dye http://www.tsdye.com