emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] eval code snippet before tangling config file


From: Charles C. Berry
Subject: Re: [O] eval code snippet before tangling config file
Date: Wed, 11 May 2016 08:24:58 -0700
User-agent: Alpine 2.20 (OSX 67 2015-01-07)

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 = <<hostname>>.superloopy.io
 #+END_SRC



Try `<<hostname()>>'.

See (info "(org) Noweb reference syntax")

...     <<code-block-name(optional arguments)>> ...

HTH,

Chuck












reply via email to

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