From mboxrd@z Thu Jan 1 00:00:00 1970 From: Diego Zamboni Subject: Specifying the tangle filename based on the source filename? Date: Sun, 28 Jan 2018 14:54:44 +0100 Message-ID: Mime-Version: 1.0 (Mac OS X Mail 11.2 \(3445.5.20\)) Content-Type: multipart/alternative; boundary="Apple-Mail=_68FD9560-4C15-475E-AE3E-3AD2AC4C5B80" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:53755) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1efnR5-0004C7-Sv for emacs-orgmode@gnu.org; Sun, 28 Jan 2018 08:55:57 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1efnR2-0003Z0-Rm for emacs-orgmode@gnu.org; Sun, 28 Jan 2018 08:55:55 -0500 Received: from mail-wm0-x22a.google.com ([2a00:1450:400c:c09::22a]:38470) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1efnR2-0003YT-Iu for emacs-orgmode@gnu.org; Sun, 28 Jan 2018 08:55:52 -0500 Received: by mail-wm0-x22a.google.com with SMTP id 141so28786110wme.3 for ; Sun, 28 Jan 2018 05:55:52 -0800 (PST) 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: emacs-orgmode@gnu.org Cc: Diego Zamboni --Apple-Mail=_68FD9560-4C15-475E-AE3E-3AD2AC4C5B80 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Hi, I=E2=80=99ve been converting many of my configuration files to org-mode = to better document them (examples: = https://github.com/zzamboni/dot_emacs/blob/master/init.org = , = https://github.com/zzamboni/dot_elvish/blob/master/rc.org = ). Usually I = have a line like the following at the top of each org file: #+PROPERTY: header-args:emacs-lisp :tangle init.el So that all the code blocks in the file are, by default, tangled to the = corresponding config file. I was wondering if it might be possible to = avoid hardcoding the output file (=E2=80=9Cinit.el=E2=80=9D in this = example) and instead derive it from the source filename (=E2=80=9Cinit.org= =E2=80=9D in this case). I=E2=80=99ve looked a bit through the manual = and although I found the {{{input-file}}} macro, I couldn=E2=80=99t get = it to work. Thanks for any help, =E2=80=94Diego --Apple-Mail=_68FD9560-4C15-475E-AE3E-3AD2AC4C5B80 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 Hi,

I=E2=80= =99ve been converting many of my configuration files to org-mode to = better document them (examples: https://github.com/zzamboni/dot_emacs/blob/master/init.org,=  https://github.com/zzamboni/dot_elvish/blob/master/rc.org).= Usually I have a line like the following at the top of each org = file:

#+PROPERTY: header-args:emacs-lisp :tangle = init.el

So= that all the code blocks in the file are, by default, tangled to the = corresponding config file. I was wondering if it might be possible to = avoid hardcoding the output file (=E2=80=9Cinit.el=E2=80=9D in this = example) and instead derive it from the source filename (=E2=80=9Cinit.org=E2=80=9D in this case). = I=E2=80=99ve looked a bit through the manual and although I found the = {{{input-file}}} macro, I couldn=E2=80=99t get it to work.

Thanks for any = help,
=E2=80=94Diego

= --Apple-Mail=_68FD9560-4C15-475E-AE3E-3AD2AC4C5B80--