From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Charles C. Berry" Subject: Re: [BABEL] Tangling to a hierarchy of files? Date: Wed, 19 Jan 2011 08:20:52 -0800 Message-ID: References: <87tyh5icir.fsf@gmail.com> <4D36B76D.9020502@gmail.com> Mime-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="8323328-1069304025-1295454052=:15631" Return-path: Received: from [140.186.70.92] (port=35534 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PfamG-0002kU-8Z for emacs-orgmode@gnu.org; Wed, 19 Jan 2011 11:20:58 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PfamE-0006HV-LI for emacs-orgmode@gnu.org; Wed, 19 Jan 2011 11:20:56 -0500 Received: from tajo.ucsd.edu ([137.110.122.165]:44674) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PfamE-0006Gl-Fh for emacs-orgmode@gnu.org; Wed, 19 Jan 2011 11:20:54 -0500 In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Chris Maier Cc: emacs-orgmode@gnu.org, Rainer M Krug This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --8323328-1069304025-1295454052=:15631 Content-Type: TEXT/PLAIN; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE On Wed, 19 Jan 2011, Chris Maier wrote: > On Wed, Jan 19, 2011 at 5:05 AM, Rainer M Krug wrote= : >> On 01/19/2011 08:22 AM, Eric Schulte wrote: >>> >>> In addition to the solution Charles posted, it is possible to put >>> arbitrary elisp forms into header arguments, so the following >>> alternative to your block above will create the directory (if it doesn'= t >>> already exist) whenever the block is tangled or evaluated. >>> >>> #+begin_src clojure :tangle (prog1 "src/foo.clj" (make-directory "src" = ".")) >>> =A0 (ns foo) >>> >>> =A0 (defn my-inc [x] >>> =A0 =A0 (+ x 1)) >>> #+end_src > > This will do what I'm looking for, thanks! > > Is there a place where this and the eval-on-startup trick Charles > posted are documented? If so, I missed it, and these are both really > useful to know. C-h i, then navigate to (emacs)Top > Customization > Variables > File Variables > Specifying File= =20 Variables 'eval' is a special kind of file variable. Chuck > >> Would it be possible, to include this into tangling, i.e. if the folder >> in which the source file should be created does not exist, create it? >> >> I remember vaguely a discussion along these lines some time ago, but I >> don't remember the outcome? > > This would be a great feature to have. Eric's embedded Lisp code > trick will do the job, but I can imagine that it would get cumbersome > for more complex projects. > > Thanks for all the help, everyone! > > Chris > Charles C. Berry Dept of Family/Preventive Medic= ine cberry@tajo.ucsd.edu=09=09=09 UC San Diego http://famprevmed.ucsd.edu/faculty/cberry/ La Jolla, San Diego 92093-0901 --8323328-1069304025-1295454052=:15631 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode --8323328-1069304025-1295454052=:15631--