From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Schulte Subject: Re: Tangling to Multiple Files Date: Sun, 28 Oct 2012 15:12:57 -0600 Message-ID: <871ugimhba.fsf@gmail.com> References: <87txtebbjt.fsf@rye.gateway.2wire.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([208.118.235.92]:60127) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TSaAO-0006jx-K5 for emacs-orgmode@gnu.org; Sun, 28 Oct 2012 17:13:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TSaAN-0007CW-F4 for emacs-orgmode@gnu.org; Sun, 28 Oct 2012 17:13:08 -0400 Received: from mail-ie0-f169.google.com ([209.85.223.169]:63419) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TSaAN-0007CP-9s for emacs-orgmode@gnu.org; Sun, 28 Oct 2012 17:13:07 -0400 Received: by mail-ie0-f169.google.com with SMTP id 10so7167865ied.0 for ; Sun, 28 Oct 2012 14:13:06 -0700 (PDT) In-Reply-To: <87txtebbjt.fsf@rye.gateway.2wire.net> (Alan Lue's message of "Sun, 28 Oct 2012 13:12:54 -0700") 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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Alan Lue Cc: emacs-orgmode@gnu.org Alan Lue writes: > Hi, how does one tangle a single code block to multiple files? > > I thought the following might work, but unfortunately it does not. > > Set the frame size. > #+HEADERS: :tangle user-host-a.el user-host-b.el > #+BEGIN_SRC emacs-lisp > (setq initial-frame-alist '((width . 80) (height . 38))) > #+END_SRC > > To provide some background, I'm using =3Dorg-babel-load-file=3D in my > init.el file to load up my Emacs configuration from an Org file=E2=80=94c= all it > "user.org." I'd like to use just one user.org file across multiple > computers, however, meaning I'd like user.org to tangle into > user-host-a.el and user-host-b.el, for instance. > > The configurations are only slightly different, so I'd like to be able > to selectively indicate to Org-mode which code blocks to tangle > into. > > You could try something like the following to tangle out to a different file on each machine. :tangle (format "%s.el" system-name) or :tangle (format "%s.el" user-login-name) Hope this helps, --=20 Eric Schulte http://cs.unm.edu/~eschulte