From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Charles C. Berry" Subject: Re: eval code snippet before tangling config file Date: Wed, 11 May 2016 08:24:58 -0700 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]:38729) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b0W0Z-0007Qb-DT for emacs-orgmode@gnu.org; Wed, 11 May 2016 11:25:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b0W0V-0004xS-09 for emacs-orgmode@gnu.org; Wed, 11 May 2016 11:25:06 -0400 Received: from iport-acv1-out.ucsd.edu ([132.239.0.176]:28920) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b0W0U-0004vR-Km for emacs-orgmode@gnu.org; Wed, 11 May 2016 11:25:02 -0400 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: Stig Brautaset Cc: emacs-orgmode@gnu.org On Wed, 11 May 2016, Stig Brautaset wrote: > > Hi, > > I'm trying to evaluate a line of shell code and put its output into a > snippet that will be tangled to a file. My best attempt so far: > > #+NAME: hostname > #+BEGIN_SRC sh > hostname -s > #+END_SRC > > #+BEGIN_SRC conf :tangle /usr/local/etc/leafnode/config :noweb tangle > expire = 20 > server = news.gmane.org > initialfetch = 100 > hostname = <>.superloopy.io > #+END_SRC > Try `<>'. See (info "(org) Noweb reference syntax") ... <> ... HTH, Chuck