From mboxrd@z Thu Jan 1 00:00:00 1970 From: Grant Rettke Subject: Re: Dynamic tangle target? Date: Thu, 22 Sep 2016 14:36:58 -0500 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:54344) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bn9nq-0000Ec-PR for emacs-orgmode@gnu.org; Thu, 22 Sep 2016 15:37:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bn9no-000466-N9 for emacs-orgmode@gnu.org; Thu, 22 Sep 2016 15:37:01 -0400 Received: from mail-io0-x234.google.com ([2607:f8b0:4001:c06::234]:34828) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bn9no-00045l-HT for emacs-orgmode@gnu.org; Thu, 22 Sep 2016 15:37:00 -0400 Received: by mail-io0-x234.google.com with SMTP id m186so96513710ioa.2 for ; Thu, 22 Sep 2016 12:37:00 -0700 (PDT) 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: "Charles C. Berry" Cc: emacs orgmode-mailinglist , Philip Hudson Most things that you can image are also listed here: https://eschulte.github.io/org-scraps/ Awesome reading for Org-Mode Literate Programmers. Sincerely, Grant Rettke On Wed, Sep 21, 2016 at 8:06 PM, Charles C. Berry wrote: > 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 >