From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Charles C. Berry" Subject: Re: Dynamic tangle target? Date: Wed, 21 Sep 2016 18:06:42 -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]:51447) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bmsTR-0007rP-CT for emacs-orgmode@gnu.org; Wed, 21 Sep 2016 21:06:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bmsTN-00013d-A0 for emacs-orgmode@gnu.org; Wed, 21 Sep 2016 21:06:49 -0400 Received: from iport-bcv1-out.ucsd.edu ([132.239.0.119]:36659) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bmsTN-00013X-1j for emacs-orgmode@gnu.org; Wed, 21 Sep 2016 21:06:45 -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: Philip Hudson Cc: emacs orgmode-mailinglist On Wed, 21 Sep 2016, Philip Hudson wrote: > AFAICT :tangle takes only "yes", "no", or a literal pathname. Stuff like :tangle (my-lisp-function arg1 arg2) will work. > How > might I dynamically generate a pathname for :tangle? I suppose what I > want is some kind of escape syntax for eval'ing a Lisp form, like > maybe: > > :tangle %(my-dynamic-filename-generator) Try this: #+BEGIN_SRC R :tangle (concat "my-" "file" ".R") abs <- def #+END_SRC just as an example. BTW, org-babel-view-src-block-info (C-c C-v C-i) will show you what header args evaluate as without the need to eval or tangle them. HTH, Chuck