From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Eric Schulte" Subject: Re: [Babel] Prefix for tangled files Date: Fri, 29 Oct 2010 01:56:21 -0600 Message-ID: <87vd4lv3dm.fsf@gmail.com> References: <80k4l27f90.fsf@mundaneum.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from [140.186.70.92] (port=45728 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PBjp6-0004Wh-CA for emacs-orgmode@gnu.org; Fri, 29 Oct 2010 03:56:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PBjp4-0006FP-Pr for emacs-orgmode@gnu.org; Fri, 29 Oct 2010 03:56:28 -0400 Received: from mail-gx0-f169.google.com ([209.85.161.169]:35959) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PBjp4-0006FK-Nb for emacs-orgmode@gnu.org; Fri, 29 Oct 2010 03:56:26 -0400 Received: by gxk2 with SMTP id 2so391131gxk.0 for ; Fri, 29 Oct 2010 00:56:26 -0700 (PDT) In-Reply-To: <80k4l27f90.fsf@mundaneum.com> (=?utf-8?Q?=22S=C3=A9bastien?= Vauban"'s message of "Thu, 28 Oct 2010 13:01:31 +0200") 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: =?utf-8?Q?S=C3=A9bastien?= Vauban Cc: emacs-orgmode@gnu.org Hi Seb, You could use the `org-babel-post-tangle-hook' to rename all tangled files behind some common prefix. Any function on this hook will be called once per tangled file from within the tangled file, so it could use the `buffer-file-name' to rename the file. Best -- Eric S=C3=A9bastien Vauban writes: > Hello, > > Wanting to use Babel as much as possible, writing a lot of scripts that I > tangle (and eventually share with others), I find that prefixing all tang= led > files shoud be a good habit in order to directly see which files (in dire= d) > are the results of a tangling process. > > Of course, I can have this habit, but others (and colleagues) may not hav= e it. > > Would it make sense to have an Org-Babel variable for such a prefix > (defaulting to the empty string, and overridable per block, subtree, file, > language, as for the rest)? > > Best regards, > Seb