From mboxrd@z Thu Jan 1 00:00:00 1970 From: tsd@tsdye.com (Thomas S. Dye) Subject: Re: Tangling to Multiple Files Date: Sun, 28 Oct 2012 11:03:32 -1000 Message-ID: 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]:53162) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TSa1G-0005Az-Dm for emacs-orgmode@gnu.org; Sun, 28 Oct 2012 17:03:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TSa1F-0004xz-98 for emacs-orgmode@gnu.org; Sun, 28 Oct 2012 17:03:42 -0400 Received: from oproxy12-pub.bluehost.com ([50.87.16.10]:60084) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1TSa1E-0004xm-VN for emacs-orgmode@gnu.org; Sun, 28 Oct 2012 17:03:41 -0400 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 Aloha Alan, This can be achieved with noweb references. Something like this: #+name: user-host-a #+HEADERS: :tangle user-host-a.el :noweb tangle #+BEGIN_SRC emacs-lisp <> #+END_SRC #+name: user-host-b #+HEADERS: :tangle user-host-b.el :noweb tangle #+BEGIN_SRC emacs-lisp <> #+END_SRC #+name: initial-frame #+BEGIN_SRC emacs-lisp (setq initial-frame-alist '((width . 80) (height . 38))) #+END_SRC hth, Tom 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. > > > --=20 Thomas S. Dye http://www.tsdye.com